Commit Graph

36 Commits

Author SHA1 Message Date
Matt McWilliams 28d959ff1b Tried more approaches 2023-02-09 22:17:18 -05:00
Matt McWilliams e560955537 Make script more like proof of concept script. Still nothing. 2023-02-08 15:49:23 -05:00
Matt McWilliams 34e5153948 Moved everything into RGBA from RGB in case alpha channel allowed for proper use. Not working. Cannot understand why proof of concept works but not this. 2023-02-08 15:34:40 -05:00
Matt McWilliams a1a57ef58c Image overwriting continues even after loading a valid image and drawing the hole punches on 2023-02-08 10:58:41 -05:00
Matt McWilliams aabdac74b5 Apply_image.py script is correctly placing images in the template locationg BUT is overwriting the starting blank image with a black background and doing so for all subsequent images. Not sure how to properly address this 2023-02-08 10:42:45 -05:00
Matt McWilliams 89678edd8e Wrote notes on the spec for the two apply scripts which will put the calibration data into action. 2023-02-07 02:11:46 -05:00
Matt McWilliams d57a145f1c Update readme with info about calibration script and documenting its output 2023-02-07 02:11:19 -05:00
Matt McWilliams 80e4d8e251 Create a affineTransform proof of concept script that takes one image, finds points within it and to scale and distort an image to and then places it there. 2023-02-07 02:10:58 -05:00
Matt McWilliams 800b5af94e Write calibration metadata to a json file that includes the normalization info 2023-02-06 13:02:32 -05:00
Matt McWilliams 1a8491919c Can now find all 4 frames and correctly orient the rectangles that contain them 2023-02-06 00:13:05 -05:00
Matt McWilliams 2c2604c4b0 Find registration marks, tag center of mark (not top left corner) 2023-01-30 09:33:30 -05:00
Matt McWilliams 1589076974 Work on matching registration marks against document. Segmenting image without copying is causing errors. 2023-01-30 09:26:43 -05:00
Matt McWilliams adf465fd4c Select and group registration marks 2023-01-29 22:53:51 -05:00
Matt McWilliams dea1fb8134 Calibrate script work, having trouble finding pattern so will have user select 2022-11-24 19:41:01 -05:00
Matt McWilliams 81d79a1602 Write hole punch file as json 2022-11-24 12:10:05 -05:00
Matt McWilliams ab9e31b49e Begin the calibrate script which will read the .txt file made by the normalize script. JSON would make more sense. 2022-11-24 11:22:03 -05:00
Matt McWilliams 9b48e52736 Migrate common functions into common.py to share between scripts 2022-11-24 11:21:06 -05:00
Matt McWilliams 91e806f9ab Add hole punch diagram to readme 2022-11-24 11:19:17 -05:00
Matt McWilliams b93ef905ae Remove excessive logging 2022-11-15 20:55:06 -05:00
Matt McWilliams 5a0da25109 Eval files are great, can be used for further stabilization if needed 2022-11-15 14:05:45 -05:00
Matt McWilliams 58955ade4b Normalize works, I like it. Image size is the real bandwidth limiter but images look good enough. SHould create a script to onionskin all scans for evaluation. Maybe run the holepunch detection on normal and write text file that prints the centers? Will do that now. 2022-11-15 13:59:51 -05:00
Matt McWilliams a352ad1062 I dropped the stash 2022-11-14 13:46:30 -05:00
Matt McWilliams 89eaa29b81 Why... 2022-11-14 13:45:39 -05:00
Matt McWilliams 163fbad520 okay? 2022-11-14 13:44:23 -05:00
Matt McWilliams d5a90ca8ae Fixed? 2022-11-14 13:43:58 -05:00
Matt McWilliams 1a28ccba66 What is happening 2022-11-14 13:43:22 -05:00
Matt McWilliams 6ae5797ebb Fix sloppy merge 2022-11-14 13:42:44 -05:00
Matt McWilliams ff04b2aa37 Add a few pattern matching algorithms to notes 2022-11-14 13:40:26 -05:00
Matt McWilliams 2798729373 Work on normalization script 2022-11-13 22:36:25 -05:00
Matt McWilliams 9e11d95447 Credit "borrowed" code used for angle normalization 2022-11-11 10:19:31 -05:00
Matthew McWilliams ca6d7d7d0b Specified the "analyze" script as the "normalize" script. Can be used for multiple processes.
At the point where the straightened image needs to be centered onto an idealized blank sheet.
2022-11-10 18:06:47 -05:00
Matthew McWilliams 602b6dc26c Draw lines between squared points. Get rotation angles (still need to fix verts_angle()) 2022-11-09 16:56:14 -05:00
Matthew McWilliams e1c6777bf8 Only look at 20% margins for hole punches. Works on all existing examples 2022-11-09 16:55:02 -05:00
Matthew McWilliams 73b61c0cab Fix appendStr -> append 2022-11-09 09:45:07 -05:00
Matt McWilliams f103133b9f Almost blew past a good stopping point.
This script can now, on at least one example. locate the largest contours on the page and then put those contours in an array.
It should also look for the largest, most outlying, to prevent errors in the case of large contours in the image.
They should never go past the holes.

Next step: use this for straightening, which will be good for the image extraction script.
Use them as registration points and then just rotate, shift and "shoot" by cropping at a point relative to the holes.

For calibration/templating, look into pattern matching fiducials after getting hole punch coordinates.
2022-11-08 22:47:36 -05:00
Matthew McWilliams cd1edbe538 Started analysis script with single example taken from stackoverflow as a starting point. Had to modify it to support opencv 4.x but got it to run. Finds holes. 2022-11-08 19:11:15 -05:00