vigracket icon indicating copy to clipboard operation
vigracket copied to clipboard

More "vision" examples?

Open srfoster opened this issue 6 years ago • 2 comments

This is a cool library! I managed to run a few examples.

Is there anywhere I could find an example of using this library's image processing tools to do some kind of computer vision? For example: Tracking an object. I don't know enough about computer vision to easily see how that would be built out of the tools provided. I'm sure I could figure it out, but an example would certainly speed things up for me. In the mean time, I'll start looking through the vigra docs.

srfoster avatar Jul 11 '18 20:07 srfoster

Hi Stephen, Great to hear that you like the library. It (like the VIGRA itself) does provide building blocks to solve image processing and computer vision problems. However, full solutions like tracking things are currently not part of it.

But the easiest approach, that I could think of w.r.t. tracking objects, would be the following:

  1. Create a subimage of the object, which you want to track on the first image. Make sure it has odd with and height!
  2. Use that subimage as a template on the next image to find the best matching position:
  3. Use the Normalized Fast Cross Correlation image to estimate an image of fitting values (0...1)
  4. On the image of 3. search for the maximum correlation coefficient and its position. There might be some example in the "examples.rkt" already.
  5. If the correlation coefficient is above some value (0.7 ?) cut out the region around the maximum coordinates and used it as the new temple. Proceed with 2. Else, break.

There are of course more sophisticated (and simpler) tracking approaches available using features or image segmentation. But the applicability of these depends on your image data and the movement of the object.

Cheers, Benjamin

BSeppke avatar Jul 13 '18 19:07 BSeppke

Cool. Thanks!

srfoster avatar Jul 16 '18 16:07 srfoster