本文介绍了Opencv边缘提取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张图片,我想创建一个adge直方图。我将图像分成1100个图像块并尝试在每个块中找到边缘及其方向(水平,垂直,45°对角线,135°对角线或非定向)。

I have an image and I want to create an adge histogram. I divide the image into 1100 image-blocks and try to find edge and its direction (horisontal, vertical, 45° diagonal, 135° diagonal or nondirectional) in each block.

如何提取边缘信息?你有什么想法吗?

How I can extract that information about edges? Do you have any ideas?

问候!

推荐答案

我找到了本文的答案:通过赢得有效使用MPEG-7边缘直方图描述符。

I found the answer in this paper: Efficient Use of MPEG-7 Edge Histogram Descriptor by Won.

我的目标是找到以下边缘:

My goal was to find following edges:

赢取将每个图像块分成4个部分,计算每个图像块的平均灰度级并使用以下系数:

Won divide each Image Block into 4 parts, calculate the average gray level in each of them and use the following coefficients:

我们使用如下系数得到5个值:

We use this coefficients as follows and get 5 values:

使用阈值处理我们估计每种类型的边缘:

Using thresholding we estimate each type of the edge:

program SetEdgeType(max, m_nd, m_h, m_v, m_d_45, m_d_135)
{
if (max < TEdge) then EdgeHisto(0)++
else
{
 if (m_nd > T0)    then EdgeHisto(1)++
 if (m_h > T1)     then EdgeHisto(2)++
 if (m_v > T1)     then EdgeHisto(3)++
 if (m_d_45 > T2)  then EdgeHisto(4)++
 if (m_d_135 > T2) then EdgeHisto(5)++
}
endif
return(EdgeHisto)
}

阈值是由Savvas A. Chatzichristofis选择:TEdge = 14,T0 = 0.68,T1 = T2 = 0.98。

Threshold values were selected by Savvas A. Chatzichristofis to be: TEdge=14, T0=0.68, T1=T2=0.98.

这篇关于Opencv边缘提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 00:58