Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Why is brightness changing when using the Malvar algorithm? #33

Closed
song4me opened this issue Jul 11, 2021 · 4 comments
Closed

Why is brightness changing when using the Malvar algorithm? #33

song4me opened this issue Jul 11, 2021 · 4 comments

Comments

@song4me
Copy link

song4me commented Jul 11, 2021

Hi,
When using the Malvar algorithm I get an output image which is much brighter than the original input image.
This change is different for different images. What is the reason this happens?

@KelSolaar
Copy link
Member

Hi @song4me,

How are you reading the image? Is it a linear floating-point image in [0, 1] range?

Cheers,

Thomas

@song4me
Copy link
Author

song4me commented Jul 12, 2021

Hi Thomas,
Thanks for your quick reply.
I read the image using colour.io.read_image and indeed got a linear floating-point image in the range of [0, 1].
I disabled the eotf_inverse_sRGB function (which was causing some of the brightness change and is not needed for me), but there's still a slight change in colors which I can't trace.

The code I'm using is the one below

IMAGE = colour.io.read_image('in.bmp')
im_out = colour_demosaicing.demosaicing_CFA_Bayer_Malvar2004(IMAGE, pattern='RGGB')
colour.io.write_image(im_out, 'out.bmp')

Thanks,
Shirley

@KelSolaar
Copy link
Member

Hello,

Would you have an example and/or the source image?

Cheers,

Thokas

@song4me
Copy link
Author

song4me commented Jul 14, 2021

Hi,
I'm attaching the input :
in
Result with opencv (for color comparison)
dbyr_opencv
Results with Malvar from the colour demosaicing lib:
dbyr_malvar
thanks

@KelSolaar KelSolaar changed the title Brightness change when using the Malvar algo Why is brightness changing when using the Malvar algorithm? Jul 14, 2021
@colour-science colour-science locked and limited conversation to collaborators Jul 14, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants