01-24-2006 10:12 AM
01-24-2006 06:36 PM
01-24-2006 09:10 PM
Hi Chris,
Thank you for your prompt reply and help. Didnt encounter any problem using your program when I use Labview 8 Evaluation. Have studied your program, but could not really understand the comparing part, is the program comparing the picture size or is it the picture data when they are both bmp file?
I am equipped with Labview 7.1 with vision, and i will try to convert and modify your program in it. But I have a concern which is whether the components in version 8 similar to version 7.1?
Thank you again.
Regards,
Tay
01-24-2006 10:14 PM
Hi Tay,
First the program determines the number of pixels in each image and halts if they are not the same (this is the outer most case statement). If they are the same, then it proceed to subtract one image from the other on a pixel by pixel basis, leaving you with an array containing the difference (equal in size to the image). Then the program compares each element in the difference array to 0, this produces an array of booleans (true if the element is zero, false if the element is not zero). If any element in the array is false, the images must not be identical. I converted the booleans to a 0 or a 1 and sum up the array, if the array sum is zero the images must be identical.
Read the online help on the .bmp read VI. You will see that the cluster contains several pieces of information on the image. (Also, the way the color information is encoded in the data is interesting) I extracted the element called "Image", which is the image data. You can get at the size of the image too from the cluster information. Left click on the unbundle by name where is says image, and you can choose any piece of information.
Using the evaluation copy you have of 8.0, use Save as to save as version 7.1, I think you can do that but I have not tried it.
Let me know if I can be of more help,
Chris