Loading...

Virtual drawing (image processing - color tracking)

4,827 views

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Mar 1, 2010

This application is a side-project I developed during my internship in the Carlos III University (UC3M), in Madrid.

It enables to track a moving domain on a video. The domain is defined by its range of color. Here, for instance, the domain is the cap of the pen, and the range of colors is a range of orange (in fact the conditions on the range of colors are made of a minimum and a maximum allowed values for the 3 Hue, Saturation and Value components of the colors, that is 6 thresholds).

Here is how you localize the domain on a frame.
1) We first define the search area. If the domain was not found on the previous picture, the search area is the whole current frame, otherwise it is just the neighborhood of the location of the previous domain.
2) Then, you scan every pixel of the search area in the current frame and see if its color belongs to the allowed range of colors.
3) You will then determine the biggest connected component in the search area. We name this component B.
4) if the domain was not found on the previous frame, then B is the new range. If it was found on the previous frame, we also require B is to be of a similar size (say the same +/- 10% ).

The video below is the output of the HSV filter : a black pixel corresponds to a pixel which did not pass the filter, while a white pixel corresponds to a filter that was in the boundaries. The blue rectangle corresponds to the search area in the picture. The red circle in the bottom right corner means the domain was found in the picture, The red cross across the frame means it wasn't. The red frame appears when the domain was found in the frame, but you are close from the frame borders.

By connecting the centers of the domains on the set of pictures, you can illustrate the movement of the domain, and then "draw".

Get the sources here:
https://github.com/arnaud-ramey/color...

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...