Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

image acquisition using NI1424

How we can acquire color images? Is there any setting in hardware board or software?I m not able to acquire color images, only monochrome images are being acquired. How to switch to color one?
0 Kudos
Message 1 of 7
(5,289 Views)

Hello speck,

There are several things to be aware of when using doing color image acquisition:

  1. Make sure your camera supports color acquisition.  Many cameras are grayscale only, but regardless this information will be available in the user manual of the camera.

  2. Determine the color mode supported by your camera.  There are at least two likely color modes:

    1. Bayer Encoding – Bayer encoded images are transmitted as grayscale images that must be decoded using the proper algorithm.  This method relies on the values of adjacent pixels to calculate each pixel’s color value.  More information is available in our Developer Zone document, Bayer Encoding for Color Images.  For Bayer decoding in LabVIEW, please take a look at the Snap with Bayer Decoding.vi available through the example finder (In LabVIEW, Help » Find Examples… )

    2. RGB – RGB cameras transmit color information that does not need to be decoded.  Normally, the image has 24 bits for each pixel, 8 bits for red, 8 for green, and 8 for blue.

Because you are getting an image currently, I am assuming these images are Bayer encoded and need decoding.  If it is Bayer encoded, you will need to decode them as demonstrated in the example.

Regards,
Luke H
Applications Engineering
National Instruments

Message Edited by Luke H on 12-28-2006 01:15 PM

Message Edited by Luke H on 12-28-2006 01:16 PM

0 Kudos
Message 2 of 7
(5,272 Views)
Basically we are using CCD sensor(Kodak KAF39000) chip in order to acquire image and then this digitised data is processed through NI1424 and the final image we are observing on Measurement and Automation window after clicking on Grab switch, is monochrome one whereas we are expecting a color image. As ref to ur previous reply, if we have to apply Bayer decoding technique , how and where we have to apply ? Can you please guide us in this?
Regards
0 Kudos
Message 3 of 7
(5,254 Views)
With ref to the camera file(.icd format) we are using in NI1424, we are using RGB color format only but still we are getting monochrome only.Why?
0 Kudos
Message 4 of 7
(5,253 Views)

Hey speck,

It sounds like your CCD sensor is not really sending true color images.  Instead, it seems to be sending Bayer encoded grayscale images.  The Bayer decoding cannot currently (at the time of this post) be done within Measurement and Automation Explorer (MAX).  Bayer encoded images are grayscale images that must be properly decoded to get any color information out of them.  You haven’t mentioned the environment in which you will be developing your final application.  If you are using LabVIEW, please take a look at the Snap with Bayer Decoding.vi that I referenced in my previous post.  This will snap an image and apply Bayer decoding to transform the grayscale image into a color image.  There is also an example for C at the following path, C:\Program Files\National Instruments\NI-IMAQ\Sample\MSVC\Color\BayerDecode.



You can also take a look at Start » Programs » National Instruments » Vision » White Balancing Utility. This will help you determine appropriate gains for each color and the appropriate Bayer pattern.  The help file for this utility also explains a lot about Bayer decoding.



I also took a look at the manufacturer’s page for that camera, KAF-39000 Specifications.  This page shows that it has a really high resolution, something like 40 megapixels.  Depending on your desired frame rate, you may run into throughput issues with this CCD and the PCI bus.  Also, the KAF-39000 Ordering Options page says the CCD is a “Color (Bayer RGB)” CCD.  This tells me that you are most likely getting Bayer encoded images rather than true RGB images.



I hope this helps.  Please continue to post your findings on this thread for the benefit of our users.  Let me know if you have any further questions or concerns on this issue.



Regards,
Luke H

0 Kudos
Message 5 of 7
(5,224 Views)

Hello Mr.Luke!

We have already tried with Snap/Ring With Bayer Decoding.vi . but while using that we are getting error regarding image type and bit depth.

Regards

0 Kudos
Message 6 of 7
(5,210 Views)

Hello speck,


I took a look at that example vi, and I am assuming the error is either coming from the IMAQ Bayer Decode.vi or the IMAQ Create Bayer LUT.vi.  The IMAQ Bayer Decode.vi has inputs named Source Image and Destination Image, if you look in the help file for this vi (right click the vi and click Help), you will find information about the bit depth they are expecting.  The IMAQ Create Bayer LUT.vi has a bit depth input that comes from a property node of the image.  You can put a probe on the wire running to this input by right clicking and clicking Probe.  This will let you know the bit depth of your image.

Also I have a few other questions about your system for future posts:



What image size (width x height) and frame rate is your camera outputting?

What bit depth are you expecting?

Is there any error code associated with this error?

What specifically does the error say?

What version of LabVIEW and what version of IMAQ are you using?

The more information you provide to the discussion forum, the better help we will be able to provide.

Regards,
Luke H

0 Kudos
Message 7 of 7
(5,183 Views)