How to detect Hotspots in an image

2vision2 picture 2vision2 · Feb 11, 2013 · Viewed 8.8k times · Source

How to detect a hotspot in an image using opencv? I have tried googling but couldnt get a clue of it.

Description: I need to filter good images from a live video stream. In this case I need to just detect the Hotspot in a frame. I need to do this in opencv.

What is HotSpot?

Hot spots are shiny areas on a subject’s face which are caused by a flash reflecting off a shiny surface or by uneven lighting. It tends to make the subject look as if they are sweating, which is not a good look.

Update : http://answers.opencv.org/question/7223/hotspots-in-an-image/ http://en.wikipedia.org/wiki/Specular_highlight

The above two links also could help for my Post?

Image with HotSpot:

enter image description here

Image Without HotSpot:

enter image description here

Answer

mmgp picture mmgp · Feb 11, 2013

An automatic rough indication of these "hotspot" areas can be obtained by a gaussian filtering followed by a binarization. The expectation is that the "hotspot" is much brighter than the area around it, so after a gaussian filtering they will be at least slightly highlighted and, at the same time, image artifacts are reduced due to the nature of the low-pass filtering.

Example results follow. Binarization at 0.75 (range is always [0, 1]) after a simple conversion to grayscale, Binarization at 0.85 after a gaussian filtering in the B channel of the HSB colorspace:

enter image description here enter image description here

In both cases large components were removed due to the assumption that "hotspots" aren't too big.