Ask Your Question

JoeMagnus's profile - activity

2017-06-20 12:45:13 -0500 commented answer Can´t convert raw grayscale 12 bit picture to color

sorry, the link was a copy&paste error. The real link is: This is a project from my university and i´ve tried to get more information, but i get always the same answer. The only usefull things i know are:
- the black points in the picture are the red channel
- the camera is an aptina camera
- the color of the car in the middle is black
They told me, that the picture is bayer, but after i use any kind of bayer and non-bayer conversion and never get an true color picture, i think, that i have to use some spooky algorithm to converse this picture.
Maybe helps the 12Bit picture to get an answer =)

2017-06-19 19:35:42 -0500 asked a question Can´t convert raw grayscale 12 bit picture to color

i have to convert a raw image to color. My informations about the Image are:
- the color-depth is 12 bit
- i have to use Bayer-Patern to convert it
- one (color) Pixel has 1 value for red in the raw-image and 3 gray values (i have really no idea, how this should work)
You can see a part of the raw-image here: But if i try to debayer it, i get only a 1-color picture like that:
Note: I have this examples already converted to 8Bit. A 12Bit example can you see here:
I use c++ and opencv. My source-code:

Mat iSource(height, width, CVMatType, (char*)pData);
Mat z, zz;
iSource.convertTo(z, CV_MAKETYPE(CV_8U, 1), 0.0625);
cvtColor(z, zz, CV_BayerGB2RGB);

I have also tried to look at values of that parts of the image, where i know which color there should be (traffic-signs).
Where Blue should be, are this values in the raw image: 00 05
05 05

08 08
08 08

0D 56
56 56

11 5F
50 5E

That seems not to be a bayer pattern. Has anybody an idea? Thanks! (sorry for my english!)