LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image indicator changing automatically

I want to compare two different images by subtracting their array of pixels value. Steps are as follows,

1. Captutre the image

2. Read stored image

3. Compare both images.

 

But what is happening is when I press compare from the front panel then both read and captured image will become same and both arrays will have same values.

Later I found is if in one VI there is one image and later if I copy any other image then previous image will change to new image.

 

What is the justification? How can I stop it. 

 

 

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 1 of 6
(3,512 Views)

Wires that carry image data in LabVIEW (purple wires) sort of go against the LabVIEW paradigm because they are passing a reference to an image in memory, not the image itself.  This makes working with large chunks of data more efficient, but it also means that if you split an image reference wire and run it into two different functions, those two functions operate on the same exact data.  If you want create a copy of the image data to run through a seperate function, you have to create a new image with the IMAQ Create vi and copy the image with IMAQ Copy.  Make sure the original image is wired into the "Image Src" (source) and the new image is wired into the "Image Dst" (destination).

Message 2 of 6
(3,501 Views)

Nice explanation but I am not using any source or destination, instead I am using local variable to calculate pixel arrays and for comparision

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 6
(3,490 Views)

@Ranjeet_Singh wrote:

Nice explanation but I am not using any source or destination, instead I am using local variable to calculate pixel arrays and for comparision


Hi Ranjeet,

It may be that image is not been upadated properly during image display as JKMM suggessted please try conencting the image Dst to a new image .something like this.

hope this helps.

 

 

0 Kudos
Message 4 of 6
(3,461 Views)

Upload VI in 2011 format. Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 6
(3,437 Views)

@Ranjeet_Singh wrote:

Upload VI in 2011 format. Thanks


forum giving me problem uploading a vi today, here is an image.

0 Kudos
Message 6 of 6
(3,410 Views)