通过接口调用方式将图片转成扫描版图片
- 确保已安装Python 3.8
- 安装依赖包:
pip install -r requirements.txtpython app.pyPOST http://localhost:5000/scan_document
参数
file: 要扫描的图像文件。
correct_perspective: 如果为 True (默认值),则图像将被校正透视以模拟俯视图。
如果为 False,则将保留原始图像布局。
| 原图 | correct_perspective=true | correct_perspective=false |
|---|---|---|
![]() |
![]() |
![]() |


