
Continue the Google PhotoScan boundary investigation using the NEW real iPhone capture data.

Working directory: /Users/suvorov/PhotomyneResearch

New diagnostic files:
/Users/suvorov/PhotomyneResearch/current_renew_photoscan/

* IMG_2612.JPG
* IMG_2613.JPG
* IMG_2614.JPG
* IMG_2615.JPG
* IMG_2616.JPG
* IMG_2618.JPG
* logs_2.txt — new scan logs
* photoscan_fused_input_unannotated.PNG — actual unannotated native fusion output

Production module:
current_renew_photoscan/PhotoScan_Integration_Module/

Previous investigation:
eggs_research/boundary_diagnostics_20261109/

Task

1. Correlate the five original JPEGs, fusion PNG, final result, and logs. Verify their actual roles and capture order rather than assuming filenames establish the sequence.
2. Reproduce the exact Mode 6 detection failure using the unannotated fusion PNG.
3. Execute the recovered original Google PhotoScan ARM Mode 6 on the identical input pixels, using the original preprocessing and parameters.
4. Compare original ARM and our implementation: candidate generation, line detection, GrabCut, scoring, corner refinement, and final quadrilateral.
5. Determine why the physical photo boundaries are missed and identify the first meaningful divergence, if one exists.
6. Investigate Mode 3 acquisition rejection separately, including the original 70% span requirement and its interaction with camera framing.
7. Implement verified improvements directly in PhotoScan_Integration_Module. Preserve registration, GridFlow, fusion, camera UI, and manual corner correction.
8. Create reproducible regression tests using these real images. Compare detected corners against the physical photo edges.

Critical requirements:

* Do not introduce scene-specific heuristics or arbitrary threshold adjustments.
* Do not confuse numerical parity with correct physical-boundary detection.
* Do not treat uncropped fallback as successful automatic detection.
* If original ARM and our implementation produce the same incorrect result, investigate missing preprocessing, application-level behavior, and candidate-selection limitations.
* Do not modify the original APK or reverse-engineering evidence.
* Do not claim success unless automatic detection actually finds the physical photo boundaries.

Deliverables: corrected production module, root-cause analysis, original-vs-reconstruction numerical comparison, before/after visualizations, and real-image regression results.

Priority: make automatic photo boundary detection work reliably, not merely prevent incorrect cropping.
