How can I Align two images by using specifc coordinates of an object automatically?

3 ビュー (過去 30 日間)
I have a reference image, and a scanned image(for example). The scanned image does not have the same position as the reference image, how can I align them by using the black box on the left side of the reference image? I have the coordinates of the black boxes on the reference image, while the scanned image is unknown. I want it to align automatically after scanning the image. Thank you

採用された回答

Image Analyst
Image Analyst 2016 年 1 月 26 日
You can use imregister().
  8 件のコメント
Image Analyst
Image Analyst 2016 年 1 月 27 日
Of course, imrotate() works regardless if any boxes are shaded or not. Not sure what you're referring to when you say that.
If the presence of user-drawn stuff on the form confuses the imregister, then locate the registration set of bars on the left and make everything else white. Then call imregtform() to figure out the transformation, and then apply it to the original picture.
Brink Azoa
Brink Azoa 2016 年 1 月 28 日
編集済み: Brink Azoa 2016 年 1 月 28 日
Oh sorry, I mean the imrotate() works on my code at the first set of images which is MCQref and MCQscan. In my second trial of the code without the imrotate(because the 2 images are at same position, but tilted slightly), when I scan a sheet with shaded box,the output of the pictures is not aligned anymore, using my whole code...
Ok thank you very much, I'll try imregtform....

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by