09-09-2013 01:39 AM - edited 09-09-2013 01:39 AM
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.
09-09-2013 02:02 AM
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).
09-09-2013 02:32 AM - edited 09-09-2013 02:33 AM
Nice explanation but I am not using any source or destination, instead I am using local variable to calculate pixel arrays and for comparision
09-09-2013 07:27 AM - edited 09-09-2013 07:29 AM
@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.
09-09-2013 09:49 PM - edited 09-09-2013 09:58 PM
Upload VI in 2011 format. Thanks
09-10-2013 07:38 AM
@Ranjeet_Singh wrote:
Upload VI in 2011 format. Thanks
forum giving me problem uploading a vi today, here is an image.