I am working on a requirement to display the luma value of raw YUV image(1280 x 720) as graph. That is, I am separating the Y data and displaying it in the form of graph, in which x axis is the width and the y axis is the respective Y value.
// Code
int count = 0;
int byteValue = 0;
for ( y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
byteValue = pPictureIn[count++] & 0xff;
series.addLast(x, byteValue);
}
}
final PlotStatistics stats = new PlotStatistics(10, false);
plot.addListener(stats);
redrawer = new Redrawer(Arrays.asList(new Plot[]{plot}),
1, false);
format = new LineAndPointFormatter(this, R.xml.formatter);
plot.addSeries(series, format);
redrawer.start();
I am using AndroidPlot to plot the graph. And I am adding all the points to the series. Here my problem is, if I try to render the points, My app gets freezed. And I am using the render mode as USE_BACKGROUND_THREAD.
Someone please help me to render the points at one shot without any freeze. Thanks in advance