First time here? Check out the FAQ!

Ask Your Question
7

Color constancy in different illumination condition

asked Mar 12 '13

berak gravatar image

updated Nov 30 '0

Hi all. In a paper I'm reading is written: "RGB images taken from the camera are first passed through a pre-processing stage which helps to maintain the colour constancy in different illumination conditions." (focus is road signs recognition in a real time system). Is there a method in OpenCV to do this?

Best regards Costantino

Preview: (hide)

Comments

3

please accept my apologies, i accidentally deleted your question, instead of my comment ;(

berak gravatar imageberak (Mar 12 '13)edit
1

Ahaha :-)

Happens :-) You can delete this comment too - but just pay attention to not delete the question again XD I hope i don't cross the line here - i just feeling funny right now XD

holger gravatar imageholger (Sep 28 '19)edit

2 answers

Sort by » oldest newest most voted
8

answered Mar 13 '13

The standard way of handling this variation is by performing a normalization of the lightning.

  • The easiest way is to use cv::equalizeHist / cvEqualizeHist. This will equilize the contrast over the input images.
  • Gamma correction can be done using cv::pow / cvPow
  • Difference of Gaussian approach can be done with cv::gaussianBlur / cvSmooth to get two different images then use cv::sub / cvSub to get the Difference of Gaussian.

But there are many other ways (including a Contrast Stretch, a Log filter, CLAHE, or even White Color Balancing or Retinex), that can work better or worse depending on your opinion and your project.

Some guidance:

Preview: (hide)

Comments

1

Thanks for the reply.

Costantino

Costantino gravatar imageCostantino (Mar 13 '13)edit

Aha Hmm Hmm Nods and pretends he understands :-)

holger gravatar imageholger (Sep 28 '19)edit
8

answered May 7 '13

You can check this paper:

Tan, X., and Triggs, B. "Enhanced local texture feature sets for face recognition under difficult lighting conditions.". IEEE Transactions on Image Processing 19 (2010), 1635–650.

Source code is here

Preview: (hide)

Comments

Thanks a lot Costantino

Costantino gravatar imageCostantino (May 14 '13)edit

Thanks for the source code! Awesome

Entreco gravatar imageEntreco (May 15 '13)edit

Question Tools

4 followers

Stats

Asked: Mar 12 '13

Seen: 8,586 times

Last updated: Oct 14 '14