detect square objects in a binary image
조회 수: 5 (최근 30일)
이전 댓글 표시
i have previously used regionprops to measure the boundingbox in a binary image. but the thing is sometimes it can detect sometimes it cannot detect the square in the image. is there any more robust way to detect square and obtain its location and dimension?
댓글 수: 0
답변 (2개)
Jeremy
2013년 11월 1일
I was thinking about this recently, a hough transform could be a very robust way to find squares, if they are not rotated at all it would be fairly quick and would have no trouble with partial or overlapping squares. Are these actual squares or rectangles? I don't know your experience level, but writing a hough transform from scratch can be tough.
댓글 수: 2
Image Analyst
2013년 11월 1일
I would not really say that regionprops is a square detector. It characterizes and measures blobs. You need to do something in advance to create a binary image. If you did a good job, then your blob will be square and regionprops will measure it, and all blobs and tell you which are square or not square, but you have to have created the cquare binary blobs in the first place. How you do that is through image processing and what processes you need to use depend on what your square looks like. is it solid, or a perimeter that's "hollow" in the middle? Have you tried the corner() function? It all depends on what your image looks like. An algorithm that's good at detecting a bright square on a black background would not be appropriate for detecting a blue satin fabric patch on a piece of blue knit fabric the same color. You might be able to get by with simple thresholding in the first case, while in the second case you'd need a texture processing method.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!