چاپ کردن این صفحه
شنبه, 26 تیر 1395 15:24

تشخیص هدف در یک تصویر با استفاده از تطبیق ویژگی نقاط

نوشته شده توسط
مرحله اول : خواندن تصویر هدف و تصویری اولیه (تصویری که قرار است هدف ما در آن شناسایی و جداسازی گردد.)
تصویرهدف
;(boxImage = imread('stapleRemover.jpg'
 
تصویر اولیه
;(sceneImage = imread('clutteredDesk.jpg'
 
 مرحله دوم:تشخیص نقاط ویژگی در هر دو تصویر اولیه و هدف:
;(boxPoints = detectSURFFeatures(boxImage
;(scenePoints = detectSURFFeatures(sceneImage
 
مرحله سوم: استخراج توصیفگرهای ویژگی در نقاط مورد علاقه در هر دو تصویر. 
;([boxFeatures, boxPoints] = extractFeatures(boxImage, boxPoints
;([sceneFeatures, scenePoints] = extractFeatures(sceneImage, scenePoints
 
مرحله چهارم: مطابقت ویژگی های تصاویر با یکدیگر با استفاده از توصیفگرهایشان.
;(boxPairs = matchFeatures(boxFeatures, sceneFeatures
 
نمایش ویژگی های منطبق شده:
;(:,matchedBoxPoints = boxPoints(boxPairs(:, 1)
;(:,matchedScenePoints = scenePoints(boxPairs(:, 2)
;figure
showMatchedFeatures(boxImage, sceneImage, matchedBoxPoints, ...
   ;( matchedScenePoints, 'montage'
;(title('Putatively Matched Points (Including Outliers)'
 
 
مرحله پنجم:پیدا کردن هدف در تصویر اولیه با توجه به نتایج به دست آمده
[tform, inlierBoxPoints, inlierScenePoints] = ...
    ;(estimateGeometricTransform(matchedBoxPoints, matchedScenePoints, 'affine'
 
;figure
...,showMatchedFeatures(boxImage, sceneImage, inlierBoxPoints
    ;('inlierScenePoints, 'montage
;('(title('Matched Points (Inliers Only)
 
خواندن 1256 دفعه آخرین ویرایش در یکشنبه, 27 تیر 1395 23:02

موارد مرتبط