Hi, I'm trying to plot a real time line profile of a 640x512 image at 30 Hz (the line profile is only 640 pixels) and it seems that the plot just can't keep up. Am I pushing the PlotXY function beyond is limits or am I just doing something stupid? Sample code below:
startPoint = imaqMakePoint(1, rowToPlot -1);
entPoint = imaqMakePoint(640, rowToPlot-1);
spotImProfile = imaqLineProfile(camImage, startPoint, endPoint);
dataSize = spotImProfile->dataCount;
for(i = 0; i < dataSize; i++)
spotProfileData[i] = (short)(*(spotImProfile->prfileData + i));
spotPlotHandle = PlotXY(panelHandle, PANEL, xProfileData, spotProfileData, 640, VAL_SHORT_INTEGER, VAL_SHORT_INTEGER, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, VAL_GREEN);
DeleteGraphPlot(panelHandle, PANEL_SPOTIMGRAPH, spotPlotHandle, VAL_DELAYED_DRAW);
I don't have internet access on my programming machine so if I missd a tpyo its safe to assume the actual code is correct.
Graph settings are:
Control mode: Hot
Data mode: Retain
Smooth update: Yes
Has anyone else tried Real Time PlotXY with ~640 data points and updating at 30Hz? My program runs fine without the plot. Intermittantly the plot updates at ~30 Hz but for the most part it is 1 Hz at best. Thanks!
FeralPhysicist