Find Gamma angle between two images

1 回表示 (過去 30 日間)
Pankaja Tanjore
Pankaja Tanjore 2015 年 5 月 20 日
Hello,
I have stereo images captured of a wheel. They are captured by rotating at Z-angle.I need to find Gamma angle between two successive images.
I have followed the below steps. i) I have done the camera calibration and obtained the Stereo parameters . L1.bmp ,L2.bmp ,L3.bmp,L4.bmp are the images captured from Left Camera. R1.bmp,R2.bmp ,R3.bmp and R4.bmp are the images captured from Left and Rightcamera.
ii) Image rectification is done using the stereo Parameters. Corresponding Rectified images are obtained for each image L1.bmp --Rectified Image for L1 and L2.bmp--Rectified Image for L2.. Angle is found between these two rectified images.
i)I have applied Adaptive Histogram Equalization on the rectified images to improve the quality of the image.
ii) Applied MinEigenFeatures method to detect the Features. (I tried with other feature detection methods as: SURF ,BRISK) but could not get maximum number of features). iii)Extract the Feature and then match both the features and get the matching points. iv) Determine the angle between the pairs.I am not getting the angle of rotation correctly between the two successive images.
I am sending here the Image Pairs for your consideration and also the code Snippet .
code Snippet : *********************************************
Org_hist=adapthisteq(Cropped_Image1);
original=Org_hist;
figure;
imshow(original);title('OrgHistImg');
distorted1=adapthisteq(Cropped_Image2);
distorted=distorted1;
figure;
imshow(distorted);title('DistortedHistImg');
ptsOriginal = detectMinEigenFeatures(original,'ROI',[1 1 size(original,2) size(original,1)]);
ptsDistorted = detectMinEigenFeatures(distorted,'ROI',[1 1 size(distorted,2) size(distorted,1)]);
[featuresOriginal,validPtsOriginal] = extractFeatures(original,ptsOriginal);
[featuresDistorted,validPtsDistorted] = extractFeatures(distorted,ptsDistorted);
indexPairs = matchFeatures(featuresOriginal,featuresDistorted);
matchedOriginal = validPtsOriginal(indexPairs(:,1));
matchedDistorted = validPtsDistorted(indexPairs(:,2));
figure
showMatchedFeatures(original,distorted,matchedOriginal,matchedDistorted)
title('Candidate matched points (including outliers)')
[tform, inlierDistorted, inlierOriginal] = estimateGeometricTransform(...
matchedDistorted, matchedOriginal, 'similarity');
showMatchedFeatures(original,distorted,inlierOriginal,inlierDistorted)
title('Matching points using SURF and BRISK (inliers only)')
legend('ptsOriginal','ptsDistorted')
Tinv = tform.invert.T;
ss = Tinv(2,1);
sc = Tinv(1,1);
scaleRecovered = sqrt(ss*ss + sc*sc)
thetaRecovered = atan2(ss,sc)*180/pi
outputView = imref2d(size(original));
recovered = imwarp(distorted,tformTotal,'OutputView',outputView);
figure;
imshowpair(original,recovered,'montage')
Angle=thetaRecovered;
*********************************************
Let me the know the best method to find the angle between the rectified images.
Looking forward to hear at the earliest.
Thanks Pankaja

回答 (0 件)

カテゴリ

Help Center および File ExchangeCamera Calibration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by