cherubicXN / afm_cvpr2019

Official implementation of paper "Learning Attraction Field Map for Robust Line Segment Detection" (CVPR 2019)
MIT License
296 stars 66 forks source link

Threshold of the aspect ratio. #15

Closed siyuada closed 5 years ago

siyuada commented 5 years ago

Hi, thanks to your work. I wanna test my data with your method. while I noticed in the paper mentioned using aspect ratio to ensure the rectangle is "thin enough", and also use it as threshold to get line output.

However, I didn't find "aspect ratio" in your code, I think it is related to "region2rect" function in squeeze/kernel.cpp, while it is just set to True. // return rect.width/(rect.l_max-rect.l_min)<0.3; return true;

If I wanna test or evalute the result, should I change the return condition? Really thanks.

cherubicXN commented 5 years ago

Hi, you do not need to change the c++ code. The "aspect ratio" criterion is moved to the output function. The details can be seen in line 30 and 31 of this file.

You can save the results by modifying the code for your own purpose.

siyuada commented 5 years ago

Get it! Thanks