中文说明:应用背景该段代码是可以实现图像的直方图分割的算法,它先将图像转化成灰度图像,之后产生图像直方图的阈值双峰图像,根据所产生的图像阈值双峰图,可以得到图像分割的分割阈值。关键技术 这里面histogram.m文件是直方图算法的主文件,里面有几个参数需要根据实际情况改,注释里都有讲 imcut.m文件是前者用到的一个函数,是根据灰度图像的分割结果对原始彩色图像进行分割的。 2.jpg是程序里用到的图片,可以多找些图试一下,黑白或彩色的都行 大部分阈值分割算法都是仅针对灰度图片进行分割的,但是现在已经很少使用黑白图片了,可以先把彩色图片转换成黑白图片然后按照算法分割即可。
English Description:
Application backgroundThis section of code is to achieve the image histogram segmentation algorithm, which first converted into grayscale images, and then produce the image histogram of the image of Shuangfeng, according to the image generated by the Shuangfeng map, can be obtained from the segmentation of image segmentation.Key TechnologyInside this histogram.m file is the main file histogram algorithm, which has several parameters need to be changed according to the actual situation, notes, there areImcut.m file is a function of the former, is based on the gray image segmentation results of the original color image segmentation.2.jpg is the use of the program in the picture, you can find some more pictures, black and white or color will doMost of the threshold segmentation algorithm is only for the gray image segmentation, but now has very little use of black and white pictures, you can convert the color image into black and white picture an