PDA

View Full Version : partly displaying overlays



grizli
July 18, 2008, 08:50:02
Hi all.
I'm evaluating ICImageControl 3 for a project we develop, and overlays are a major part of the project.
I've looked at the "create an overlay" sample, and at the movable crosshairs snippet, written my own code, and still I have the following problem:
the overlays display correctly only when I set the overlayBitmap mode to grayscale. at first I thought i messed up in my own code, but running "movable crosshairs " I noticed the same with one exception - on color mode I can place crosses only at the lower fifth of the video pane. it's as if it clears anything with a Y setting of 460 or smaller. for the record I'm grabbing from a commell TCC6802 grabber, and the video input is PAL-B 720X576 at RGB24. since the snippet defaults to 640X480 I had to resize the window to show all the video image, but I can place crosses only on the lower part (that was uncovered by the resize) , but not on the right side, that was also uncovered by the resize.

I'de appreciate any inputs
thanks
Aviv
NorthernCat LTD

Sascha Schmidt
July 18, 2008, 17:17:19
Hi grizli,

can you send me a sample program, which illustrates your problem?
Then I can better reconstruct it...

grizli
July 18, 2008, 22:25:44
hi sascha .
the Movable crosshairs snippet unaltered produces the color screenshot. notice how the crosses are sort of cut of anywhere the value is lower than 360. the overlay appears only in the y = 360:480 strip. please believe me I clicked on the higher part of that image as well. the grayscale image is the same snippet with an altered line changing overlayBitmaps.ColorMode to grayscale. the crosses appear on the whole screen with no problem, as seen in the grayscale screenshot.

I'm using TCC MP6802 D21 frame grabber, the video Norm is PAL - B, the format is RGB24(640X480). the video itself allows RGB24(720X576), and there I get the same problem, only the visible overlay part is from y=470 to y=576

thanks

grizli
July 19, 2008, 00:34:34
Hi
one more development: the phenomenon appears on RGB24 and RGB555, but overlays display correctly on YUY2. on the other hand, RGB24 gives a better image quality. any ideas? sascha? anyone?

cheers

Stefan Geissler
July 21, 2008, 09:55:03
Good Morning.

It seems to me, that the RGB formats are internally wrong, thus the height of the Overlaybitmap object is only 120 pixel instead of 480. If the YUY2 format is in use, then it seems, the format has the correct paramters. The problem can be caused by the driver of your grabber.

What type is the gray scale format?

grizli
July 21, 2008, 10:05:52
Hi Stefan.
since I have other issues with the grabber driver (such as having to disable and then enable the device each time I play and stop, before I can play again) I'll totally believe the driver option. is there anything I can do without changing the grabber (project requirements....). about the grayscale, it's not that I use grayscale format, it's simply changing the OverlayBitmap color mode from Color to Grayscale. I'm still running the same formats.

Stefan Geissler
July 21, 2008, 10:18:20
Hello,


such as having to disable and then enable the device each time I play and stop, before I can play again
This sounds for not freed resources or something other, that has not be programmed correctly. It there a newer driver version available?


is there anything I can do without changing the grabber (project requirements....)
A very good question, that I am not able to answer correctly, because I do not know this grabber. At least, you may have to live with this workaround. Is there anyway to avoid the stop/start sequences? E.g: Usually you can change the input channels without stopping the live video stream.


about the grayscale, it's not that I use grayscale format, it's simply changing the OverlayBitmap color mode from Color to Grayscale. I'm still running the same formats.

I think, we correct the format internally, thus the overlay will receive the correct sizes. Thus I suggest to use the YUY2 format.

grizli
July 21, 2008, 10:31:35
thanks for the speedy reply :-)

unfortunately, there is no new driver, I am in correspondence with the grabber company as well, Now I'll add the request for correct overlay sizes...

the grabber is a part of an operational system, I can't just tell the clients "don't switch this off". that problem occurs in the grabber preview application as well, so that's totally their fault, and will have to be resolved.

the RGB24 and the RGB555 (in both of which I have the overlay problem) give better image quality than YUY2 so I'll stay with YUY2 if I have to but I'd really rather use the RGB24, the app is sort of a aiming sight, so image quality IS an issue.

can I set the overlayBitmap size myself? can I assign a custom overlay and use it instead of the grabber assigned ones?

Stefan Geissler
July 21, 2008, 10:43:31
You should tell them to check the AM_MEDIA_TYPE structure.

The size of the Overlaybitmap, which is in fact an HBITMAP of the same size as the video format, can not be changed manually.


I can't just tell the clients "don't switch this off".
I understand. :-)