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 each have different color of walls. This restricts us from using any thresholding operation as we cannot assume the Walls will always be the darkest. How possibly can I come up with an algorithm that can work on all sort of Images?
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.