Opencv Edge Extraction

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

How can I extract this rib information? Do you have any ideas?

Hello!

+3
source share
1 answer

I found the answer in this article: Effectively Using Won's MPEG-7 Histogram Descriptor.

My goal was to find the following ribs:

Edge types

4 , :

coeffs

5 :

indicators

, :

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)
}

. : TEdge = 14, T0 = 0,68, T1 = T2 = 0,98.

+8

Source: https://habr.com/ru/post/1709070/


All Articles