Tippy tries to implement use the power of OpenCV and Python to fasten Computer Vision prototyping.
The idea is to get as much result as possible with a minimum of code.
This approach to segmentation examines neighboring pixels of initial “seed points” and determines whether the pixel neighbors should be added to the region. The process is iterated on, in the same manner as general data clustering algorithms”
Basically, region growing is an iterative method used to extract similar parts of an image. One or several points are chosen as a start. The region then grows until it is finally blocked by the stop criteria. This criteria is generally an inside/outside region comparison (energy, size, . . .).
Region growing is massively used in medical imaging, and object detection. Here is an example of application in automatic Mine Hunting, which I worked with last year at TNO.
The following method uses one seed point, defined by the user. The region grows by comparing with its neighbourhood. The chosen criteria is in this case a difference between outside pixel’s intensity value and the region’s mean.
The pixel with minimum intensity in the region neighbouhood is chosen to be included. The growing stops as soon as the difference is larger than a threshold.
In this implementation, a 4-connectivity has been chosen. The 8-connectivity should be included soon.
Due to the method itself, only grayscale images may be processed for now. So color images should be converted first.
Here is the input image, the image with the seed point placed, and the final result!
Here is the region growing function implemented in Tippy:
Here is a simple test of the function, using Tippy functions. If you only want to use the function, juste remove the tippy stuff and copy the function in your source.
Please note than OpenCV is needed for the function to work ;)
As you can see, the implementation is rather short in code.
An option has been included to let user interactively choose their seed.
Tippy is available here
As the project is in its very beginning, only a few functions are implemented for now.
But I have a lot more coming for you :).
As you can see in the source, tests are included with each function. Applications notes and examples will shortly be available too.
Finally, there is now proper installer for now. Simply add the tippy folder in your sources and include the files you need.
I would be very pleased to find some co-workers. It would allow the library to grow much faster :). So feel free to fork the project ;)
And (constructive) comments are of course encouraged too !