1、力矩保持法

提出了一种基于矩保持原理的自动阈值选择方法。以这样的方式确定地计算阈值,即在输出画面中保留输入画面的时刻。实验结果表明,该方法可以将给定的图像阈值化为有意义的灰度级。该方法描述了全局阈值,但也适用于局部阈值。

A new approach to automatic threshold selection using the moment-preserving principle is proposed. The threshold values are computed deterministically in such a way that the moments of an input picture is preserved in the output picture. Experimental results show that the approach can be employed to threshold a given picture into meaningful gray-level classes. The approach is described for global thresholding, but it is applicable to local thresholding as well.

在许多图像分析应用中,图像阈值处理是必要的步骤。对于阈值技术综述,见[1或21。在最简单的形式中,阈值将给定图像的像素分类为两组的装置(例如背景),其中包括灰度值高于一定值的像素另一个包括灰度值等于或低于门槛这被称为双燃料阈值。一般来说,我们可以选择一个阈值,并使用它们将整个灰度值范围划分为几个子范围。这被称为多级阈值。大多数阈值技术[3-S]在阈值选择中利用图像直方图的形状信息。在理想在这种情况下,具有高对比度对象和背景的图像的直方图将具有双峰形状,两个峰被深谷隔开。可以选择谷作为阈值。在实际应用中,这种直方图双峰性通常是不清楚的,已经提出了几种方法克服这一问题问题[4-81,以便仍然可以应用山谷搜索技术。阈值选择的另一个方向是评估所选的阈值(通过某种度量)[9-131。一种方法是使用熵信息测量阈值类的同质性(9-111或这些类彼此不同[12]。另一种方法是利用课堂判别分析中使用的可分性度量[13]。在本文中,我们提出了另一种基于矩保持原理也已应用于亚像素边缘检测[14]. 具体而言,在阈值化之前,我们计算输入图像。然后以如下方式选择阈值:阈值图像保持不变。这种方法可视为保矩图像变换,其从模糊版本。该方法可以自动且确定地选择多个阈值,而无需迭代或搜索。此外,代表性灰度值也可以针对每个阈值类获得。

Image thresholding is a necessary step in many image analysis applications. For a 
survey of thresholding techniques, see [l or 21. In its simplest form, thresholding 
means to classify the pixels of a given image into two groups (e.g., objects and 
background), one including those pixels with their gray values above a certain 
threshold, and the other including those with gray values equal to and below the 
threshold. This is called bileuel thresholding. More generally, we can select more than 
one threshold, and use them to divide the whole range of gray values into several 
subranges. This is called multilevel thresholding. Most thresholding techniques [3-S] 
utilize shape information of the image histogram in threshold selection. In the ideal 
case, the histogram of an image with high-contrast objects and background will have 
a bimodal shape, with two peaks separated by a deep valley. The gray value at the 
valley can be chosen as the threshold. In real applications, such histogram bimodality is often unclear, and several methods have been proposed to overcome this 
problem [4-81 so that the valley seeking technique can still be applied. 
Another direction of threshold selection is to evaluate the goodness of selected 
thresholds by a certain measure [9-131. One way is to use entropy information to 
measure the homogeneity of the thresholded classes (9-111 or the independency of 
the classes from one another [12]. Another way is to make use of the class 
separability measures used in discriminant analysis [13]. 
In this paper, we propose another threshold selection method based on the 
moment-preserving principle which has also been applied to subpixel edge detection 
[14]. Specifically, before thresholding, we compute the gray-level moments of the 
input image. The thresholds are then selected in such a way that the moments of the 
thresholded image are kept unchanged. This approach may be regarded as a 
moment-preserving image transformation which recovers an ideal image from a 
blurred version. The approach can automatically and deterministically select multiple thresholds without iteration or search. In addition, a representative gray value 
can also be obtained for each thresholded class.

NOTE Moment-Preserving Thresholding: A New Approachhttps://people.cs.nctu.edu.tw/~whtsai/Journal%20Paper%20PDFs/Tsai_CVGIP(journal)_1985.pdf

2、力矩保持法的阈值算法及其源代码

二值算法综述请阅读:

C#,图像二值化(01)——二值化算法综述与二十三种算法目录https://blog.csdn.net/beijinghorn/article/details/128425225?spm=1001.2014.3001.5502

支持函数请阅读:

C#,图像二值化(02)——用于图像二值化处理的一些基本图像处理函数之C#源代码https://blog.csdn.net/beijinghorn/article/details/128425984?spm=1001.2014.3001.5502

using System;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Collections;
using System.Collections.Generic;
using System.Drawing.Imaging;namespace Legalsoft.Truffer.ImageTools
{public static partial class BinarizationHelper{#region 灰度图像二值化 全局算法 力矩保持法 /// <summary>/// 力矩保持法/// </summary>/// <param name="histogram"></param>/// <returns></returns>public static byte Moment_Preserving_Threshold(int[] histogram){int amount = Histogram_Sum(histogram);double[] Avec = new double[256];for (int i = 0; i < 256; i++){Avec[i] = (double)A(histogram, i) / (double)amount;}double X2 = (double)(B(histogram) * C(histogram) - A(histogram) * D(histogram)) / (double)(A(histogram) * C(histogram) - B(histogram) * B(histogram));double X1 = (double)(B(histogram) * D(histogram) - C(histogram) * C(histogram)) / (double)(A(histogram) * C(histogram) - B(histogram) * B(histogram));double X0 = 0.5 - (B(histogram) / A(histogram) + X2 / 2) / Math.Sqrt(X2 * X2 - 4 * X1);int Index = 0;double Min = double.MaxValue;for (int i = 0; i < 256; i++){if (Math.Abs(Avec[i] - X0) < Min){Min = Math.Abs(Avec[i] - X0);Index = i;}}return (byte)Index;}public static void Moment_Preserving_Algorithm(byte[,] data){int[] histogram = Gray_Histogram(data);int threshold = Moment_Preserving_Threshold(histogram);Threshold_Algorithm(data, threshold);}private static double A(int[] histogram, int Index = 255){return Histogram_Sum(histogram, 0, Index);}private static double B(int[] histogram, int Index = 255){return Histogram_Sum(histogram, 1, Index);}private static double C(int[] histogram, int Index = 255){return Histogram_Sum(histogram, 2, Index);}private static double D(int[] histogram, int Index = 255){return Histogram_Sum(histogram, 3, Index);}#endregion}
}

3、力矩保持法的阈值算法计算效果

C#,图像二值化(16)——全局阈值的力矩保持算法(Moment-proserving Thresholding)及其源代码相关推荐

  1. 图像二值化处理(全局阈值 自适应阈值 手动阈值操作以及直方图画法)

    文章目录 图像二值化处理 二值化原理 API介绍 手动设置阈值 均值法 迭代法 自动设置阈值 直方图法 全局阈值法 OTSU法 三角形法 自适应阈值法 API 绘制图像直方图 图像二值化处理 二值化原 ...

  2. 图像二值化_三角阈值法

    前言 一.三角阈值法是什么? 二.算法原理 1.算法 总结 参考文献 前言 图像二值化有很多方法,比较经典的为OTSU,三角阈值法,本文主要想一探三角阈值法的算法原理. 一.三角阈值法是什么? 三角阈 ...

  3. java 用遗传算法解决图像二值化问题 找阈值

    image类对图像处理 import java.awt.image.BufferedImage; public class Image {public int h; //高public int w; ...

  4. 【图像处理】——图像的二值化操作及阈值化操作(固定阈值法(全局阈值法——大津法OTSU和三角法TRIANGLE)和自适应阈值法(局部阈值法——均值和高斯法))

    目录 一.二值化的概念(实际上就是一个阈值化操作) 1.概念: 2.实现方法 3.常用方法 二.阈值类型 1.常见阈值类型(主要有五种类型) (1)公式描述 (2)图表描述 2.两种特殊的阈值算法(O ...

  5. OTSU_图像二值化分割阈值的算法

    简介: 大津法(OTSU)是一种确定图像二值化分割阈值的算法,由日本学者大津于1979年提出.从大津法的原理上来讲,该方法又称作最大类间方差法,因为按照大津法求得的阈值进行图像二值化分割后,前景与背景 ...

  6. 自适应阈值图像二值化

    一.二值化 关于二值化的介绍,以前的博客中有介绍,这里就不再描述了,二值化介绍:二值化分为固定阈值二值化和自适应阈值二值化,固定阈值二值化方式是我们常用的二值化方式,需要自己摸索一个经验阈值,不断调整 ...

  7. 图像二值化(选择阈值)

    目录 1. 双峰法 2. 大津法(Otsu法或最大类间方差法) 1. 双峰法 在一些简单的图像中,物体的灰度分布比较有规律,背景与各个目标在图像 的直方图各自形成一个波峰,即区域与波峰一一对应,每两个 ...

  8. 二值化图像的欧拉数_Android OpenCV(八):图像二值化

    图像二值化 简介 图像二值化( Image Binarization)就是将图像上的像素点的灰度值设置为0或255,也就是将整个图像呈现出明显的黑白效果的过程.在数字图像处理中,二值图像占有非常重要的 ...

  9. OpenCV-Python 图像二值化

    OpenCV-Python 图像二值化 一.什么是图像二值化 二.图像二值化 Ⅰ先获取阈值: Ⅱ根据阈值去二值化图像 ⅢOpenCV中的二值化方法 三.全局阈值函数cv2.threshold · 函数 ...

最新文章

  1. ActionScript 3.0 编程精髓 示例源码下载
  2. R语言使用psych包的fa函数对指定数据集进行因子分析(输入数据为相关性矩阵)、使用rotate参数指定进行斜交旋转提取因子、使用fa.diagram函数可视化斜交旋转因子分析、并解读可视化图形
  3. DllRegisterServer的调用失败
  4. 最佳调度问题pascal程序
  5. java pojo 是什么_什么是POJO
  6. Quadratic Form
  7. android对象申明,Kotlin中的对象表达式和对象声明的具体使用
  8. vue父子组件生命周期执行顺序_关于Vue组件的生命周期及执行顺序
  9. Java 使用 Dom4j 解析 XML 指南
  10. python 图表工具_7 款 Python 数据图表工具的比较
  11. rollup分析函数
  12. 服务器驱动文件丢失恢复教程,服务器驱动丢失。
  13. VM下安装ubuntu教程
  14. 阿里云对象存储OSS中上传的资源在生成URL链接时直接在浏览器中打开而不是下载的问题解决方法
  15. linux磁盘配额步骤,Linux磁盘配额设置及使用
  16. 《咏猪》 猪,猪,猪,头大脖子粗。 以前十来块,现在三十五。
  17. 亚马逊产品违反受限政策,亚马逊受限产品恢复在售
  18. 软件定义网络 Software Defined Network (一)概述
  19. Redis Geohash指令与位置服务应用
  20. Docker run 容器处于created状态问题

热门文章

  1. Power oj 2781: 上决╇ф的黑科技 (任意模数NTT|拆系数FFT)
  2. AI创业时代!这9个方向有钱途;AIGC再添霸榜应用Lensa;美团SemEval2022冠军方法分享;医学图像处理工具箱… | ShowMeAI资讯日报
  3. 数据结构-树与深度优先遍历
  4. 日本现场常用日语词汇
  5. 圆的css样式,圆形进度条css3样式
  6. MPLS原理和配置实验
  7. 使用okHttp下载文件到本地
  8. UDT长度的含义是什么?
  9. ICMP协议之ping实现
  10. 前端页面中iOS版微信长按识别二维码的bug与解决方案