Ask Your Question
0

Java : Convert a binary file (received from Bayer sensor) to a Bayer image and then to an RGB image.

asked 2016-01-10 07:07:45 -0600

ocv_user gravatar image

updated 2016-01-10 07:22:02 -0600

I am receiving a binary file from a Bayer sensor. Every 10 bits in the file represent a pixel. How can I convert the binary file into the raw Bayer image using OpenCV in Java. Later I would also need to convert the Bayer image into the desired grayscale/RGB image. Or can I directly convert the binary file into the grayscale/RGB image ? Any help is appreciated. Thank you so much.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2016-01-10 18:42:04 -0600

In C++ it is cvtColor(raw, bgr, CV_BayerBG2BGR) (there are a lot of CV_Bayer... values), I hope in Java it looks very similar.

edit flag offensive delete link more

Comments

Thank you so much. Yes, I found it. It is Imgproc.cvtColor in Java

ocv_user gravatar imageocv_user ( 2016-01-12 11:41:35 -0600 )edit
0

answered 2016-01-12 11:42:07 -0600

ocv_user gravatar image

It is Imgproc.cvtColor in Java

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-01-10 07:07:45 -0600

Seen: 829 times

Last updated: Jan 12 '16