View Full Version : Overlay causes image to be black
June 15, 2011, 21:00:59
I am using image control in labview 2010, along with a DMK 31BU03 camera. I would like to overlay colored lines on the live image but with I execute the attached code my image becomes black. Hoping you can help
June 16, 2011, 09:02:29
I suppose the problem is the dropout color. I suggest to set the dropout color to e.g. magenta (RGB(255,0,255)) and fill the entire overlay one with the dropout color.
A VB6 sample code can be seen here:
June 16, 2011, 15:50:37
I modified my code to do as you suggested. This helped with the problem. However my overlay is not colored on my b/w image from the camera. Is there something else I need to set up?1392
June 16, 2011, 15:57:33
the OverlayBitmap class provides the OverlayBitmap.ColorMode (http://www.imagingcontrol.com/en_US/support/documentation/activex/prop_descOverlayBitmap_ColorMode.htm) for adjusting the color mode.
The color mode you should set is OVERLAY_COLORMODE_COLOR (http://www.imagingcontrol.com/en_US/support/documentation/activex/enum_descrefenum_OverlayColorModes.htm).
June 17, 2011, 22:16:56
If you look at the picture of my code, I am setting the overlaybitmap.colormode. Is there something I need to set when I select the camera?
June 20, 2011, 09:25:31
I am very sorry, I am not used to LabVIEW, therefore I did not saw you already setting the color mode.
Please see the sample I did some years ago. However, it does nearly the same. Maybe its a problem of sequence, because I first set the color more and then enable the overlay bitmap.
June 22, 2011, 21:41:29
I looked at the example code you gave and it is doing the same as what I had written. However upon further investigation I have found the it is something to do with the video format from the camera. I have 3 Imaging Source cameras (DMK 41, DMK 31, DMK72) and the integrated web cam on my laptop. Any of the cameras that has a Y800 video format will not display the overlay in color. The two cameras (DMK72 and web cam) that allow me to select RGB will display the overlay in color. All the above was tried in Labview.
When I try the same cameras with the compiled example "Sample Creating an Overlay" the color mode works. but I did notice that when the color mode is selected the frame counter quits.
So I see that is is possible, but how do I get it to work in Labview?
June 23, 2011, 09:43:32
its a matter of sequence. I order to make the programming fast and easy for me, I did the same in Visual Basic:
ICImagingControl1.Device = "DMx 21BF04"
ICImagingControl1.OverlayBitmap.ColorMode = OVERLAY_COLORMODE_COLOR
ICImagingControl1.OverlayBitmap.Enable = True
ICImagingControl1.OverlayBitmap.DrawLine RGB(255, 0, 0), 10, 10, 200, 200
As you can see, the color mode is set, before the live video was started. I am very sorry, that I did not checked this before.
June 24, 2011, 16:08:49
The sequence made the difference. I changed my code to have the OverlayBitmap.ColorMode set right after the selection of the device and now I have color overlays with the cameras that I have.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.