Re: Camera preview performance
- From: "@sid" <asidden@xxxxxxxxx>
- Date: Wed, 06 Jun 2007 15:42:52 -0000
On Jun 6, 4:34 am, "Gary Daniels [MS]" <gary...@xxxxxxxxxxxxxxxxxxxx>
wrote:
Poor preview performance can be caused by a number of things.
Is the camera driver is outputting a very low frame rate? This one is easy
to fix, just set a higher frame rate when setting the format (as long as a
frame rate is supported by the hardware).
Is there a color conversion between the camera driver format and display
driver format? If there is, see if you can set the camera format to match
the display driver format.
Does the dimensions of the preview window match the dimensions of the image
from the camera? If not it will result in a costly shrinking or stretching
operation to make the camera preview match the window dimension. Select your
resolution to be the closest match to what you need on the screen.
If none of this helps try using the monte carlo profiler to figure out what
functions are using the most cpu. Historically this has been
EmulatedBlt_Internal (if there's stretching or shrinking), or a color
conversion routine.
Gary Daniels
Windows CE Multimedia and Graphics
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
"@sid" <asid...@xxxxxxxxx> wrote in message
news:1181041396.116340.243410@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 5, 10:18 am, Amit <amitranjan@nospam-saskendotcom> wrote:
If you are using DShow and if your source filter supports Preview pin ,
then
use preview pin to render preview.It may help in improving the
performance
--
Thanks and Regards
Amit Ranjan
blog:http://amitranjan.wordpress.com
"@sid" wrote:
Hi, everybody!
I'm developing an application that allows user to capture still images
from device's camera (I don't need video capturing at the moment). So,
the application has preview window, but it's really slow and not quite
usable.
Can anybody provide any information or tips how the preview
performance can be maintained?
Thanks in advance.
Hi, Amit!
Thanks for quick reply!
Did you mean calling RenderStream with CATEGORY_PREVIEW_PIN parameter?
I do it with the following line:
CHK( m_pCaptureGraphBuilder->RenderStream(&PIN_CATEGORY_PREVIEW,
&MEDIATYPE_Video, m_pVideoCaptureFilter, NULL, NULL) );
If not, can you please point me to some articles about your idea or
provide any code snippet?
Thanks
Hi, Gary!
Thanks for your reply.
I'm a newbie to DirectShow so i need more details about your answers.
How can I know that color conversion is taking place?
How can I know current frame rate and list of supported ones?
Any links to useful information or code samples will be greatly
appreciated.
Thanks
.
- Follow-Ups:
- Re: Camera preview performance
- From: Gary Daniels [MS]
- Re: Camera preview performance
- References:
- Camera preview performance
- From: @sid
- Re: Camera preview performance
- From: @sid
- Re: Camera preview performance
- From: Gary Daniels [MS]
- Camera preview performance
- Prev by Date: Re: Receive SMS in binary format
- Next by Date: Re: Signing corporate applications
- Previous by thread: Re: Camera preview performance
- Next by thread: Re: Camera preview performance
- Index(es):
Relevant Pages
|