All of lore.kernel.org
 help / color / mirror / Atom feed
* pixel count doubts
@ 2008-05-16 13:56 Veda N
  2008-05-16 14:35 ` Richard Atterer
  2008-05-16 14:35 ` Roger Oberholtzer
  0 siblings, 2 replies; 3+ messages in thread
From: Veda N @ 2008-05-16 13:56 UTC (permalink / raw)
  To: video4linux-list

Hi,
I am trying to write a camera sensor driver.

The sensor documents says that -
For the resolution VGA, The pixel count is 640x480x3.

I did not understand what is meant by x3 in pixel count.

Usually it is 60x480. The number of bytes per pixel is 2.

Does this mean that instead of 2 bytes per pixel. it is 3 bytes?


How should i account this pixel count in my driver.
How much should be  bytesperline and sizeimage
How should i account this in my application as well.

Regards,
vedan

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pixel count doubts
  2008-05-16 13:56 pixel count doubts Veda N
@ 2008-05-16 14:35 ` Richard Atterer
  2008-05-16 14:35 ` Roger Oberholtzer
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Atterer @ 2008-05-16 14:35 UTC (permalink / raw)
  To: video4linux-list

On Fri, May 16, 2008 at 07:26:27PM +0530, Veda N wrote:
> Hi,
> I am trying to write a camera sensor driver.
> 
> The sensor documents says that -
> For the resolution VGA, The pixel count is 640x480x3.
> 
> I did not understand what is meant by x3 in pixel count.
> 
> Usually it is 60x480. The number of bytes per pixel is 2.
> 
> Does this mean that instead of 2 bytes per pixel. it is 3 bytes?

There isn't really enough information to tell, but probably yes.

Note that it is often the case that a claimed sensor resolution of, say, 
640x480 means that the _Bayer pattern_ resolution is 640x480 - in other 
words, there are that many pixels, but each pixel is only for one of the 
colours red, green or blue, and further interpolation is necessary to get a 
640x480 RGB picture.

So the "640x480x3" /could/ mean "3 subpixels for each image pixel", but I 
strongly doubt it; Foveon sensors are fairly rare in webcams. ;-)

> How should i account this pixel count in my driver.
> How much should be  bytesperline and sizeimage
> How should i account this in my application as well.

I think you will have to play around to see what the exact data format is. 

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key: 888354F7
  | \/¯|  http://atterer.net  |  08A9 7B7D 3D13 3EF2 3D25  D157 79E6 F6DC 8883 54F7
  ¯ '` ¯

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pixel count doubts
  2008-05-16 13:56 pixel count doubts Veda N
  2008-05-16 14:35 ` Richard Atterer
@ 2008-05-16 14:35 ` Roger Oberholtzer
  1 sibling, 0 replies; 3+ messages in thread
From: Roger Oberholtzer @ 2008-05-16 14:35 UTC (permalink / raw)
  To: video4linux-list

On Fri, 2008-05-16 at 19:26 +0530, Veda N wrote:
> Hi,
> I am trying to write a camera sensor driver.
> 
> The sensor documents says that -
> For the resolution VGA, The pixel count is 640x480x3.
> 
> I did not understand what is meant by x3 in pixel count.
> 
> Usually it is 60x480. The number of bytes per pixel is 2.
> 
> Does this mean that instead of 2 bytes per pixel. it is 3 bytes?

Just guessing, as I do not know the exact context, but I am guessing it
is RGB VGA, in which you are probably correct: a byte each for RGB.

> 
> 
> How should i account this pixel count in my driver.
> How much should be  bytesperline and sizeimage
> How should i account this in my application as well.

First decide if your images are RGB. Maybe they are 8-bit? Or maybe
there is an alpha channel? It is up to your application. All are
possible and valid. That is what makes all this so much fun.

> 
> Regards,
> vedan
> 
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list
-- 
Roger Oberholtzer

OPQ Systems / Ramböll RST

Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Office: Int +46 8-615 60 20
Mobile: Int +46 70-815 1696

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-16 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16 13:56 pixel count doubts Veda N
2008-05-16 14:35 ` Richard Atterer
2008-05-16 14:35 ` Roger Oberholtzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.