feat(dewarp): auto-flatten only curved docs via curl gate v1.099 KakaoTalk multi-share goes through the batch path (ScanPipeline), which had no dewarp, so curved/wrinkled forms stayed bowed. But applying UVDoc unconditionally skewed flat docs (the v1.095 complaint). Resolved with a self-correcting gate: keep UVDoc only when it actually reduces measured curl. - AutoDewarp.apply(cropped, force): measures curl (std of near-horizontal Hough line angles) on the perspective crop; if curl > 1.3 deg and UVDoc drops it by > 0.3 deg, return the UVDoc result, else keep the crop. So flat docs are never touched (no skew) and curved docs get flattened. force=true (editor "펴기" toggle) bypasses the gate. - Wired into ScanPipeline (batch) and EditorFlatten (the "펴기" toggle is now a force override; default is the auto gate). - Reviewer caught a blocker: HoughLinesP outputs CV_32SC4, so reading rows into a FloatArray yields all-zero (gate permanently off). Fixed to IntArray — without this the gate never fires. Validated in the python spike: flat docs measure 0.00 deg -> keep crop; curved forms 2.0-2.25 deg -> 0.00-0.77 deg -> UVDoc adopted. Constraint: AutoDewarp never recycles its input; callers recycle the pre-dewarp bitmap only when the result differs; the gate keeps UVDoc strictly when it lowers curl. Confidence: high (logic/memory) / medium (on-device curl thresholds need a real-device sanity check) Scope-risk: module Reversibility: trivial Directive: on device, confirm a curved KakaoTalk form comes out flat while a flat receipt stays unskewed; if thresholds are off, tune CURL_MIN/CURL_GAIN. Tested: assembleDebug + testDebugUnitTest exit=0 (22 tests); python gate validation on flat vs curved; reviewer pass after the Hough-type fix. Not-tested: on-device curl measurement (Hough on real captures). Related: v1.095 (dewarp made opt-in), user KakaoTalk batch report 🐙 Autopus