LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ROI Image Graph

Good morning, I am asking your advice regarding the code I am attaching. I don't understand why in the graph the X and Y coordinates of the 4 centers of the set ROIs are not shown, plus the stop button seems not to work correctly.
I would be grateful if you could upload me a corrected version of the code. Endless thanks, kind regards.

Download All
0 Kudos
Message 1 of 3
(142 Views)

Hi, "ROI copy.vi" which sets up camera (?) is too specific for the camera you're using, so I simply replaced it with IMAQdx Open Camera and IMAQdx Configure Grab. Also, I had to use IMAQ Cast Image (inside the while loop) to cast RGB from my camera to I16 that you expect in the rest of the program. Maybe your camera is already set to output I16, but I would check that in the first place. Remember to connect Image Type input to IMAQ Cast Image, as I expected it to use "Image Dst" type - that's not the case ;).

"Image Dst" input of IMAQ Extract2 needs to have the same Image Type as your input image.

You need to use proper output of IMAQ ImageToArray, but since you're using I16, that shouldn't be a problem.

Stop works OK when framerate is high, but since timeout for grab is 5 seconds, you can feel like it doesn't work if there is a problem with the camera. Place a probe somewhere in the loop and observe "Last Update" time.

IMAQ Cast Image.png

Please let me know if that helps you.

0 Kudos
Message 2 of 3
(50 Views)

Thank you very much for your answer. To assign a name to the variables plotted in the graph via a for loop how should I do it?

0 Kudos
Message 3 of 3
(31 Views)