Imgproc.cvtColor or Imgproc.demosaicing for Bayer to RGB conversion in OpenCV Java

asked 2016-01-14 04:25:13 -0500

ocv_user gravatar image

Hi, I would like to know :

1)What is the difference between Imgproc.cvtColor(mat1, mat2, Imgproc.COLOR_BayerBG2RGB) and Imgproc.demosaicing(mat1, mat2,Imgproc.COLOR_BayerBG2RGB) when doing conversion from Bayer to RGB ?

2) In the above case, Imgcodecs.imwrite or BufferedImage's getRaster() is suitable for creating the image ? BufferedImage's getRaster() seems to be slower.

3) Bayer image is unsigned. As Java only supports signed data type , so is storing 10-bit Bayer image in short[] the only solution ?

Answers would be appreciated. Thank you.

edit retag flag offensive close merge delete