文件名称:Image-segmentation-code
- 所属分类:
- 图形图像处理(光照,映射..)
- 资源属性:
- [Text]
- 上传时间:
- 2013-06-12
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- 吴*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
Cutpicture(form)做的是直方图统计:
第一步:读入图片,并将彩色图片用公式转化为灰度图像。
第二步:用区域生长法将图片分块并对每一块做直方图统计,用广度优先搜索完成,子程序是int flood_fill()。返回值是区域内的点的数量。判断是否属于同一块区域的条件是前面搜索得到的灰度平均值是否大于给定阈值(即threshold,由用户输入决定)。
第三步:任意两块区域对区域直方图的每个色阶比例的差的绝对值求和,若和小于阈值(即threshold2,由用户输入决定)则合并两块区域.区域绝对值求和的子程序为void statistics(),用于合并块的子程序为void combine(int obj1,int obj2)。
第四步:将占总面积1/10以上的块号输出,由用户决定要选哪一块做为最后需要的图片,并输出合并的块的数量。最后输出图像。-Cutpicture (form) do the histogram statistics:
The first step: read into the picture, and the color image into gray image using the formula.
The second step: the picture into blocks and each block of the histogram statistics with region growing method, using breadth-first search is complete, a subroutine is int flood_fill (). The return value is the number of points. Determine whether the same area condition is gray front search the average is greater than a given threshold (i.e. threshold, input is decided by the user).
Step third: each color proportion of arbitrary two pieces of area of the histogram of the absolute value of the difference between the sum, if less than the threshold (i.e. threshold2, input is decided by the user) is the merger of the two block area. Regional absolute value summation subroutine for void Statistics (), is used to merge the block subroutine for the void combine (int obj1, int obj2).
The fourth step: the total output block number more than 1/10, the
第一步:读入图片,并将彩色图片用公式转化为灰度图像。
第二步:用区域生长法将图片分块并对每一块做直方图统计,用广度优先搜索完成,子程序是int flood_fill()。返回值是区域内的点的数量。判断是否属于同一块区域的条件是前面搜索得到的灰度平均值是否大于给定阈值(即threshold,由用户输入决定)。
第三步:任意两块区域对区域直方图的每个色阶比例的差的绝对值求和,若和小于阈值(即threshold2,由用户输入决定)则合并两块区域.区域绝对值求和的子程序为void statistics(),用于合并块的子程序为void combine(int obj1,int obj2)。
第四步:将占总面积1/10以上的块号输出,由用户决定要选哪一块做为最后需要的图片,并输出合并的块的数量。最后输出图像。-Cutpicture (form) do the histogram statistics:
The first step: read into the picture, and the color image into gray image using the formula.
The second step: the picture into blocks and each block of the histogram statistics with region growing method, using breadth-first search is complete, a subroutine is int flood_fill (). The return value is the number of points. Determine whether the same area condition is gray front search the average is greater than a given threshold (i.e. threshold, input is decided by the user).
Step third: each color proportion of arbitrary two pieces of area of the histogram of the absolute value of the difference between the sum, if less than the threshold (i.e. threshold2, input is decided by the user) is the merger of the two block area. Regional absolute value summation subroutine for void Statistics (), is used to merge the block subroutine for the void combine (int obj1, int obj2).
The fourth step: the total output block number more than 1/10, the
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Image segmentation code.txt