Code: simple puzzle parser
Closed this issue · 4 comments
The simple puzzle parser is a perceive instance that has a couple of factory defaults for building itself. The expected input is a mask and an image.
There is no guarantee that the mask is correct, just that it is a mask and that the true pixels in the mask are indeed puzzle pieces (hopefully!!!). The mask may be smaller than the true mask. What this means is that the mask might have false negatives but shouldn't have false positives.
It extracts a puzzle board representation from the current mask/image measurements. This puzzle board representation can be used for a variety of purposes. Almost all other puzzle description instances are sub-classes of this base class.
Assigned to both, but most likely be fit for Yunzhi. Most likely this is what Yunzhi is working on this week. His plan was not well formulated, so I do not what exactly what the expected deliverables were going to be. Generating myself based on what I believe is needed.
@Uio96
Done. This is an important piece to get working since it applies to the puzzle tracking process, the puzzle calibration process. It contributes to the puzzle solver. Overall, it's what glues everything together.
Depends on #8.
Should be able to use a detector.none type of instance, but you will have to create one here that takes in an image and a layer mask and returns them both together. Maybe call it noneLayered
or layeredNone
. Either way works for me. Put in detector class.
Then, you can use the shapes testing data as the input. The detector will do nothing but pass it along to the parser.fromLayers
instances and extract what is needed.
Eventually, this will be the calibrated solution for the puzzle manager in #7 .