انواع تبديلات

ليست تبديلات موجود براي استفاده در دستور cp2tform به ترتيب پيچيدگي آنها به صورت زير است:

• ‘nonreflective similarity’
• ‘affine’
• ‘projective’
• ‘polynomial’ (Order 2, 3, or 4)
• ‘piecewise linear’
• ‘lwm’

براي ديدن اطلاعات بيشتر در مورد اين تبديلات و نيز دانستن حداقل تعداد نقاط كنترالي لازم براي هر كدام از آنها به صفحه ي مرجع دستورات cp2tform و cpselect مراجعه كنيد.

استفاده از همبستگي براي اصلاح نقاط كنترلي

براي اصلاح خودكار نقاط كنترلي كه شما قبلاً با چشم خود آنها را انتخاب كرده ايد، مي توانيد از دستور cpcorr استفاده كنيد. البته همان طور كه قبلاً نيز بيان شد، بايد دو شرط مربوط به چرخش و مقياس برقرار باشند.

input_pts_adj= cpcorr(input_points, base_points, input, base);

The first four transformations, ‘nonreflective similarity’, ‘affine’, ‘projective’, and ‘polynomial’ are global transformations. In these transformations, a single mathematical expression applies to an entire image. The last two transformations, ‘piecewise linear’ and ‘lwm’ (local weighted mean), are local transformations. In these transformations, different mathematical expressions apply to different regions within an image. When exploring how different transformations affect the images you are working with, try the global transformations first. If these transformations are not satisfactory, try the local transformations: the piecewise linear transformation first, and then the local weighted mean transformation.

عملكرد دستور

>> help cpcorr
CPCORR Tune control point locations using cross‐correlation.
INPUT_POINTS = CPCORR(INPUT_POINTS_IN,BASE_POINTS_IN,INPUT,BASE) uses
normalized cross‐correlation to adjust each pair of control points
specified in INPUT_POINTS_IN and BASE_POINTS_IN.
INPUT_POINTS_IN must be an M‐by‐2 double matrix containing the
coordinates of control points in the input image. BASE_POINTS_IN is
an M‐by‐2 double matrix containing the coordinates of control points
in the base image.
CPCORR returns the adjusted control points in INPUT_POINTS, a double
matrix the same size as INPUT_POINTS_IN. If CPCORR cannot correlate a
pairs of control points, INPUT_POINTS will contain the same coordinates
as INPUT_POINTS_IN for that pair.
CPCORR will only move the position of a control point by up to 4
pixels. Adjusted coordinates are accurate up to one tenth of a
pixel. CPCORR is designed to get subpixel accuracy from the image
content and coarse control point selection.
Note that the INPUT and BASE images must have the same scale for
CPCORR to be effective.

CPCORR cannot adjust a point if any of the following occur:

‐ points are too near the edge of either image

‐ regions of images around points contain Inf or NaN

‐ region around a point in input image has zero standard deviation

‐ regions of images around points are poorly correlated

نویسنده: دکتر هادی گرایلو

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *