Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect region of least energy in an Image

I want to programmatically place text on an image in an area where there is least "going on". It has been some time since I took Computer-Vision, could someone point me in the right direction. Either with respect to C# or Matlab?

like image 320
maxfridbe Avatar asked Jan 27 '11 17:01

maxfridbe


2 Answers

I suggest dividing the image into distinct regions, each the size of the space you need for the text overlay. Calculate some measure of visual "energy", such as standard deviation, and choose the region with the lowest value. You could also slide a window around, looking for an arbitrary space of low energy, but this would be computationally much more expensive.

like image 109
Predictor Avatar answered Oct 18 '22 19:10

Predictor


If you have the image processing toolbox for Matlab, you can run an entropy filter (ENTROPYFILT) on the image, matching the filter size to the size of your text. Then, all you need to do is find the filter-result with the smallest value, and you have the center of where you want to put the text.

like image 4
Jonas Avatar answered Oct 18 '22 20:10

Jonas