#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('matplotlib', 'inline') import sys sys.path.insert(0,'..') from IPython.display import HTML,Image,SVG,YouTubeVideo from helpers import header HTML(header()) # # Region based segmentation # # Because edge based segmentation leave contours not closed, one may be interested in searching for regions. # ## Region growing # # Starting from one point of the “object” region and recruiting neighbouring pixels. # ## Split and merge # In[2]: Image('http://homepages.ulb.ac.be/~odebeir/data/quadtree.png') # ### split phase # one define an homogeneity function # # recursive image split: # * if image is homogeneous # * return # * else # * split the image into 4 and apply the test on each sub-image # # ### merge phase # # * for each adjacent sub-image # * if the two grouped regions satisfies the homogeneity criterion, merge the regions # In[3]: Image('http://homepages.ulb.ac.be/~odebeir/data/split_example.png') # >see also: # * Split and merge [DIP](../00-Preface/06-References.ipynb#[DIP]) p.461 # ## the watershed transform # >see also: # * watershed in the [mathematical morphology section](../05-Morphomathematics/03-The watershed transform.ipynb) # In[ ]: