LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subtract Images Intensity graph

HI, I am a beginner of LabView using LabView2010.

In my program, I want to subtract two images and display its intensity graph image.

I attached my program below, and the right part of the program is the subtract and intensity part.

However, even I get two similar images from a camera, the subtracted intensity image always appear in all white colored, which means the difference is Maximum.

Is there any solution for this?

Please help me.

 

0 Kudos
Message 1 of 5
(2,375 Views)

All your images appear to be U8.  If you are going to do a subtraction, you need to convert them to I16 or even SGL before subtracting to get a valid difference.  In U8, 2-1=1 but 1-2=255.

Randall Pursley
0 Kudos
Message 2 of 5
(2,320 Views)

Thank you very much for your advice!

 

I changed the Image Pixel from U8 to I16 for Image to Array VI.

However, this time, whatever the two images are,   the subtracted image will be all black image.

What happened...?

 

0 Kudos
Message 3 of 5
(2,300 Views)

Hi mk316, 

 

How about if you use float instead of I16 from IMAQ Image to Array VI?

Based on your intensity graph, black color represents 0. It seems that no subtraction was done.

 

Are you sure that you have correctly acquired the image before changing it to Array?

Are you able to see the image from Image indicator?

 

How about you view the result from Image to Array VI first by placing array indicator.

Are you able to see correct number?

 

Thanks and best regards,

Zikri

0 Kudos
Message 4 of 5
(2,280 Views)

Did you do it like this?  Make sure you set the Intensity Graph to Autoscale Z.

 

SubtractImages.png

Randall Pursley
Message 5 of 5
(2,259 Views)