Re: Camera resolution settings
- From: Kris <Kris@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 8 Sep 2008 08:34:20 -0700
This is my camerea info
biWidth: 240
biHeight: 320
biPlanes: 1
biBitCount: 12
biSizeImage: 115200 (240X320) X 12 / 8
biCompression: YV12
So if one of my samples is 115200 in bytes. How do I know where the Y,
U and V starts?
"Tim Roberts" wrote:
Kris <Kris@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:.
"Alessandro Angeli" wrote:
scale the frames yourself. You can use the 320x240
resolution and easily halve it in both directions.
YV12 is just as easy as RGB:
http://msdn.microsoft.com/en-us/library/ms788178(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms867704.aspx
To halve YV12, skip every other scanline in each plane and
only copy every other sample (1 BYTE) of each scanline.
I am very unfamiliar with these formats and how they are layout and work. I
am not certain I understand what exactly you are saying. I had a look at the
code ... but still very confused
A YV12 image is basically made up of 3 smaller images, called "planes". For
a 320x240 image, you will get 320x240 bitmap with 8 bits per pixel for Y,
followed by a 160x120 bitmap with 8 bits per pixel for V, followed by a
160x120 bitmap with 8 bits per pixel for U.
So, to cut that 320x240 image in half, you have to do each plane
separately.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
- Follow-Ups:
- Re: Camera resolution settings
- From: Tim Roberts
- Re: Camera resolution settings
- References:
- Re: Camera resolution settings
- From: Kris
- Re: Camera resolution settings
- From: Tim Roberts
- Re: Camera resolution settings
- Prev by Date: Re: "One shot" mode in SampleGrabber doesn't work
- Next by Date: capture live video in yuv planar format
- Previous by thread: Re: Camera resolution settings
- Next by thread: Re: Camera resolution settings
- Index(es):
Relevant Pages
|