How can I rectify images
1 次查看(过去 30 天)
显示 更早的评论
Hi all,
Interesting problem here. I am working on extracting old Chinese texts which are written in vertical lines, but first I need to rectify the images like:
After rectification:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160393/image.jpeg)
But originally they can be in whatever shapes like:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160394/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160396/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160398/image.jpeg)
The only thing guaranteed is that those characters are arranged in multiple vertical lines.
I tried to use Uncalibrated Stereo Image Rectification ( https://www.mathworks.com/help/vision/examples/uncalibrated-stereo-image-rectification.html ), but problem is that the images are NOT in pair, so I only know the target pattern rather than the exact target.
If anyone can provide hints about useful functions, please let me know. First-step solutions like automatically rotating the image to the right angle will also be helpful!
Thanks a lot!
1 个评论
Image Analyst
2017-2-4
Why don't you have control over the image capture situation? If someone is wanting OCR on these books and manuscripts you'd think they would take more care in how they are photographed.
采纳的回答
Carl
2017-2-7
编辑:Carl
2017-2-7
From what I understand, your two main issues are 1) detecting the text in your images, and 2) perspective correction.
You can refer to the following page on detecting and recognizing text in images:
https://www.mathworks.com/help/vision/examples/automatically-detect-and-recognize-text-in-natural-images.html
As well as this File Exchange submission that gives an example on how to perform perspective correction on a bounded area of text:
https://www.mathworks.com/matlabcentral/fileexchange/35531-perspective-control--correction
3 个评论
Carl
2017-2-7
No problem. Also keep in mind that, while it works, the File Exchange submission uses several deprecated functions like "maketform" and "imtransform". These should be replaced with newer functionality like "projective2d" and "imwarp".
cui,xingxing
2022-11-21
In the new version R2022a it is possible to use the deep learning function "detectTextCRAFT" for text detection and in R2022b the pre-multiply form "projtform2d", "imwarp" etc.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!