Board index » cppbuilder » RGB value problem about ScanLine method

RGB value problem about ScanLine method

If PixelFormat == pf24bit each scanline looks like:

BGRBGRBGR........

Other pixel formats obviously have different byte layouts.

On Sat, 3 Apr 1999 02:31:11 +0800, "Powis" <po...@netvigator.com>
wrote:

Quote
>Dear everybody,

>    i want to ask the ScanLine() method, what is the sequence of the byte
>information of RGB? is R->G->B->R->G.........? or other sequence?

Chris Hill
Chris...@aol.com
 

Re:RGB value problem about ScanLine method


Dear everybody,

    i want to ask the ScanLine() method, what is the sequence of the byte
information of RGB? is R->G->B->R->G.........? or other sequence?

Re:RGB value problem about ScanLine method


Dear everybody,

    i want to ask the ScanLine() method, what is the sequence of the byte
information of RGB? is R->G->B->R->G.........? or other sequence?

Re:RGB value problem about ScanLine method


Dear everybody,

    i want to ask the ScanLine() method, what is the sequence of the byte
information of RGB? is R->G->B->R->G.........? or other sequence?

Re:RGB value problem about ScanLine method


POWIS..

If the image originated from a CCD Camera with Bayer pattern

Then this could be your pattern

line 1  R G R G R G...
line 2  G B G B G B...
line 3  R G R G R G..
line 4  G B G B G B...
repeat..

notice the diamond shape of G.  

Bayer pattern is a very common pattern with CCD'S such as Sony, Kodak...

jung...@aol.com

Quote
Powis wrote:

> Dear everybody,

>     i want to ask the ScanLine() method, what is the sequence of the byte
> information of RGB? is R->G->B->R->G.........? or other sequence?

Re:RGB value problem about ScanLine method


Quote
richard jungert wrote in message <3716AFE7.7293F...@aol.com>...
>POWIS..

>If the image originated from a CCD Camera with Bayer pattern

>Then this could be your pattern

>line 1  R G R G R G...
>line 2  G B G B G B...
>line 3  R G R G R G..
>line 4  G B G B G B...
>repeat..

>notice the diamond shape of G.

>Bayer pattern is a very common pattern with CCD'S such as Sony, Kodak...

>jung...@aol.com

>Powis wrote:

>> Dear everybody,

>>     i want to ask the ScanLine() method, what is the sequence of the byte
>> information of RGB? is R->G->B->R->G.........? or other sequence?

Richard,

Are you sure about that? I mean, I think I know what you mean as far as how
the individual elements of the CCD are arranged to capture various light
frequencies, but by the time the image is translated into a BMP, I'm fairly
certain that the specific CCD encoded info would be translated into a
standard format. Even if the file contained Red-Green-Red-Green-Red-etc-etc
on one line and Blue-Green-Blue-Green-etc-etc on the next line, to a device
reading the file, it will still look like a series of bytes which would
interpreted it as R-G-B-R-G-B-R-G-B-etc. I suppose if that happened you'd
see some really strange color shifts.

My guess is that when the solid state CCD chip is designed, the designers
realize that the green sensing elements are less sensitive than either the
red or blue elements, so perhaps they bias it towards gathering extra green.
But I would bet pretty good money that when they transfer it from the camera
into the computer, the resulting file (if it is 24 bit) will have the
R-G-B-R-G-B pattern we would expect to see in a bmp file.

Am I way off base on this one?

Mike

Re:RGB value problem about ScanLine method


Quote
richard jungert <jung...@aol.com> wrote in message news:3716AFE7.7293FC34@aol.com...
> Then this could be your pattern

> line 1  R G R G R G...
> line 2  G B G B G B...
> line 3  R G R G R G..
> line 4  G B G B G B...

While this may be the CCD sensor pattern, I do not believe this is the Scanline pattern seen in the Windows environment.

The PixelFormat of a bitmap tells the format of the Scanline.  This is documented in the Scanline Tech Note:
www.efg2.com/lab/ImageProcessing/Scanline.htm

efg
_________________________________
efg's Computer Lab:       www.efg2.com/lab
Delphi Books:  www.efg2.com/lab/TechBooks/Delphi.htm

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

Other Threads