ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ absolute difference issue

Hi all,

Have a look a the attached VI (LV 8.20).

Here is what it does :
    1. creates 3 8-bit grayscale images (A, B, sous)
    2. sets images sites (same size for the 3)
    3. fill each image with a different gray level (the 3 levels are setable)
    4. perform an IMAQ absolute difference "abs(A - B) = sous"

With the default values I set ( 200 for image A, 50 for image B, and 0 for image sous) at the end the result is, as I expect :
    A is still at 200
    B is still at 50
    sous is at 150

Now if I set :                                                 I expect :                           instead I get :
    A any level between 0 and 255                  A still at anything                  A at anything
    B level = 0                                                  B still at 0                             B at anything
    sous level = 0                                             sous at anything                  sous at anything

Is there a good reason for this Smiley Surprised ?


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 1 of 3
(3,604 Views)
Hi,

The problem in your VI is the name of your images.
Indeed, when you take A=255 B=0 and sous=0, the images B and sous have the same name and consequently you have the following result :B=sous=0
Take care to give different names to your images as attached in this post.

Sincerly,

Olivier
Message 2 of 3
(3,582 Views)
wooops... indeed Smiley Surprised

thanks for your help... sometimes I get so focus on the process that I completely miss everything... Smiley Mad


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 3
(3,576 Views)