image segmentation emulating ecognition source code in vc6 图像分割算法模仿FENA

Attention: The documentation and code and executables of this project has been moved to [here](https://github.com/JzHuai0108/ImageSegmentor). 

 

 

I have been developing a program aimed at image segmentation for almost two years. The segmentation method proposed and implemented in ecognition, multiresolution segmentation (MRS) is found to be among the best. In order to segment images as accurate as MRS, I studied such documents as ecognition user guide 4.0 and paper Hybrid image segmentation using watersheds and fast region merging and implementation of a fast algorithm for segmentation sar imagery. These documents inspired me to a new way to implement a new segmentation method similar to MRS in ecognition.

The program I uploaded named image segmentor is my piece of work to segment images. I will briefly discuss how to use it and the underlying rationales.

 

There are several method to choose for segmentation, which are shown under menu seg: quad tree, graphseg, hierclust, graphseg-hierclust and quadtree-hierclust. Actually, the first 3 are basic components. Graphseg is actually graph based segmentation method in paper efficient graph based image segmentation.

Quad tree is a segmentation method using quadtree which merges four blocks successively from bottom to top. Hierclust(HC) has two types, the first using merging sequence sorted by dither matrix, the other using iteratively merging region sequence sorted by homogeneity. The first HC simulated MRS in ecognition, and details are found in userguide 4.0. The other HC is similar to the merging method in Hybrid image segmentation using watersheds and fast region merging. It is quite obvious that graph seg-HC is the method to segment image first by applying graphseg and subsequently applying Hierclust. So is Quadtree-HC.

To set parameters, seg>set parameters, K decides the size of image objects in graph seg, and minimum size decides the smallest size of objects to eliminated in graph based seg, MaxDelta is used in quadtree segmentation and influences the size of objects after quadtree seg, the larger maxdelta, the bigger image objects. Scale parameter also decides the image object size in hierclust sorted by dither matrix. Larger value of scale parameter leads to larger objects. Spectral weight and compact weight vary from (0,1]. The last parameter loop is a little complicated for convenience in implementation. When sorted by dither matrix, loop is the number of cycles to run during hierclust. When sorted by homogeneity, loop is the number of regions after hierclust. And the weight for image layers can be set in the last field.

After setting parameters, click on method to segment image under menu seg. After segmentation, click to see a particular object in an opencv window.

Then use the command regprop under classify to compute the geometry features for objects and review these features with command preview on the same menu. Only a section of the image is displayed to show the feature values. The slider in the following dialog can illustrates the distribution of features.

If you want to save results, save object mean on menu seg can many features of objects in segmentation such as layer mean and geometry features. The contour image command on the same menu can save the segmentation image with contour as bmp format. Please enter the full name for file to save in the name filed of save dialog, such as xxx.bmp. Otherwise, it may fail.

For more details, please refer to 1, 基于邻接图的面向对象遥感图像分割算法; 2, 一种边界引导的多尺度高分辨率遥感图像分割方法, 3, An Improved Hierarchical Segmentation Method for Remote Sensing images.

The code is open to change and liable to have bugs. Take care to use it. Please mention reference to these papers above if you use the code provided along with this piece of text.

 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 15
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 15
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值