ivapylibs / puzzle_solver

1 stars 2 forks source link

connectivity classes: in/out/edge #25

Closed pv33 closed 2 years ago

pv33 commented 3 years ago

Build out puzzle piece template class to include the form of the puzzle piece in terms of whether the north, south, east, and west parts go in, out, or are flat (edge).

Presumably the puzzle piece template class has both the area data and also the boundary data. The boundary data should be parsed to establish in, out, or edge. One simple way would be to see where the convex hull center of mass is located relative to the median point of the boundary points.

Uio96 commented 3 years ago

The current implementation is based on a reference https://towardsdatascience.com/solving-jigsaw-puzzles-with-python-and-opencv-d775ba730660