Commit Graph

7 Commits

Author SHA1 Message Date
John McCardle 1435752a30 [In Progress] refactoring and debugging imagepipeline
poorly defined: how to accurately track if an image is color or not? This is causing a bug in the @with_frame decorator in GameModel.

There's also an antipattern of "cvimage.image = cvimage.mod_function()", to perform in-place modifications to images. This is the place for an ImagePipeline object.
2021-12-27 20:30:40 -05:00
John McCardle e0f6a62709 Masking - don't consider score or lives display when analyzing frame 2021-12-24 13:02:52 -05:00
John McCardle 5499aa5e49 Started classifying on-screen objects with unified "analyse_frame" function
Rocks, lives, and missiles are identified by their rectangles from cv2.matchTemplate.
Clusters from SIFT are checked against these detected rectangles.
The remaining objects (like the rotated ship) are classified as "mysteries". These will be target for further analysis (like ship angle determination), or we can just shoot at them :)
2021-12-23 13:57:50 -05:00
John McCardle 372f250167 SIFT, orthogonal ship image detection (lives), colored debug output
Set up a SIFT method and massively upgraded the debug view to look at the image processing outputs in color.
TODO: the template matching used for unrotated ship icons and asteroids does not work on missiles.
2021-12-22 20:29:36 -05:00
John McCardle f497bdd61a Initial commit of SIFT search for ship sprites
The data returned by the gamemodel function is overly verbose and not interpreted well yet. I'd like to return a (pt, wh, label) tuple like the find_asteroids function does. This would make it compatible with the existing display_results function.
2021-12-21 02:19:12 -05:00
John McCardle d28344971e Refined asteroid finding. Implemented a result display function. 2021-12-21 01:29:15 -05:00
John McCardle 48c7d9a890 Initial commit of GameModel class 2021-12-20 04:41:48 -05:00