Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output for DeBayer2 with Bilinear type seems to be incorrect. #23

Closed
shenxinyu1999 opened this issue Jan 11, 2023 · 4 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@shenxinyu1999
Copy link

The result of G-R order using bilinear has a similar color to G-B order using DDFAPD and vice versa.
I have implemented a bilinear demosaicing program so I think the problem lies in the bilinear type.

@jpsacha
Copy link
Member

jpsacha commented Jan 14, 2023

can you provide steps to reproduce the issue?

@shenxinyu1999
Copy link
Author

OS: Windows 11
ImageJ version: 1.53t + Java 1.8.0_345(64 bit)

Raw Image I use: https://drive.google.com/file/d/1zvVSZ7u18qcHDGW6ZOo-nqcTXdAYwiey/view?usp=share_link

  1. Open the raw image. Image type: 8-bit, width: 420, height: 288
  2. From plugins, choose Raw Processing > DeBayer2
  3. Set the options to G-R and Bilinear, click OK
  4. In the result the color of the house is more greenish
  5. Repeat with demosaicing type set to DDFAPD with Refining
  6. In the result the color of the house is yellowish.
  7. Repeat with order of first row set to G-B, and demosaicing type set to each. The results are opposite.

@jpsacha jpsacha added the bug Something isn't working label Jan 15, 2023
@jpsacha jpsacha added this to the v.1.3.4 milestone Jan 15, 2023
@jpsacha
Copy link
Member

jpsacha commented Jan 15, 2023

Thanks for a clear example of the issue. Looks that there is a bug in encoding demosaicing type from a name, like "G-R" to an integer used by the Bayer1 part of the code implementing: replication, bilinear, etc. "G-B" and "G-R" have they values switched. I will fix it soon.

jpsacha added a commit that referenced this issue Jan 15, 2023
…Bayer1 algorithms #23

MosaicOrder enum has swapped values
@jpsacha
Copy link
Member

jpsacha commented Jan 15, 2023

@jpsacha jpsacha closed this as completed Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants