Ok guys, I think I did everything I could except one important thing: Shape Extraction. I already do this quite simply, but there are times when it is really messy. The way I do this:
- Select a point in the list generating a bounding box and selecting the closest point to the upper left (p point).
- Create a new Shape object and add p to the shape outline.
- If there are no more glasses available for testing in the main image, we simply return the shape object.
- Get the closest point from p and keep it closest.
- and the distance from the nearest point, point p, is less than or equal to ten
- ---- Add it to the circuit
- ---- Remove from the list of key points
- ---- Set p to the nearest
- ---- Get another nearest point from the nearest
- ---- Repeat
- If the shape has ten points or less in your circuit, return a null object (ignore all small shapes)
- Otherwise, return the form object.
I repeat this process until the main list is empty. This means that we have extracted all the shapes.
Now I do the combination several times. It does so if I have |, ---, and | next to each other, it will combine to create a rectangle. Do you understand what I mean? Suppose I have a circle, the above extraction code sometimes says that half of the circle is one shape and the other half is another shape. Therefore, when I combine the figures, it becomes one circle.
Sigh, I canβt post photos, and I canβt upload it anywhere but the download site. This has some problems. Take a look at the following:

The image on the left is the initial image, and the contour points on the right. Now I click the "Define Form" button. It determines the shape of the most dominant form in the image (the shape object that contains most of the points in its outline).

Now he correctly says that it is a quadrangle, but for the wrong reasons. Due to my combinational shapes (which needed to be done to get the shape of a rectangle, otherwise it would be a small line for one shape and another small line like a different shape), it added a finger outline to the test.
So, all one figure is tested (black outline on the right in the second figure). Not only the βrectangleβ part, but also everything in this picture. Can you guys think about how to clear this thing and extract the JUST part of the rectangle instead of turning on the fingers? I was thinking of some variation of A * for this, but in a case like this picture, it does not create a loop. So, what should I do when A * visits every point (since it cannot return to the starting point). What should I do then?
Can someone help me try to figure this out?