Click here to Skip to main content
15,891,850 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everybody, I'm working on a .NET CF 2.0 application that uses the camera, showing the preview and allowing the user to take a photo. I'm using the CameraCaptureDialog component and I wanted to draw a rectangle on the preview screen, but I wasn't able to do it... Any ideas?
Do you think the Overlay mixer filter in DirectShow can be useful? If so, do you have any example? (The problem is I work on the CF 2.0, so many solutions that work ok for the normal framework here don't work...).
Thanks in advance,

Giacomo
Posted
Comments
Sergey Alexandrovich Kryukov 20-Feb-12 13:23pm    
What UI library do you use: WPF, Forms?
--SA

1 solution

Why would you use DirectShow and such a cumbersome and dirty thing as overlay manager? You could use WPF where you don't need anything like that, because WPF itself is based on DirectX.

As I had very similar problems, too, I tried to overlay some WPF UIElements on the video. No problems whatsoever. You can put video in front of any UIElement, you can put any UIElement on top of video, you can make is semi-transparent and see the video through, or anything like that, without any hassles. Besides, there are many other reasons which makes WPF beneficial over Forms, but it strongly depends on your application.

If you are working with .NET for Windows only, where WPF is available, there is no a single reason to use anything else (like Forms). (If you plan to use CLR on other platforms, with Mono, for example, you can use Forms, but WPF is not available; to best of my knowledge, not even planned for development, but with Windows you wouldn't have any problems.)

—SA
 
Share this answer
 
Comments
l3golas 20-Feb-12 17:59pm    
Thank you for your quick answer. Unfortunately I don't know WPF, the applications I'm coding for are not new, that's why I have to use the compact framework 2.0. However I could learn WPF without problems, but the question is this: does it work with .NET Compact Framework as well or it is just a solution for the "normal" framework? If so, does it work with version 2.0 or will I need a newer version? Thanks in advance,

Giacomo
Member 14510315 16-Jul-19 11:07am    
I'm working on android application which require rectangle camera preview. or something like crop live camera preview...is it possible??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900