How to calculate angle of deviation between 2 images ?

조회 수: 4 (최근 30일)
Theodor Al Saify
Theodor Al Saify 2018년 4월 23일
편집: Jan 2018년 4월 24일
I have 2 images, image1 is ref and image2 is sample with rotation. How to find the angle of rotation between the two images.

답변 (1개)

Jan
Jan 2018년 4월 23일
This is a job for imregister.
  댓글 수: 2
Theodor Al Saify
Theodor Al Saify 2018년 4월 24일
can you provide me with some example how to implement it in my question ? Thank You
Jan
Jan 2018년 4월 24일
편집: Jan 2018년 4월 24일

Should I assume you are able to write the code for importing the images already? It would be more efficient, if you post the current code you have tried and ask a specific question.

img1 = imread('image1.tiff');
img2 = imread('image2.tiff');
% moving_reg = imregister(moving,fixed,transformType,optimizer,metric)
optimizer = registration.optimizer.RegularStepGradientDescent;
metric    = registration.metric.MeanSquares;
[img1X, reg] = imregister(img1, img2, 'rigid', optimizer, metric)

Does this work? I cannot test it, because I do not have the Image Processing Toolbox. All I've done to create this example was to read the documentation. Try this by your own also: doc imregister (link) .

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Geometric 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