5

Please have a look at the following 2 images

Image 1

enter image description here

Image 2

enter image description here

In image 1, you can see there is a Mat on wall, and in image2 the mat is missing. Now, I am going to insert the Image1 as the first image and Image2 as the second and going to find what is missing. Then, I need to draw a rectangle above the missing object.

In my program, I will check for this in each and every our.

I can't think about something else than "image difference" which is "absDiff()" method. But I am using this technique for motion detection in the same application, so I am not sure whether the same technique will suit for "Finding Missing objects" (because in that case, how this is going to be different from motion detection" ?

Any ideas about how i can find the missing objects like this?

halfer
  • 19,824
  • 17
  • 99
  • 186
PeakGen
  • 21,894
  • 86
  • 261
  • 463

3 Answers3

1

Well, this is also a kind of motion detection, since you can think the Mat has move out of the scene. If your images are aligned (i.e. if the camera is placed at the same position), image subtraction is a good way to begin with. With this you can have a clue of what objects have appeared or disappeared. Note that this technique is not suitable if you allow your Mat to appear in the image but at a different position.

On the other hand, if you are watching that certain Mat, you can go with object detection, so that if you are not able to detect the object in the image, you can suppose the object has been stolen. You can achieve this by extracting features from an image of the object (e.g. SURF) and matching these later with features extracted from your webcam image. If that black Mat must be always on a white wall, detecting blobs with those colors may be useful as well.

ChronoTrigger
  • 8,459
  • 1
  • 36
  • 57
1

You could try something like looking for points of interest on both images and then look at the areas where are points that were not matched between pictures.

Dino
  • 599
  • 1
  • 9
  • 20
  • Thanks for the reply +1 from me. You mean something like this? http://stackoverflow.com/questions/10168686/algorithm-improvement-for-coca-cola-can-shape-recognition?rq=1 – PeakGen Aug 19 '13 at 16:55
  • I do not remember specifics now, I read about them some time ago (when I was writing my master thesis). These are used in systems that try to convert 2d images to 3d scenes (and not only in these of course). They're mostly some kind of corners with additional specifics that will make it possible to recognize which ones correspond to each other between pictures. This could help find objects that are missing, by looking in places where there are not matched points of interests or by positioning the pictures, so you can compare +/- pixel by pixel where are differences. Hope this helps. – Dino Aug 19 '13 at 19:54
1

Although I am 7 years late to get to this question, but since I was struggling to find the best way to solve this problem for a whole now, I thought I would share this great solution by Adrian Rosebrock at pyimagesearch. He uses the Structural Similarity Index (SSIM) between the two images to find distinct differences (what I needed), and based on the computed differences, he finds the contours to place rectangles around the regions identified as “different”. I find it very effective for a 'template matching' or identifying 'anomalies' in an image when compared to a golden image, which is able to handle missing objects too.

TwinPenguins
  • 475
  • 9
  • 17
  • Pleasure. I investigated further and made it even better, but still have come across other sorts of problems, see this question I asked a few days ago in datascience.stackexchange: https://datascience.stackexchange.com/questions/84709/find-missing-objects-in-image-with-a-priori-knowledge-about-the-missing-object. Maybe this doesn't concern you, but in may case, I am still struggling to locate the 'missing objects' properly. You gotta check out the Structural Similarity Index (SSIM) with TransformECC section for your problem. – TwinPenguins Nov 02 '20 at 10:27