4
$\begingroup$

Lets say I have two objects very close to each other. There is a colour difference between them, but the difference is small. Therefore when finding contours, both the objects are treated like on object. Is there a way to make the difference in colour more significant? As in exponentially increase the small difference in colour? Or if not possible how would I make these objects stand out from each other?

I am using OpenCV please suggest solutions possible in that library.

Thank You

$\endgroup$
  • 2
    $\begingroup$ Care to share an example, which might help generate better answers? $\endgroup$ – Ivo Flipse Dec 23 '11 at 19:01
1
$\begingroup$

Consider converting the image into L*a*b* color space — colors with subtly-different component values in RGB color space will often have significantly-different a*b* component values in L*a*b* color space.

$\endgroup$
1
$\begingroup$

In case of many imaging - the native contrast can be lower which is why the effective range of brightness (or color) may not be spread fully over the available range of colors.

The best (practically viable) solution and also the most simplest in terms of implementation is called Histogram Equalization. This is useful as an automatic range enhancer and used significantly as a key preprocessing technique across many class of algorithms.

For color images one may apply the same technique on RGB separately but that might break the color integrity due to non linearity of this technique. Alternatively you can probably transform the color space to something like HSV and then stretch H and S separately. Since H represents the true color element very closely - that might help. Though, transformations on HSV space might just be prone to some noise.

See this references:

  1. http://homepages.inf.ed.ac.uk/rbf/HIPR2/histeq.htm
  2. http://fourier.eng.hmc.edu/e161/lectures/contrast_transform/node2.html
  3. (for color) http://www.isical.ac.in/~sarif_r/papers/naik12tip12_hue_preserving.pdf
  4. (for color) http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=202045
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy