{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/document-dewarping-with-control-points","title":"Document Dewarping with Control Points","arxiv_id":"2203.10543","date":"2022-03-20","proceeding":null,"authors":["Guo-Wang Xie","Fei Yin","Xu-Yao Zhang","Cheng-Lin Liu"],"abstract":"Document images are now widely captured by handheld devices such as mobile phones. The OCR performance on these images are largely affected due to geometric distortion of the document paper, diverse camera positions and complex backgrounds. In this paper, we propose a simple yet effective approach to rectify distorted document image by estimating control points and reference points. After that, we use interpolation method between control points and reference points to convert sparse mappings to backward mapping, and remap the original distorted document image to the rectified image. Furthermore, control points are controllable to facilitate interaction or subsequent adjustment. We can flexibly select post-processing methods and the number of vertices according to different application scenarios. Experiments show that our approach can rectify document images with various distortion types, and yield state-of-the-art performance on real-world dataset. This paper also provides a training dataset based on control points for document dewarping. Both the code and the dataset are released at https://github.com/gwxie/Document-Dewarping-with-Control-Points.","url_abs":"https://arxiv.org/abs/2203.10543v1","url_pdf":"https://arxiv.org/pdf/2203.10543v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"document-dewarping-with-control-points","repo_url":"https://github.com/gwxie/document-dewarping-with-control-points","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"optical-character-recognition","task_name":"Optical Character Recognition (OCR)"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.10543","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.10543"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gwxie/document-dewarping-with-control-points","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":8},"by_repo_kind":{"official":{"samples":8,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"e0f8ba0dc8af8c8c","entry":"adjust_position","repo":"gwxie/document-dewarping-with-control-points","repo_kind":"official","path":"Source/utilsV3.py","file_url":"https://github.com/gwxie/document-dewarping-with-control-points/blob/HEAD/Source/utilsV3.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e0f8ba0dc8af8c8c"}},{"code_sha256_prefix":"74c75e8b88501d79","entry":"conv3x3","repo":"gwxie/document-dewarping-with-control-points","repo_kind":"official","path":"Source/network.py","file_url":"https://github.com/gwxie/document-dewarping-with-control-points/blob/HEAD/Source/network.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74c75e8b88501d79"}},{"code_sha256_prefix":"c58ea625420653aa","entry":"dilation_conv","repo":"gwxie/document-dewarping-with-control-points","repo_kind":"official","path":"Source/network.py","file_url":"https://github.com/gwxie/document-dewarping-with-control-points/blob/HEAD/Source/network.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c58ea625420653aa"}},{"code_sha256_prefix":"1488fdc3b304cc65","entry":"dilation_conv_bn_act","repo":"gwxie/document-dewarping-with-control-points","repo_kind":"official","path":"Source/network.py","file_url":"https://github.com/gwxie/document-dewarping-with-control-points/blob/HEAD/Source/network.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1488fdc3b304cc65"}},{"code_sha256_prefix":"1a45732549e29cbe","entry":"getDatasets","repo":"gwxie/document-dewarping-with-control-points","repo_kind":"official","path":"Source/dataloader.py","file_url":"https://github.com/gwxie/document-dewarping-with-control-points/blob/HEAD/Source/dataloader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1a45732549e29cbe"}},{"code_sha256_prefix":"c98abd6fb800536c","entry":"get_data_path","repo":"gwxie/document-dewarping-with-control-points","repo_kind":"official","path":"Source/dataloader.py","file_url":"https://github.com/gwxie/document-dewarping-with-control-points/blob/HEAD/Source/dataloader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c98abd6fb800536c"}},{"code_sha256_prefix":"40509d39b7c93fe4","entry":"get_matric_edge","repo":"gwxie/document-dewarping-with-control-points","repo_kind":"official","path":"Source/utilsV3.py","file_url":"https://github.com/gwxie/document-dewarping-with-control-points/blob/HEAD/Source/utilsV3.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"40509d39b7c93fe4"}},{"code_sha256_prefix":"477294970cbee196","entry":"resize_image","repo":"gwxie/document-dewarping-with-control-points","repo_kind":"official","path":"Source/dataloader.py","file_url":"https://github.com/gwxie/document-dewarping-with-control-points/blob/HEAD/Source/dataloader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"477294970cbee196"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}