CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Location
    India, Bangalore
    Posts
    157

    Arrow How to convert the Bayer image data to Color image

    Hi all

    How to convert the 8 bit Bayer image data of bmp to 24bit Colored image in vb6.0.
    The bayer image data is sent to Vb from h/w, How to add header for this 24bit colored image.
    And h/w sends me the 8bit bayer image data of different sizeses(ex:-16X16, 504X664, 81X98 etc) any size
    the h/w can send but my vb program should convert it to 24bit bmp image.


    And i have to add the header for these 8 bit Bayer image data and convert it to 24bit Colored image

    The 8 bit Bayer image data comes to me continuously for every image data which comes to vb, gets just 5seconds delay.

    Plz help me friends
    And i need to do it early, its too urgent

    Thanks in advance
    Seema
    Prity

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: How to convert the Bayer image data to Color image

    Not a clue on this one.

    I am curious though why you would want to take an 8 bit image and make it a 24 bit, 24 bit files are much much larger and you still have the same picture.

  3. #3
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: How to convert the Bayer image data to Color image

    The bayer image format looks very different to a bmp, because it is a direct output from an image sensor.
    Look here to understand what a bayer image comprises, and tell me ig this is what you have.

    http://www.siliconimaging.com/RGB%20Bayer.htm

    To convert this to a color pixel format an interpolation process has to be executed.
    Usually I wold now say VB is not good for a job like that, because it could be too slow, as you say you hace 5 seconds between images.

    As far as I know, many cameras come with an API, which usually comprises some dlls which provide callable functions for programmers to use in their software.
    If your camera was not equipped with such a software programming support, we should rather do some research for some available graphic libraries which have functions like bayer-to-bitmap available.

    I don't know much about the algorithm how to convert bayer to bmp, but if we had a library which would at least perform a transformation from bayer to color bitmap, we could produce a bmp header and write a bmp file from that.

  4. #4
    Join Date
    Jun 2008
    Location
    India, Bangalore
    Posts
    157

    Arrow Re: How to convert the Bayer image data to Color image

    Hi WOF
    On h/w side they told me that they are not using any API's
    The camera is created by our company only.....
    Prity

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured