title: opencv square detection sample detect the window lining and when i use imageroi it crops the whole image
body: <p>i am currently trying to detect the boxes in an image and then i want to crop the detected boxes to use it on my project...but, the square detection samples of opencv also detect the lining of the image...so, the question is how can i only detect the boxes in the image??i am using opencv244, c++...just for the record, i've searched in here regarding this topic, but i couldn't get any ideas...any help would be appreciated, thanks!
  Here is the link to my images...</p>
  
  <ol>
  <li>the original image : <a href="http://www.flickr.com/photos/94841531@N08/8631367890/in/photostream/lightbox/" rel="nofollow">http://www.flickr.com/photos/94841531@N08/8631367890/in/photostream/lightbox/</a></li>
  <li>the detected boxes : <a href="http://www.flickr.com/photos/94841531@N08/8631368138/in/photostream/lightbox/" rel="nofollow">http://www.flickr.com/photos/94841531@N08/8631368138/in/photostream/lightbox/</a></li>
  </ol>