Site Sponsors
Results 1 to 6 of 6

Thread: RGB values from 8bit pixel

  1. #1
    faisaldj
    Guest

    RGB values from 8bit pixel

    Hi,


    I have selected the color type in my camera as follows


    8-bit Colour (RAW, 332(RGB))


    can somebody guide me a little bit to write the c or c++ code to get
    the rgb values of the pixel.


    with regards,
    Muhammad Faisal.

  2. #2
    Subscriber Member TRSmith's Avatar
    Join Date
    Dec 2007
    Location
    Central Maine, U.S.A.
    Posts
    2,406
    Post Thanks / Like
    Images
    9

    Re: RGB values from 8bit pixel

    The eyedropper in the info box of Photoshop will do that for you without having to write any code. Simply click and hold the eyedropper icon in the color box and select RGB. After that, wherever you put your mouse pointer you will see the values displayed in the info box for the pixel directly beneath the mouse pointer.

  3. #3
    Administrator Bob's Avatar
    Join Date
    Oct 2007
    Location
    Prescott, Arizona
    Posts
    4,492
    Post Thanks / Like
    Images
    367

    Re: RGB values from 8bit pixel

    It depends on the fprmat your camera uses.
    There is some limited documentation available on the web some some camera formats. Canon and dng are probably the best documented.
    Of course, the raw format is usually a pixel array that has been bayer encoded and as such does not actually have an rgb value until converted.
    thanks
    -bob

  4. #4
    faisaldj
    Guest

    Re: RGB values from 8bit pixel

    Actually I want to process this data through microcontroller thats why I want to write a c or c++ code


    with regards,
    faisal

  5. #5
    Member
    Join Date
    Apr 2010
    Location
    Somerset - UK
    Posts
    92
    Post Thanks / Like

    Re: RGB values from 8bit pixel

    Hi Faisal,

    You can probably find some clues on Dave Coffin's site http://www.cybercom.net/~dcoffin/dcraw/

    Best wishes,

    Ray

  6. #6
    Senior Member Lars's Avatar
    Join Date
    Nov 2007
    Location
    Sunnyvale, California
    Posts
    1,811
    Post Thanks / Like
    Images
    19

    Re: RGB values from 8bit pixel

    Yep Ray is right DCRAW i a good start. you can also look at the LIBRAW open source project that wraps and extends DCRAW a bit.

    Finally, in case you haven't, this is a good time to read up on color science. Bruce Lindbloom's site is a good reference, but there is lots of material on color science out there.
    Monochrome: http://mochro.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •