I am bit new to image processing. What i'm doing is recognize rectangular shapes (not overlapped) of a given image and create separate images by crop them out. So the output images should be without a border. I tried some examples but none of it did the trick. FYI: those horizontal rectangles are with black lined border in a white background. There are some symbols inside them.
does anyone have a clue or an similar example? regards on help
This is pseudo C code, but my idea is there.
Main Structure
Main loop
This is really not accurate. Don't try to copy and past, it will fail. But you have the idea here. Also note that i only check the line in the up side, and the linde on the left side
X are checked, not o
The algo here is just to check if there's the same number of X on the left side and on the top side. If it's the case, you have a square. For sure, if you want to find a rectangle, you have to check down side and right side. Then, it would be : If there's the same amount on the left side + down side and on the top side + right side, then we have a rectangle.
That sort of algorythm should do the trick.