How do you specify the bayer pattern to use when reading in a raw bayer image #1430
Replies: 2 comments
-
If you look at the bayer coder in ImageMagick here https://github.com/ImageMagick/ImageMagick/blob/4b9321756d3b135bf4c27eb13bc69b3758d5fa76/coders/bayer.c#L298 It looks like the default pattern is RGGB, and it looks like there is no way to specify a different Bayer pattern. Also, it looks like the debayer algorithm is a simplified approach and there doesn't seem to be any way to change the algorithm used like bilinear or VNG or nearest neighbor etc, so unless the base libraries are updated to support things like this, it looks like this is just not possible currently. |
Beta Was this translation helpful? Give feedback.
-
Thanks for doing your own research and getting this information. This is something that should be addressed in the ImageMagick library. If you want support for this I would advise you to find someone who can make these changes for you or create a pull request yourself. |
Beta Was this translation helpful? Give feedback.
-
I have an array of raw bayer pixel data and I'm trying to demosaic or debayer the data.
The data is in the bayer GRBG pattern, but I'm not sure how to specify that pattern.
Is there a define that can be set to communicate the debayer algorithm and the bayer pattern, or are there other properties that can be set directly to communicate those items?
attached is the raw file with the bayer pixel data, but with the extension just changed to txt so that it could be attached. The image is 2750 x 2200 with 8bit depth.
rawBayer.txt
I also asked this question on stackoverflow https://stackoverflow.com/q/76916222/4708150
Beta Was this translation helpful? Give feedback.
All reactions