简体   繁体   中英

How extract lines from a messy background

Given the next canny edge result image:

在此处输入图片说明

I'm trying to extract the selected lines:

在此处输入图片说明

I did try several methods without success. For ex. I tried morphological operations but didn't work well because some times the lines are in angle or they are not completely vertical or horizontal...

I wonder if there's a method or if it is possible to extract them properly.

Thanks.

If you want to identify the longest lines try with finding contou r and filter by its length.

You will get only the long connected lines irrespective of angle.

if you want that to match with line then try houghlines Hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM