Method and device for image rectification
AssigneeArcSoft, Inc.
InventorsWang Miao, Li Yu, Xin Fan
Life of this patent
Estimating the term…
Abstract
The present invention provides a method and a device for image rectification, which are applied in the field of image processing. The method includes: receiving two images, the two images are images of a target object captured from different viewpoints; performing an epipolar rectification on the two images; rectifying the two images after the epipolar rectification based on the image contents; and splicing the two images after the rectification based on the image contents. The method can rectify the images captured from different viewpoints, thereby ensuring the pixel alignment, and avoiding visual discomfort to the viewer.
Claims14
A method for image rectification, comprising:
- receiving two images captured by a first image capturing device and a second image capturing device, wherein the two images are images of a target object captured from different viewpoints;
- performing an epipolar rectification on the two images;
- selecting a same focal length parameter for the first image capturing device and the second image capturing device, wherein the two images captured from the different viewpoints have a same field of view after an undistortion without a scaling relationship;
- rectifying the two images after the epipolar rectification based on image contents;
- and
- splicing the two images rectified based on the image contents,
- wherein rectifying the two images comprises determining positions of feature point pairs corresponding in the two images by:
- determining positions of candidate feature point pairs corresponding in the two images;
- removing feature point pairs having a wrong correspondence from the candidate feature point pairs using a Random Sample Consensus (RANSAC) algorithm;
- and
- aligning the two images according to the positions of the feature point pairs and parameters of the first image capturing device and the second image capturing device,
- wherein aligning the two images according to the positions of the feature point pairs and the parameters of the first image capturing device and the second image capturing device comprises:
- determining an error function relative to an obtained first parameter according to the positions of the feature point pairs and the parameters of the first image capturing device and the second image capturing device;
- obtaining optimized parameters of the first image capturing device and the second image capturing device according to the error function;
- and
- adjusting the two images according to the optimized parameters of the first image capturing device and the second image capturing device,
- wherein each feature point pair comprises a first point and a second point,
- wherein determining the error function relative to the obtained first parameter according to the positions of the feature point pairs and the parameters of the first image capturing device and the second image capturing device comprises:
- projecting the first point to an image coordinate system of an image of the second point by a three-dimensional point cloud according to the parameters of the first image capturing device and the second image capturing device to obtain a projection point;
- and
- determining a distance between the projection point and the second point as the error function, and
- wherein the error function comprises a regularization term, and
- wherein the regularization term is determined by a multiplication of a coefficient and a sum of squares of a pair of predetermined rotation-related parameters from the first image capturing device and the second image capturing device.
A device for image rectification, comprising:
- a receiver, configured to receive two images, wherein the two images are images of a target object captured from different viewpoints;
- a first image capturing device having a first focal length parameter and a second image capturing device having a second focal length parameter, wherein the first focal length parameter and the second focal length parameter are the same, wherein the two images captured from the different viewpoints have a same field of view after an undistortion without a scaling relationship, and wherein the first image capturing device and the second image capturing device capture the first image and the second image;
- a rectification processor configured to perform an epipolar rectification on the two images, determine positions of feature point pairs corresponding in the two images, and rectify the two images after the epipolar rectification based on image contents;
- and
- a splicer, configured to splice the two images rectified based on the image contents,
- wherein the rectification processor determines positions of feature point pairs corresponding in the two images by:
- determining positions of candidate feature point pairs corresponding in the two images;
- and
- removing feature point pairs having a wrong correspondence from the candidate feature point pairs using a Random Sample Consensus (RANSAC) algorithm,
- wherein the rectification processor aligns the two images according to the positions of the feature point pairs and parameters of the first image capturing device and the second image capturing device,
- wherein each feature point pair comprises a first point and a second point,
- wherein the rectification processor determines an error function relative to an obtained first parameter according to the positions of the feature point pairs and the parameters of the first image capturing device and the second image capturing device by:
- projecting the first point to an image coordinate system of an image of the second point by a three-dimensional point cloud according to the parameters of the first image capturing device and the second image capturing device to obtain a projection point;
- and
- determining a distance between the projection point and the second point as the error function,
- wherein the rectification processor obtains optimized parameters of the first image capturing device and the second image capturing device according to the error function,
- wherein the rectification processors adjust the two images according to the optimized parameters of the first image capturing device and the second image capturing device,
- wherein the error function comprises a regularization term, and
- wherein the regularization term is determined by a multiplication of a coefficient and a sum of squares of a pair of predetermined rotation-related parameters from the first image capturing device and the second image capturing device.
A system for image rectification, comprising:
- a first image capturing device, a second image capturing device, and a first processor;
- wherein
- the first image capturing device and the second image capturing device are configured to capture images of a target object from different viewpoints and have a same focal length parameter;
- the first processor is configured to acquire the two images of the target object captured from the different viewpoints and determine positions of feature point pairs corresponding in the two images;
- the two images captured from the different viewpoints have a same field of view after an undistortion without a scaling relationship;
- and
- the first processor is further configured to perform an epipolar rectification on the two images, rectify the two images after the epipolar rectification based on image contents, and splice the two images rectified based on the image contents,
- wherein the first processor determines positions of feature point pairs corresponding in the two images by:
- determining positions of candidate feature point pairs corresponding in the two images;
- and
- removing feature point pairs having a wrong correspondence from the candidate feature point pairs using a Random Sample Consensus (RANSAC) algorithm,
- wherein the first processor aligns the two images according to the positions of the feature point pairs and parameters of the first image capturing device and the second image capturing device,
- wherein each feature point pair comprises a first point and a second point,
- wherein the first processor determines an error function relative to an obtained first parameter according to the positions of the feature point pairs and the parameters of the first image capturing device and the second image capturing device by:
- projecting the first point to an image coordinate system of an image of the second point by a three-dimensional point cloud according to the parameters of the first image capturing device and the second image capturing device to obtain a projection point;
- and
- determining a distance between the projection point and the second point as the error function,
- wherein the first processor obtains optimized parameters of the first image capturing device and the second image capturing device according to the error function,
- wherein the first processors adjust the two images according to the optimized parameters of the first image capturing device and the second image capturing device,
- wherein the error function comprises a regularization term, and
- wherein the regularization term is determined by a multiplication of a coefficient and a sum of squares of a pair of predetermined rotation-related parameters from the first image capturing device and the second image capturing device.
Dependencies are inferred from the claim text.