Search for contrast objects in the picture

There is an image, there are eye-catching objects on it, red on green, dark on light, and the like. It is not known in advance what and what color.

As an example: a gray car on the background of a forest.

I need to recognize that this object contrasts against the background of the forest and highlight it.
There are a lot of lessons on OpenCV, but most involve searching for contours, which requires conversion to gray format, and contrast is lost in it and the car stops standing out.
I.e., it turns out that the object is perfectly visible in color, here it is, take it and highlight. But when switching to gray, it is lost and the use of various filters does not help.

There are also lessons where masks are made by color, but again, I don’t know the colors in advance, I just need to find an object that contrast out from the rest.

Can you tell me which way to see?

Below is an example. It is not the car that needs to be found, but the object itself that stands out. In this case, white on green. (we need a method for searching for a contrasting object, i.e. there can also be an object of any color on a background of any color, the main thing is that it contrasts and it is clearly noticeable in colored)

this needs DL/AI. nothing less will do.

The usual types of models for this are:

  • anything involving “saliency”, if it’s powerful enough (involves DL)
  • image captioning (“image to text”)
  • object detection, either with specific classes, or by “objectness”
  • semantic segmentation
  • instance segmentation

terms in quotes are technical terms you can expect to find used in the literature.


1 Like