gopro / gpr

General Purpose Raw image format
Apache License 2.0
113 stars 33 forks source link

rggb12p pixel format issues #16

Open schoolpost opened 5 years ago

schoolpost commented 5 years ago

Has this been verified working? if so what format does it expect for a RAW input file?

I've created a 12bit packed byte array and all my outputs have tons of artifacting due to what I imagine is incorrect demosaicing?

my camera's bayer sensor is BGGR so its flipped to match the expected input of RGGB.

It's 3280 x 2464 packed at 12bpp

I can verify my output is correct when I view the same byte array within a custom encoded dng sample.zip

dnewman-gpsw commented 5 years ago

I have confirmed your findings, checking to find what is wrong.

adeelabbas commented 5 years ago

gpr_tools supports following formats: rggb12, rggb12p, [rggb14], gbrg12, gbrg12p. Your camera's format is bggr12p (where p is for packed), which is not supported at the moment.

You could do a flip offline and then feed flipped image to gpr_tools to see if that works.

dnewman-gpsw commented 5 years ago

I'm looking into add the missing formats at the moment.

schoolpost commented 5 years ago

gpr_tools supports following formats: rggb12, rggb12p, [rggb14], gbrg12, gbrg12p. Your camera's format is bggr12p (where p is for packed), which is not supported at the moment.

You could do a flip offline and then feed flipped image to gpr_tools to see if that works.

I'm actually already doing this flip, but even so there seems to be something wrong with the output when open in a RAW viewer.