I want to find locate DOOR shape in image! HELP PLEASE!

asked 2019-05-07 19:18:56 -0600

jovsky gravatar image

updated 2020-10-06 00:00:34 -0600

Guys, I'm come here to ask for your help cause I'm kinda desperate and couldn't find yet a solution for this problem:

image description

I'm programming in Python (2.7) and using OpenCV, I have the image above (download here) and I need do find (and draw) the contours of both the doors. I'm trying the following techniques:

Histogram Equalization -> Canny Edge Detection Dilate and Erode findContours contourArea approxPolyDP

I've tried many ways to select only the rectangular contours of the doors, but it's not that simple because these contours aren't perfectly defined, they are always mixed with other objects contours or other kinds of problems. I noticed that many of them happens because the doors, the walls and the windows have similar colors, that disturbs edge detection.

I want you guys, PLEASE, to suggest me any possible solution for this, I'm actually an amateur with openCV and don't know yet better ways. Maybe using AutoCorrelation technique with a door template image, I don't know. The final result I wanted is something like this:

image description

Note: that image is just a picture taken of many others, my algorithm must work for a global situation for those kind of doors.

I'M SO GRATEFUL !!!!

edit retag flag offensive close merge delete