Opencv Edge extraction

前端 未结 1 342
轻奢々
轻奢々 2021-01-03 05:28

I have an image and I want to create an edge histogram. I divide the image into 1100 image-blocks and try to find edge and its direction (horisontal, vertical, 45° diagonal,

相关标签:
1条回答
  • 2021-01-03 06:07

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

    My goal was to find following edges:

    Edge types

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

    coeffs

    We use this coefficients as follows and get 5 values:

    indicators

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

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

    0 讨论(0)
提交回复
热议问题