Sign in to follow this  
Followers 0
KenE

Overlay onto video preview?

2 posts in this topic

I'm using L|M|TER's Webcam UDF (see this thread) and I'm trying to overlay a GUI graphic object on top of that, but the video preview always blocks the graphic I create. (Graphics are stuck behind.) I've also tried drawing it using GDI+, but whatever I draw is immediately erased by the next video frame. Anyone have any ideas?

For those who want to know why, read on...

I need to be able to take ID photos from a standard webcam. The software I need to get the captured images into only supports portrait oriented photos. The preview image cannot be rotated, so my thought is to just crop off equally from the left and right sides (of a landscape image) to create the correct aspect ratio. The people that will be taking the photos are for the most part non-computer users, so I need to make this really easy for them. Getting them to visually center someone within a frame would not work out, so I need the preview image to accurately reflect what the final saved image will be. From my 640 x 480 image, I need to trim about 140 pixels of the left and right of the preview image. My intent was to just draw over that portion of the screen with a GUI graphic. I also need to leave room in that gui for some button controls. Maybe there is a better way that I haven't thought of yet. Hopefully someone can point me in the right direction!

Share this post


Link to post
Share on other sites



If you don't have a window already, I would suggest making a child window on top of the media player. Then set the extended style to $WS_EX_TOPMOST. Use WinSetTrans to set the overlay transparency. There are examples of hooking the time when the media player moves so the overlay will move too on the forum. By the way, I have never tried something like this with videos, so I don't know exactly what is going to happen. Hope this puts you on your way.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0