# Detection of blurry object

I have a series of very similar images (8bit gray-scale, png) where I track an object. The problem is that it is blurry and its brightness is comparable to the background.

Below is the code how I am detecting the objects' center of intensity.

How can the detection be improved?

As you see I am using manually the number of pixels (8) in DeleteSmallComponents which has to be adjusted for each image set (if the contrast or/and background changes).

image:

imageNegated=ColorNegate[image];

t=FindThreshold[imageNegated,Method->"Entropy"];
binImage=Binarize[imageNegated,t];

binImage2=DeleteSmallComponents[binImage,8];
objectImage=ImageMultiply[image,binImage2];

coordinate=ComponentMeasurements[objectImage,"IntensityCentroid"];

Show[image,Graphics[{Red,Point[coordinate[[All,2]]]}]]


result:

• What happens if you manually find the pixel for the first image, and then use ImageFeatureTrack to find it in the rest of the images? – Jason B. Jun 29 '16 at 13:44
• @JasonB: This is a very interesting idea. I only wonder what would happen for another case with many objects and when in an image in between one of the objects would not be seen or occur in addition (can happen in experiments). Probably ImageFeatureTrack works like Nearest and then it might be that everything goes wrong ... I will try this out. What do you think about the detection process which I use? – mrz Jun 29 '16 at 14:11
• To find a solution it would be good to have a second Image that represents a set of Images where you had to adjust the 8. For this given Image DeleteSmallComponents works fine without the 8. Then I can check different strategies if they work without Manual adjustments. – Eisbär Jun 30 '16 at 13:35
• @JasonB: See mathematica.stackexchange.com/questions/120039/… – mrz Jul 5 '16 at 21:24