LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I substract 2 pixels form the same image

I would like to know which library should I use from labview 7 and/or imaq vision so that I can substract the COORDINATES of 2 PIXELS from the SAME image.
THANKS !!!
0 Kudos
Message 1 of 6
(3,172 Views)
Hello.

Sorry about this. Unfortunately I am a bit unclear about what you want to do. Could you please add a couple of paragraphs explaining in more detail exactly what you require?

Once I have this information, I will do my best to answer you question.

Thanks
0 Kudos
Message 2 of 6
(3,172 Views)
I open a bitmap in lab view, then in that image, i click on the first pixel and i get the coordinates of it, then, i click on the second pixel, and i get the coordinates of it, what I want to do next is substract those 2 obtained coordinates(from the same image).

Thanks!!!
0 Kudos
Message 3 of 6
(3,172 Views)
Hello nobuto,

could you explain a little bit more?
You have a bitmap: that's basically an 2D-array containing color values. Why (and how) do you want to subtract the indexes (that are the pixel coordinates) from that array? Do you want to shift the image to different coordinates?
Wondering...

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,172 Views)
Once i have the live image of the frame grabber, i want to be able to click in two regions of the image, for example, i click on the first region, and get the pixel coordinate, if the image is 120*120 pixels for example and i click on the middle of the image, i should get that the chosen pixel has coordinates 60,60, and the same should apply for the other chosen pixel, once that is ready, i want to be able to manipulate those 2 numbers i got and substract them.
0 Kudos
Message 5 of 6
(3,172 Views)
Hello nobuto,

never worked with IMAQ by myself, but a collegue did...
He used a function "IMAQ Select Rectangle" to select a ROI (region of interest). You could do so for your 2 pixels. This functions gives you an "IMAQ Rectangle" (a cluster of 5 elements: top, left, right, bottom, rotation). You could uncluster the needed elements and do your subtraction.

Hope this helps.
Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,172 Views)