10-23-2013 04:40 PM
I have two images and I apply IMAQ subtract among these two. Image 1 is much brighter in intensity with respect to Image 2. But, I see a complete black image after the IMAQ subtraction. How can this happen.
Solved! Go to Solution.
10-23-2013 05:15 PM
What are you subtracting from what? Maybe you get negative numbers, coerced to zero?
(sorry, I don't have IMAQ)
10-23-2013 05:19 PM
Image 2 subtracted from Image 1. No it is not zero. I removed the write IMAQ 2.vi and checked the images in the VI front panel. I can see the images. But when I write it to a file (bmp, jpeg, tiff or png) I see only black image.
10-23-2013 10:34 PM
Better Convert both the image into pixel array then subtract it. Later convert this to image.
10-23-2013 10:54 PM
@Ranjeet_Singh wrote:
Better Convert both the image into pixel array then subtract it. Later convert this to image.
What is a pixel array?
10-23-2013 11:14 PM - edited 10-23-2013 11:15 PM
Its a equivalent 2D array of pixel that represent one image. Can be represented in U8, U16,I16 and Float.
As you said you dont have IMAQ so attching image for that
Here it is of array is 640X480 becasue of image of same size.
10-23-2013 11:23 PM
@Ranjeet_Singh wrote:
Its a equivalent 2D array of pixel that represent one image. Can be represented in U8, U16,I16 and Float.
I am just saying that you should be more specific when using strange and unusual nomenclature. If you google "pixel array", you mostly get results about image sensors, which does not seem appropriate here.
Ranjeet_Singh wrote:As you said you dont have IMAQ so attching image for that
Here it is of array is 640X480 becasue of image of same size.
I don't need a solution because I don't have a problem and you don't have to attach any images for me, derailing the thread in the process. The OP does have IMAQ. If you have an IMAQ solution to the subtraction problem, contribute, otherwise simply don't post.
10-23-2013 11:33 PM
Yes its a image pixels. I will be more careful next time
10-23-2013 11:50 PM
abikutn can also refer the image.
abikutn refer the attached VI for calculation of image to image pixel. Simlarly calculate for other and later use IMAQ array to image to convert the subtracted image pixel to image
In my attachment I am first converting image to image pixel and later image pixel to image. In your case input to IMAQ array to image will be subtracted image pixel array
10-24-2013 02:46 AM
I see that you are disposing of the images at the end of the code, which is good, but are you writing the image before that. Have you also checked what the values are in the bitmap, They may appear black but be between 0 and 10 for example. Use the colour picker tool in your drawing package of choice on your bitmap and see what the values are and if they change.
On your actual program are you acquiring 12 bit images that the camera is capable of. If so you will be acquiring 16 bit images and the dynamic display of the IMAQ indicator will come into play. You will also only be able to save correctly in PNG or TIFF.
Mike