03-10-2010 02:38 PM
Hello,
I would like to graph a row of pixels.
The code below can load an image and convert it into a 3D plot based on the X, Y and pixel value.
I want to look at all the pixels in a row along the x axis and graph them on a xy graph.
Can someone help.
Cheers
K
03-10-2010 03:43 PM
OK, So I figure it out.
Here is the code.
I had to first select the row/col that want to see. Then convert that into a 1D array. From there, plot the data I want.
If anyone can point out how to optimize the code, it would be great.
Cheers
03-10-2010 03:44 PM
03-10-2010 09:15 PM - edited 03-10-2010 09:20 PM
Why do you have a while loop in your program?
Once the image is loaded, the while loop starts. Nothing ever changes from inside the while loop. And the while loop is running at full speed since you have no wait function in there. So you are pegging your processor doing things over and over and over with the only possibility that you hit the stop button to end the program.
When I ran your program, I saw graphic anomalies because the CPU didn't have enough time to redraw the screen properly when I moved the scroll bar. And when I hit the stop button, LabVIEW completely crashed without warning back to the desktop.
(Actually, LabVIEW crashed even after I removed the while loop.)
03-11-2010 12:54 PM
03-11-2010 01:08 PM
Hello Scott,
I'm running 8.2. Could you please repost.
Thank you
K
03-11-2010 05:04 PM