The DNG files are created by the camera driver, so this may be a problem with the device's implementation. Can you try RAW in other third party camera applications that support Camera2 and RAW?
Snap Camera HDR (Trial): enable Settings/Other/"Use Camera2 API".
A Better Camera: enable Settings/General settings/More/"Use Camera2 interface".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Found this thread, tried with snap camera hdr trial and the resulting dng has red-blue swapped too.
I guess there is nothing to do?
I can anyway develop them (even if the phone is not mine) using rawtherapee, using channel mixer with red 0R 0G 100B (instead of 100R 0G 0B) and blue 100R 0G 0B (instead of 0R 0G 100B), even if wb and adjustments are a bit more tricky.
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the info. I guess it's either a Huawei bug, or both Open Camera and Snap Camera HDR are doing the same incorrect thing! Not sure if Huawei have any contact/forums to report bugs... Meanwhile I'll update my info at http://opencamera.org.uk/devices.html .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2018-06-06
exiftool -IFD0:CFAPattern2='0 1 1 2' filename "solves" the problem.
Thanks to Morgan_Hardwood for providing a solution!
Actually the "solution" using exiftool is a work-around at most, not a solution!
I wonder whether OpenCamera considers SENSOR_INFO_COLOR_FILTER_ARRANGEMENT correctly. I'm no developer, but I was looking for that type of info that might be relevant for the problem...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Note that the DNG files are created by the camera driver - so Open Camera doesn't consider those flags at all. This may be the cause of the bug for Huawei's driver though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, is there a chance to compare the filter arrangement reported with the filter arrangement in the DNG file, and preferrable try to fix things (i.e. postprocessing the DNG to make it correct). Also a warning could pop up that the DNG file produced by the camera seems incorrect. And may be publish a list of incorrect camera drivers in the App info (to make manufacturers and customers more aware of the problem)? Or maybe a separate DNGfix utility that can run on the phone?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I try to keep notes of device specific issues at http://opencamera.org.uk/devices.html , which I've updated to contain info about this issue. Having warnings in Open Camera itself has the risk that issues can sometimes vary between even different variants of a device, or come and go with things like OS updates. So I've stuck with just the generic warning for Camera2 API.
A utility to fix it up sounds good, but I don't have any Huawei devices to properly test it with (or time to write it! :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just an update: The Huawei P10 Lite got an update to Android 8.0, and with the January 2019 update (HUAWEI/WAS-LX1A/HWWAS-H:8.0.0/HUAWEIWAS-LX1A/386(C432):user/release-keys) the problem (CFA Pattern 2: 2 1 1 0) is still present. After fixing as described above, the CFA Pattern 2 is: 0 1 1 2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thinking about it (CFA Pattern 2 is different in the DNG file before and after fixing it), it seems OpenCamera could actually fix this (instead of the user) also.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Assuming OpenCamera could fix bad channels before saving (maybe just change the CFA Pattern), I had this idea:
If a user suspects that the channels are not correct, OpenCamera could auto-detect the channel by taking a shot of a gray target (using AWB): OpenCamera could identify the channels by their contribution to gray (red 30%, green 59%, and blue 11%).
What do you think?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The DNG files are created by the camera driver, so this may be a problem with the device's implementation. Can you try RAW in other third party camera applications that support Camera2 and RAW?
Snap Camera HDR (Trial): enable Settings/Other/"Use Camera2 API".
A Better Camera: enable Settings/General settings/More/"Use Camera2 interface".
I'm the one who opened https://sourceforge.net/p/opencamera/tickets/431/
Found this thread, tried with snap camera hdr trial and the resulting dng has red-blue swapped too.
I guess there is nothing to do?
I can anyway develop them (even if the phone is not mine) using rawtherapee, using channel mixer with red 0R 0G 100B (instead of 100R 0G 0B) and blue 100R 0G 0B (instead of 0R 0G 100B), even if wb and adjustments are a bit more tricky.
Thank you!
Thanks for the info. I guess it's either a Huawei bug, or both Open Camera and Snap Camera HDR are doing the same incorrect thing! Not sure if Huawei have any contact/forums to report bugs... Meanwhile I'll update my info at http://opencamera.org.uk/devices.html .
exiftool -IFD0:CFAPattern2='0 1 1 2' filename "solves" the problem.
Thanks to Morgan_Hardwood for providing a solution!
https://discuss.pixls.us/t/rb-channel-switch-while-maintaining-raw-data/7824/6
The same picture caputured as JPEG.
Actually the "solution" using exiftool is a work-around at most, not a solution!
I wonder whether OpenCamera considers SENSOR_INFO_COLOR_FILTER_ARRANGEMENT correctly. I'm no developer, but I was looking for that type of info that might be relevant for the problem...
Note that the DNG files are created by the camera driver - so Open Camera doesn't consider those flags at all. This may be the cause of the bug for Huawei's driver though.
OK, is there a chance to compare the filter arrangement reported with the filter arrangement in the DNG file, and preferrable try to fix things (i.e. postprocessing the DNG to make it correct). Also a warning could pop up that the DNG file produced by the camera seems incorrect. And may be publish a list of incorrect camera drivers in the App info (to make manufacturers and customers more aware of the problem)? Or maybe a separate DNGfix utility that can run on the phone?
I try to keep notes of device specific issues at http://opencamera.org.uk/devices.html , which I've updated to contain info about this issue. Having warnings in Open Camera itself has the risk that issues can sometimes vary between even different variants of a device, or come and go with things like OS updates. So I've stuck with just the generic warning for Camera2 API.
A utility to fix it up sounds good, but I don't have any Huawei devices to properly test it with (or time to write it! :)
Just an update: The Huawei P10 Lite got an update to Android 8.0, and with the January 2019 update (HUAWEI/WAS-LX1A/HWWAS-H:8.0.0/HUAWEIWAS-LX1A/386(C432):user/release-keys) the problem (CFA Pattern 2: 2 1 1 0) is still present. After fixing as described above, the CFA Pattern 2 is: 0 1 1 2
Thinking about it (CFA Pattern 2 is different in the DNG file before and after fixing it), it seems OpenCamera could actually fix this (instead of the user) also.
Assuming OpenCamera could fix bad channels before saving (maybe just change the CFA Pattern), I had this idea:
If a user suspects that the channels are not correct, OpenCamera could auto-detect the channel by taking a shot of a gray target (using AWB): OpenCamera could identify the channels by their contribution to gray (red 30%, green 59%, and blue 11%).
What do you think?