ermig1979 / Simd

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX for x86/x64, NEON for ARM.
http://ermig1979.github.io/Simd
MIT License
2.06k stars 412 forks source link

Contour Detection #126

Closed jbensabat closed 4 years ago

jbensabat commented 4 years ago

Hello I have started to try SIMD for detecting contour and I must say that I am impressed. the problem is that there seems to be no documentation on how to set the parameters Any help would truly be appreciated best regards jac

ermig1979 commented 4 years ago

Hello! Are you read ContourDetector description ?

jbensabat commented 4 years ago

Hello Yes I have. The problem is that there is no reference to an algorithm or method explaining the meaning of these arguments if you could suggest a publication or report explaining I could manage thanks jac

ermig1979 commented 4 years ago

This algorithm is own development. I can give short description: 1) We calculate Sobel filters (Dx and Dy) for every point of given image. 2) Then calculate of sum of absolute values of Sobel Filters and its direction (vertcal or horizontal) for every point. 3) Find points of local maximum (anchors) of gradient(2). Where parameter anchorThreshold difines minimal relative height of the anchor. Parameter anchorScanInterval defines scan step. 4) Find contours starting from anchors. Parameter gradientThreshold defines absolute gradient threshold. Parameter minSegmentLength defines minial contour length.

jbensabat commented 4 years ago

hi thanks for this - I shall try to play with the values of the parameters best jac