LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Color code for video acquistion

Hi
 
I am using a black & white camera.Is it possible to color code the video acquisition as we do with images in LabView?
 
Thanks!
 
Deepak
LAB View 2010 SP1
0 Kudos
Message 1 of 6
(4,005 Views)

Hello Deepak,

Thank you for contacting National Instruments.  It sounds like you want to apply a color palette to a grayscale image.  The answer to this question depends on what you are using.  What type of camera do you have, and are you using a frame grabber card?  Do you have NI-IMAQ and/or Vision installed?  Please provide some further detail on your system, and I would be glad to help.

Thanks!

Mike T

National Instruments

0 Kudos
Message 2 of 6
(3,986 Views)
Hi Mike
 
I am using a Panasonic CCTV camera ( model number WV-BP310).It's a black ad while cam and  is rs170.Yes , we do have IMAQ vision.Images that I take from this camera can be converted to colored images by applying a color template in LabView.But I don't find any option of converting a live black and white video to a colored video.
 
Thanks!
 
Have fun
Deepak
LAB View 2010 SP1
0 Kudos
Message 3 of 6
(3,959 Views)

Hello Deepak,

Applying a color template in LabVIEW is the right direction to take.  Depending on what VIs you found to work with, if they take in the purple image datatype, then you can convert live video from grayscale to color.  When a live image is acquired, it is stored in the purple image datatype in LabVIEW.  You can then apply the colorization to the image, and then update the image display all in the same loop.  Therefore, every iteration of the loop would process one frame from the live video.  Keep in mind that a "live video" feed is nothing more than a sequence of frames that are being pulled from the IMAQ card.  The while loop is responsible for running the code necessary to process each frame as they are acquired.

Regards,

Mike T

National Instruments

0 Kudos
Message 4 of 6
(3,942 Views)

Do you have any vis that do this ? I.e. apply a color template to a purple image.Also what do you mean by purple image ?

thanks!

 

Deepak

 

LAB View 2010 SP1
0 Kudos
Message 5 of 6
(3,899 Views)
Hello Deepak,
 
The Example Finder is a great place to go to find relevant IMAQ and Vision example programs.  Simply go to Help >> Find Examples in LabVIEW, and browse to the Hardware Input and Output >> IMAQ folder.  One good example that demonstrates how to acquire video is the HL Grab.VI example in the High-Level folder.  You will notice that there is a While loop in the code.  This is where you will insert your color processing code for every acquired image that comes in from the camera.
 
I found a screenshot of some example code posted in the forums that can supposedly colorize a true grayscale image.  I have the screenshot attached for your reference.  Note two key VIs that are contained in the code are the IMAQ ColorValueToInteger.VI and the IMAQ ArrayToColorImage.VI found on the right side of the block diagram.  These VIs are responsible for translating an array of color palette values into the purple colored image dataype that you can see leaving the IMAQ ArrayToColorImage.VI.  This is the purple datatype that I was referring to.
 
Please give this code a shot, and post back if you have any further questions regarding this issue.
 
Thanks!
 
Mike T
National Instruments
0 Kudos
Message 6 of 6
(3,877 Views)