how to detect object and put a rectangle around it?

oh, what is wrong with these codes.I want to detect windows in buildings facade and put a rectangle around the detected image which is window.I dont know why it does not detect my template window .I mean I have scattered bounding box all over the image .Do you know what is wrong with this algorithm?(detectobj and findtemplate are algorithms )
detect.jpg

Answers (0)

Asked:

on 29 Jun 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!