Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Add

I am trying to add a lot of immages into one. The problem is that I am saturating the image while adding. When I try to make the destination image a float, the source is I16, the add VI complains that the images are incompatible. Is there some workaround that I can do? I can try casting the I16's into Float, but that would be a whole lot of casting.
0 Kudos
Message 1 of 4
(3,416 Views)
How many bits do the original images have? I assume they are 10 or 12 bit images. What I would do is first add them together until they get close to 16 bits. For 10 bit images, you could add 32 images without overflow. For 12 bit, you could add 8 images before overflow.

Once the images are close to overflow, you need to reduce the number of significant digits. You can either divide by a power of two to move the bits over, or divide by the number of images remaining. You can then finish adding the images.

Another method might be to use image to array, use bit shifting to do a fast power of two divide, then convert back to an image. I don't know if that would be faster or slower than the IMAQ divide.

This keeps everything in I16 format, which will
keep things manageable, fast and should provide plenty of bit resolution.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 4
(3,416 Views)
I reread my answer and realized some details were not clear.

First combine the images in groups of 32 or 8, which will result in a much smaller number of images that are full 16 bit images. Then reduce the bit depth of each combined image and repeat the process.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 4
(3,416 Views)
Him yes certainly there would be incompatibility there. You probably need to average instead of simply adding to get the peak out. An nice article at LTR which came out as free download discusses this issue suggest you logged on LabVIEW Techinical Resource website and read on.
Bernardino Jerez Buenaobra
Senior Test and Systems Development Engineer
Test and Systems Development Group
Integrated Microelectronics Inc.- Philippines
Telephone:+632772-4941-43
Fax/Data: +632772-4944
URL: http://www.imiphil.com/our_location.html
email: Bernardino.Buenaobra@ph.global-imi.com
0 Kudos
Message 4 of 4
(3,416 Views)