2

Assume we have a photo taken under insufficient lighting condition. The image is darker than usual but still recognizable.

Now we want to make it brighter so it looks like taken under sufficient lighting condition.

Should we convert the image into YUV and tune the Y channel (luminance), or convert to HSL and tune the L channel (brightness)?

The wording seems similar to me, while their formula differs a lot:

Y: 0.299*R + 0.587*G + 0.114*B

L: 0.5*(max + min), while max/min is the max/min value among RGB

EDIT:

More specifically, I am going to use opencv, cv2.cvtColor(), but unsure which input argument better suits my need: BGR2YUV or BGR2HLS

6
  • what does this have to do with programming? Nothing! May 17, 2018 at 4:06
  • This is image processing, why is it not related? @MitchWheat
    – adayoegi
    May 17, 2018 at 4:10
  • image processing is not programming. where is there a coding problem in your question? May 17, 2018 at 4:11
  • @MitchWheat I am going to use opencv, cv2.cvtColor(), but unsure which input argument better suits my need: BGR2YUV or BGR2HLS
    – adayoegi
    May 17, 2018 at 4:23
  • but that is not the actual question you asked, now is it? May 17, 2018 at 4:23

1 Answer 1

1

Tuning just Y and L (in YCbCr and HSL) will result in loosing information, like contrast between high pixel values. I will suggest either using some affine transformation on Y or L

255*(Y(x,y) - min(Y))/(max(Y) - min(Y))

or best would be to use histogram equalisation. It will not only give bright image, but with better contrast also, so it is good for visualisation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.