I have to process building floor plan images to extract walls from the structure. It is trivial in case of binary images; but the images in our case are colored, and have different colored walls. This restricts us from using any thresholding operation as we cannot assume the walls will always be the darkest. How can I come up with an algorithm that can work on all sorts of images?

  • $\begingroup$ You can't come up with a universal algorithm, 'cause who knows what all the different types of plans will look like. Restrict the problem to the types of plans you know about. Write algorithms that work for most of them and exceptions for those that don't. As for colour, why not segment using both intensity AND colour? $\endgroup$ Commented May 23, 2014 at 13:07
  • $\begingroup$ All Images are NOT different. The thing which is common is all images is that they all have walls, and these compose of major portion of images. What I'm asking is that Is there an algorithm that exploits this quality of Image? $\endgroup$
    – shreelock
    Commented May 23, 2014 at 14:12
  • $\begingroup$ LOL ok. By "all sort of Images" you mean "all THESE sorts of images", that is, plans with colored walls. Sorry. You need a line detector, or perhaps Canny edge detector. Post an example image. $\endgroup$ Commented May 23, 2014 at 14:44
  • 1
    $\begingroup$ Depends what line/edge detector you use and what further processing is applied. For example, limit it to long straight lines. Do you have an example image? $\endgroup$ Commented May 26, 2014 at 8:42
  • 3
    $\begingroup$ Could you upload a sample floor plan image? That'll give us a better understanding of your problem $\endgroup$ Commented Feb 28, 2018 at 13:37

1 Answer 1


Try using Template matching by taking a small cutout of the wall whose length is long enough so that it is not confused with other elements. Keep the threshold value high(around 0.9 or higher) and then check the bounding boxes predictions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.