ImageCorrespondingPoints[image1,image2]
finds a set of matching interest points in image1 and image2 and returns their pixel coordinates.
ImageCorrespondingPoints
ImageCorrespondingPoints[image1,image2]
finds a set of matching interest points in image1 and image2 and returns their pixel coordinates.
Details and Options
- ImageCorrespondingPoints uses ImageKeypoints to find candidate corresponding points.
- ImageCorrespondingPoints[image1,image2] returns an expression of the form {points1,points2}, where the pointsi are lists of pixel coordinates representing the matching points in imagei.
- The following options can be specified:
-
KeypointStrength Automatic minimum strength of the keypoints Masking All region of interest MaxFeatures Automatic maximum number of keypoints Method Automatic the type of keypoint to use TransformationClass None geometrical relation between points - With the setting Masking->roi, the set of points is restricted so that the returned points points1 of image1 all lie within the region of interest.
- With the setting MaxFeatures->n, at most n corresponding points with largest average keypoint strength are returned.
- By default, a suitable keypoint type is used to find corresponding points. Using Methodmethod, a specific keypoint type or a list of types can be specified.
- Possible settings for method include:
-
"AKAZE" Accelerated KAZE and binary descriptors "BRISK" Binary Robust Invariant Scalable Keypoints "KAZE" nonlinear scale-space detector and descriptor "ORB" FAST detector and Binary Robust Independent Elementary Features (BRIEF) descriptor "SIFT" Scale-Invariant Feature Transform detector and descriptor "RootSIFT" SIFT keypoints with an improved descriptor "SURF" Speeded-Up Robust Features {method1,method2,…} combination of various keypoint correspondences - Possible settings for TransformationClass include:
-
None no geometric constraints "Translation" translation only "Rigid" translation and rotation "Similarity" translation, rotation, and scaling "Affine" linear transformation and translation "Perspective" linear fractional transformation "Epipolar" epipolar transformation, mapping a point in one image to a line in the other image
Examples
open all close allBasic Examples (1)
Scope (3)
Corresponding points in binary images:
ImageCorrespondingPoints[[image], [image]]Corresponding points in grayscale images:
ImageCorrespondingPoints[[image], [image]]Corresponding points in color images:
ImageCorrespondingPoints[[image], [image]]Options (16)
KeypointStrength (3)
By default, all keypoints are used in finding corresponding points:
ImageCorrespondingPoints[[image], [image]]Use only keypoints with individual strength greater or equal to a given threshold:
ImageCorrespondingPoints[[image], [image], KeypointStrength -> .001]Increasing the threshold typically results in detecting fewer corresponding points:
{i1, i2} = {[image], [image]};ListLinePlot[Table[{s, Length[ImageCorrespondingPoints[i1, i2, KeypointStrength -> s][[1]]]}, {s, .0001, .005, .0001}], Frame -> True, FrameLabel -> {"threshold", "number of corresponding points"}]Masking (1)
By default, with Masking->All, all detected corresponding points are returned:
{i1, i2} = {[image], [image]};MapThread[HighlightImage[#1, #2]&, {{i1, i2}, ImageCorrespondingPoints[i1, i2]}]With Masking->maskimage, corresponding points of image1 should lie within maskimage:
mask = [image];
c = ImageCorrespondingPoints[i1, i2, Masking -> mask];Display the detected correspondences for the first image:
HighlightImage[i1, {c[[1]], Orange, mask}]MaxFeatures (2)
Return the best
correspondences:
c = ImageCorrespondingPoints[[image], [image], MaxFeatures -> 5]The number of returned correspondences may be less than the value of the MaxFeatures option:
ImageCorrespondingPoints[[image], [image], KeypointStrength -> .001, MaxFeatures -> 5]//First//LengthMethod (3)
By default, "SURF" keypoints are used to find correspondences:
ImageCorrespondingPoints[[image], [image]]ImageCorrespondingPoints[[image], [image], Method -> "KAZE"]Use a combination of "SURF" and "BRISK" keypoints:
ImageCorrespondingPoints[[image], [image], Method -> {"SURF", "BRISK"}]//ShortTransformationClass (7)
By default, the two detected point sets are not constrained geometrically:
ImageCorrespondingPoints[[image], [image]]//First//LengthConstrain the pair of point sets to be related by an epipolar transformation:
ImageCorrespondingPoints[[image], [image], TransformationClass -> "Epipolar"]//First//LengthConstrain the pair of point sets to be related by a linear fractional transformation:
ImageCorrespondingPoints[[image], [image], TransformationClass -> "Perspective"]//First//LengthConstrain the pair of point sets to be related by an affine transformation:
ImageCorrespondingPoints[[image], [image], TransformationClass -> "Affine"]//First//LengthConstrain the pair of point sets to be related by a similarity transformation:
ImageCorrespondingPoints[[image], [image], TransformationClass -> "Similarity"]//First//LengthConstrain the pair of point sets to be related by a rigid transformation:
ImageCorrespondingPoints[[image], [image], TransformationClass -> "Rigid"]//First//LengthConstrain the pair of point sets to be related by a translation:
ImageCorrespondingPoints[[image], [image], TransformationClass -> "Translation"]Applications (3)
Find matching positions for stereovision applications:
ImageCorrespondingPoints[[image], [image], TransformationClass -> "Perspective"]Extract the matching patches from two images:
i1 = [image];i2 = [image];
matches = ImageCorrespondingPoints[i1, i2, "Transformation" -> "Perspective"];
MapThread[ImageTrim, {{i1, i2}, matches}]Find the rotation angle between two images:
i1 = [image];i2 = [image];
matches = ImageCorrespondingPoints[i1, i2];
a1 = ArcTan@@@(# - 1 / 2 * ImageDimensions@i1& /@ matches[[1]]);
a2 = ArcTan@@@(# - 1 / 2 * ImageDimensions@i2& /@ matches[[2]]);
RootMeanSquare[Mod[a1 - a2, 2 Pi]] / DegreeProperties & Relations (1)
ImageCorrespondingPoints converts all images to grayscale:
{i1, i2} = {[image], [image]};ImageCorrespondingPoints[i1, i2] == ImageCorrespondingPoints[Sequence@@ColorConvert[{i1, i2}, "Grayscale"]]History
Introduced in 2010 (8.0) | Updated in 2012 (9.0) ▪ 2014 (10.0) ▪ 2016 (11.0) ▪ 2017 (11.1) ▪ 2021 (13.0)
Text
Wolfram Research (2010), ImageCorrespondingPoints, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageCorrespondingPoints.html (updated 2021).
CMS
Wolfram Language. 2010. "ImageCorrespondingPoints." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ImageCorrespondingPoints.html.
APA
Wolfram Language. (2010). ImageCorrespondingPoints. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageCorrespondingPoints.html
BibTeX
@misc{reference.wolfram_2026_imagecorrespondingpoints, author="Wolfram Research", title="{ImageCorrespondingPoints}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/ImageCorrespondingPoints.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_imagecorrespondingpoints, organization={Wolfram Research}, title={ImageCorrespondingPoints}, year={2021}, url={https://reference.wolfram.com/language/ref/ImageCorrespondingPoints.html}, note=[Accessed: 12-June-2026]}