CN113538529B - Image registration apparatus - Google Patents
Image registration apparatus Download PDFInfo
- Publication number
- CN113538529B CN113538529B CN202010296190.1A CN202010296190A CN113538529B CN 113538529 B CN113538529 B CN 113538529B CN 202010296190 A CN202010296190 A CN 202010296190A CN 113538529 B CN113538529 B CN 113538529B
- Authority
- CN
- China
- Prior art keywords
- image
- checkerboard
- camera
- target
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 19
- 238000012937 correction Methods 0.000 claims abstract description 7
- 238000004364 calculation method Methods 0.000 claims description 10
- 238000000034 method Methods 0.000 description 24
- 238000010586 diagram Methods 0.000 description 9
- 238000013507 mapping Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 6
- 238000003702 image correction Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000009977 dual effect Effects 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20228—Disparity calculation for image-based rendering
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
An embodiment of the present invention provides an image registration apparatus, including: the acquisition module is used for acquiring a first image obtained by shooting a target object by the first camera and acquiring a second image obtained by shooting the target object by the second camera; the determining module is used for determining target registration parameters corresponding to the first camera; the calculating module is used for calculating the offset of each pixel point position outside the grid points in the first image relative to the corresponding pixel point in the second image according to the target registration parameters and the local interpolation algorithm to obtain a target offset; and the correction module is used for correcting the first image according to the target registration parameter and the target offset to obtain a registration image registered with the second image. In this way, the resulting registered image registered with the second image may be corrected based on a local interpolation algorithm with less field of view loss of the resulting registered image.
Description
Technical Field
The present invention relates to the field of image processing technology, and in particular, to an image registration apparatus.
Background
Currently, in the related art, a Zhang Zhengyou calibration algorithm is adopted to determine the distortion and the relative spatial position relationship of the dual cameras, and then the image registration is realized by correcting the distortion and the relative spatial position relationship of the cameras. However, this method results in serious field loss of registered images due to correction of distortion and relative spatial positional relationship of the two cameras. Wherein, the field of view loss refers to: after the image is corrected, the field of view of the corrected image is reduced relative to the original image, and the reduction is called field of view loss.
The invention provides a double-camera image registration scheme, so that the field of view loss of the obtained registration image can be reduced.
Disclosure of Invention
It is an aim of embodiments of the present invention to provide an image registration apparatus to reduce field of view loss of the resulting registered image. The specific technical scheme is as follows:
an embodiment of the present invention provides an image registration apparatus, including:
the acquisition module is used for acquiring a first image obtained by shooting a target object by the first camera and acquiring a second image obtained by shooting the target object by the second camera; the first camera and the second camera are positioned on the same horizontal line, and the distance between the first camera and the second camera and the target object is the target distance;
the determining module is used for determining target registration parameters corresponding to the first camera; wherein, the target registration parameters are: when shooting a target object at a distance from the target, dividing a first image into grid points of a plurality of grids, and shifting an amount of grid points of a second image into a plurality of grids;
the calculating module is used for calculating the offset of each pixel point position outside the grid points in the first image relative to the corresponding pixel point in the second image according to the target registration parameters and the local interpolation algorithm to obtain a target offset;
and the correction module is used for correcting the first image according to the target registration parameter and the target offset to obtain a registration image registered with the second image.
In the embodiment of the invention, a first image obtained by shooting a target object by a first camera is obtained, and a second image obtained by shooting the target object by a second camera is obtained; the first camera and the second camera are positioned on the same horizontal line, and the distance between the first camera and the second camera and the target object is the target distance; determining a target registration parameter corresponding to the first camera; wherein, the target registration parameters are: when shooting a target object at a distance from the target, dividing a first image into grid points of a plurality of grids, and shifting an amount of grid points of a second image into a plurality of grids; calculating the offset of each pixel point position outside the grid points in the first image relative to the corresponding pixel point in the second image according to the target registration parameters and the local interpolation algorithm to obtain a target offset; and correcting the first image according to the target registration parameter and the target offset to obtain a registration image registered with the second image. In this way, a registered image registered with the second image can be corrected based on the local interpolation algorithm, and the field of view loss of the resultant registered image is small.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an image registration method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a first checkerboard image according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a third checkerboard image according to an embodiment of the present invention;
fig. 4 is a schematic diagram of n×n grid points according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of local offset interpolation according to an embodiment of the present invention;
fig. 6 is a forward mapping flowchart of left and right camera image correction according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an image registration apparatus according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following first describes related terms related to the embodiments of the present invention.
Double cameras: two cameras are placed side by side about, and two cameras are located same horizontal line.
Image registration: refers to a matching and overlapping process of two or more images acquired at different times, with different imaging devices or under different conditions (illumination, imaging position and angle).
Field loss: after the image is corrected, the field of view is reduced relative to the original image, wherein the reduction is called field of view loss, and the field of view loss calculation formula is as follows assuming that the number of effective pixels reserved after the image is corrected is a and the total number of pixels of the original image is b 1:
disparity value: the parallax refers to a direction difference generated when the two cameras system observes the same target, specifically, the parallax refers to a direction difference generated when the two cameras system observes the same target from two points with a certain distance, wherein an included angle between the two points is called parallax of the two points when the two points are observed from the target, and a distance between the two points is called a base line. Assuming that the focal length of the camera is f and the base line distance is b2, the parallax value d at the distance Z is calculated as follows:
wherein for a given dual camera system, the disparity value d is inversely proportional to the distance Z, the closer the distance, the greater the disparity, the further the distance, the less the disparity.
In the related art, a Zhang Zhengyou calibration algorithm is adopted to determine the distortion and the relative spatial position relationship of the double cameras, and then the image registration is realized by correcting the distortion and the relative spatial position relationship of the cameras. However, the method corrects the distortion of the double cameras and the relative spatial position relationship, so that the field of view loss of the registered images is serious, and the definition is seriously reduced.
In order to solve the technical problems, the embodiment of the invention provides an image registration method and an image registration device.
Fig. 1 is a flowchart of an image registration method according to an embodiment of the present invention. Referring to fig. 1, the image registration method provided by the embodiment of the present invention may include the following steps:
s101: obtaining a first image obtained by shooting a target object by a first camera, and obtaining a second image obtained by shooting the target object by a second camera; the first camera and the second camera are positioned on the same horizontal line, and the distance between the first camera and the second camera and the target object is the target distance;
s102: determining a target registration parameter corresponding to the first camera; wherein, the target registration parameters are: when shooting a target object at a distance from the target, dividing a first image into grid points of a plurality of grids, and shifting an amount of grid points of a second image into a plurality of grids;
s103: calculating the offset of each pixel point position outside the grid points in the first image relative to the corresponding pixel point in the second image according to the target registration parameters and the local interpolation algorithm to obtain a target offset;
s104: and correcting the first image according to the target registration parameter and the target offset to obtain a registration image registered with the second image.
Therefore, according to the image registration method provided by the embodiment of the invention, the offset of each pixel point outside the grid point in the first image can be calculated based on the local interpolation algorithm to obtain the target offset, the registration image registered with the second image can be obtained by correcting the target registration parameter and the target offset, and the field of view loss of the registration image obtained by the registration method is smaller.
The image registration method shown in fig. 1 will be described in detail below by way of specific examples.
S101: obtaining a first image obtained by shooting a target object by a first camera, and obtaining a second image obtained by shooting the target object by a second camera; the first camera and the second camera are positioned on the same horizontal line, and the distance between the first camera and the second camera and the target object is the target distance;
s102: determining a target registration parameter corresponding to the first camera; wherein, the target registration parameters are: when shooting a target object at a distance from the target, dividing a first image into grid points of a plurality of grids, and shifting an amount of grid points of a second image into a plurality of grids;
the determining the target registration parameter corresponding to the first camera may include: acquiring a first registration parameter of an image shot by a first camera at a first preset distance and a second registration parameter of the image shot by the first camera at a second preset distance; calculating a weight value corresponding to the target distance according to the parallax values of the first camera and the second camera at the target distance; the weight value is used for weighting the first registration parameter and/or the second registration parameter; and calculating a target registration parameter corresponding to the first camera under the target distance based on the first registration parameter, the second registration parameter, the weight value and a preset offset calculation formula.
Wherein the first registration parameter and the second registration parameter are pre-calibratable. When the target registration parameters of the first camera under any target distance need to be determined, the first registration parameters and the second registration parameters can be read.
The method for obtaining the first registration parameter of the first camera shooting the image under the first preset distance may include:
obtaining a first checkerboard image shot by a first camera at a first preset distance from a first preset checkerboard; obtaining a second checkerboard image shot by a second camera at a first preset distance from a first preset checkerboard; dividing the first checkerboard image into a first preset number of first grid points to obtain a second preset number of first grid points; and calculating the offset of the first grid point based on the coordinate offset of the grid point adjacent to the first grid point relative to the grid point in the second grid point image, so as to obtain a first registration parameter.
It will be appreciated that the first registration parameter of the first camera capturing the image at the first preset distance may be calibrated by a calibration means constituted by the first camera and the first preset checkerboard. The first preset checkerboard may be a checkerboard array board composed of a plurality of checkerboards.
The first checkerboard image captured by the first camera at a first preset distance from the first preset checkerboard may be as shown in fig. 2.
Fig. 2 is a schematic diagram of a first checkerboard image according to an embodiment of the present invention. As shown in fig. 2, a checkerboard array may be present in the first checkerboard image. Then, the first checkerboard array may be divided into (N-1) x (N-1) first grids using grids as shown in FIG. 4, resulting in N grid points. Fig. 4 is a schematic diagram of n×n grid points according to an embodiment of the present invention.
Then, the offset amount of the first grid point may be calculated based on the coordinate offset amount of the corner points of the checkerboard adjacent to the first grid point with respect to the corner points of the checkerboard in the second checkerboard image. For example, for grid point k, 3 nearest non-collinear checkerboard corner pairs can be searched with respect to grid point k as the center, and the pixel coordinates thereof are (x l1 ,y l1 ) And (x) r1 ,y r1 )、(x l2 ,y l2 ) And (x) r2 ,y r2 )、(x l3 ,y l3 ) And (x) r3 ,y r3 ). Wherein, (x) l1 ,y l1 )、(x l2 ,y l2 ) And (x) l3 ,y l3 ) For the 3 nearest non-collinear tessellation corner coordinates, (x) to the grid point k in the first tessellation image r1 ,y r1 )、(x r2 ,y r2 ) And (x) r3 ,y r3 ) The nearest non-collinear 3 tessellation corner coordinates for the grid point corresponding to grid point k in the second tessellation image. Wherein the offset xoffset at grid point k k And yoffset k The calculation formula is as follows:
after calculating the offsets of the n×n grid points in the first image, the offsets of the n×n grid points may be stored as image registration parameters in hardware, to obtain a first registration parameter at a first preset distance.
It will be appreciated that when the first predetermined distance is shorter, it is easier to set a first predetermined checkerboard, so that the first predetermined checkerboard can fill the entire field of view of the first camera. In this case, the first checkerboard is photographed only once to obtain one first checkerboard image. That is to say, for the first camera, only one image needs to be acquired to complete the registration calibration of the first camera at the first preset distance, and the calibration speed is high. In this case, the first preset checkerboard may be a checkerboard on which a plurality of identical checkerboards are recorded, so as to fill the entire field of view of the first camera.
In addition, the obtaining the second registration parameter of the first camera shooting the image under the second preset distance includes:
obtaining a third checkerboard image shot by the first camera at a second preset distance from the second preset checkerboard; the third checkerboard image is obtained by combining a preset number of block local checkerboard images obtained by scanning a second preset checkerboard by a first camera;
obtaining a fourth checkerboard image shot by the second camera at a second preset distance from a second preset checkerboard; the fourth checkerboard image is obtained by combining a preset number of block local checkerboard images obtained by scanning a second preset checkerboard by a second camera;
dividing the third checkerboard image into a first preset number of third grid points to obtain a second preset number of third grid points; and calculating the offset of the third grid point based on the coordinate offset of the corner points of the checkerboard adjacent to the third grid point relative to the corner points of the checkerboard in the fourth checkerboard image, so as to obtain a second registration parameter.
It will be appreciated that the second registration parameters of the first camera capturing images at the second preset distance may be calibrated by a calibration means constituted by the first camera and the second preset checkerboard. Wherein the second preset checkerboard may be a checkerboard array board formed of 1 checkerboard.
When the second preset distance is longer, a second preset checkerboard is not easy to set, so that the second preset checkerboard can fill the whole view field range of the first camera. In this case, the second preset checkerboard may be set as a checkerboard on which one checkerboard is recorded. Then, the first camera can automatically scan under the drive of the rotating device, so that local checkerboard images of different areas in the second preset checkerboard can be acquired, and the acquired local checkerboard images are combined to obtain a third checkerboard image. Therefore, the checkerboard does not need to be frequently replaced according to the change of the distance, and the calibration time is saved.
It can be understood that under any distance, the first camera can automatically scan under the drive of the rotating device, collect local checkerboard images of different areas in the second preset checkerboard, and combine the collected local checkerboard images to obtain a third checkerboard image, so that registration parameters under the distance are obtained based on the third checkerboard image. Wherein the number of the plurality of local checkerboard images acquired at different distances is different.
The third checkerboard image captured by the first camera at the first preset distance from the second preset checkerboard may be as shown in fig. 3. The manner of obtaining the second registration parameter is similar to that of obtaining the first registration parameter, and will not be described herein.
It is understood that the third checkerboard image can be used for registration parameter calibration at a long distance, and registration parameter calibration at any distance can be performed, which is reasonable.
In addition, when the first preset distance is smaller than the second preset distance, the first preset checkerboard may be a checkerboard with one checkerboard recorded thereon, and the second preset checkerboard may be a checkerboard with multiple checkerboards recorded thereon, which is also reasonable.
Specifically, in the embodiment of the present invention, the first preset distance Z of the close distance obtained by calibration may be utilized s A first registration parameter at a distance and a second preset distance Z at a distance l The second registration parameter at the position can obtain the registration parameter of any target distance, and the detailed implementation flow is as follows:
first and second registration parameters generated from the calibration and a set target distance Z (Z 1 ≤Z≤Z 2 ) The weight is calculated by using the parallax value, and the target registration parameter at the target distance Z is interpolated. Wherein Z is 1 Z is the shortest distance which can be shot by the first camera and the second camera 2 The furthest distance that can be shot for first camera and second camera. Based on this, the target distance can be divided into three processes:
section A: when Z is 1 ≤Z<Z s When using a global offset to Z s And correcting the registration parameters at the position so as to obtain the registration parameters at the position of the target distance Z. Actual measurement of Z 1 Global offset at isLet Z be s The shift amount at the kth grid point is +.>And->The weight value W at the target distance Z and the preset offset calculation formula of the kth grid point are as follows:
d in the above z 、d z1 、d zs Respectively represent distance Z, Z 1 、Z s The disparity value at which W is a weight coefficient. Press on Z s And correcting the first registration parameter at the position to obtain the target registration parameter at the target distance Z.
And B, segment: when Z is s ≤Z≤Z l In this case, the disparity value may be used as a weight for Z s First registration parameter and Z at l And interpolating the second registration parameter at the position so as to obtain the target registration parameter at the distance Z. Let Z be s Offset at the kth grid point isAnd->Z l The shift amount at the kth grid point is +.>And->The weight value W at the target distance Z and the preset offset calculation formula of the kth grid point are as follows:
d in the above z 、d zs 、d zl Respectively represent distance Z, Z s 、Z l A disparity value at the position. Press on Z s And Z l And (5) interpolating the registration parameters at the position to obtain the registration parameters at the distance Z.
C section: when Z is l <Z≤Z 2 When using a global offset to Z l And correcting the second registration parameter at the position so as to obtain the target registration parameter at the position of the distance Z. Actual measurement of Z 2 Global offset at isLet Z be l The shift amount at the kth grid point is +.>And->The weight value W at the target distance Z and the preset offset calculation formula of the kth grid point are as follows:
d in the above z 、d zl 、d z2 Respectively represent distance Z, Z l 、Z 2 A disparity value at the position. Press on Z l And correcting the registration parameters at the position to obtain the target registration parameters at the distance Z.
S103: calculating the offset of each pixel point position outside the grid points in the first image relative to the corresponding pixel point in the second image according to the target registration parameters and the local interpolation algorithm to obtain a target offset;
the implementation mode of local offset interpolation based on the local interpolation algorithm is as follows: as shown in fig. 5, it is assumed that an arbitrary pixel point Q is located at a grid point P 1 、P 2 、P 3 、P 4 Rectangular region formed by pixel points Q and P 1 P 2 The Euclidean distance is L 1 And P 2 P 3 The Euclidean distance is L 2 And P 3 P 4 The Euclidean distance is L 3 And P 4 P 1 The Euclidean distance is L 4 The offset xoffset at pixel Q Q And yoffset Q The calculation formula is as follows:
xoffset Q =W P1 ×xoffset P1 +W P2 ×xoffset P2 +W P3 ×xoffset P3 +W P4 ×xoffset P4
yoffset Q =W P1 ×yoffset P1 +W P2 ×yoffset P2 +W P3 ×yoffset P3 +W P4 ×yoffset P4
that is, the offset of each pixel location outside the grid points in the first image relative to the corresponding pixel in the second image may be calculated based on the target registration parameters and a bilinear interpolation algorithm.
S104: and correcting the first image according to the target registration parameter and the target offset to obtain a registration image registered with the second image.
The inner rectangle can be calculated according to the target registration parameter at the target distance Z and is used for removing black edges generated by image correction. The inner rectangle is the largest public rectangle area overlapped with the second image after the first image is corrected by the offset. The first image offset correction flow may be: first image- > local offset interpolation- > offset correction- > registration image.
In addition, assuming that the first camera provided by the embodiment of the invention is a left camera and the second camera is a right camera, correction mapping can be performed on images of the left and right cameras according to the target registration parameter at the target distance Z. As shown in fig. 6, the present invention adopts a backward mapping, i.e. the inverse process of fig. 6, for the forward mapping flow of left and right camera image correction. The forward mapping flow of the left original graph is as follows: left original graph- > local offset difference- > offset correction- > clipping- > magnification- > left target graph. That is, the forward mapping procedure of the first image is: obtaining a first image, calculating a target offset of each pixel point outside grid points in the first image according to a local difference algorithm, correcting the first image according to a target registration parameter and the target offset, cutting to obtain an inner rectangle, and amplifying the inner rectangle to a field of view range of a first camera to obtain a registration image.
Wherein forward mapping refers to determining the coordinate position in the left target graph based on the coordinate position in the left original graph, and backward mapping refers to determining the coordinate position in the left original graph based on the coordinate position in the left target graph. In addition, the offset interpolation is realized in accordance with S103, and the clipping and the amplification are the inner rectangle calculated by the second step, so that the black edge generated by the image correction is removed. And, the forward mapping flow of the right original graph is: the right original diagram- > clipping- > amplifying- > right target diagram, and the related description may refer to the description of the right original diagram, which is not repeated herein.
Corresponding to the above method embodiment, the embodiment of the present invention further provides an image registration apparatus, referring to fig. 7, which may include:
the obtaining module 701 is configured to obtain a first image obtained by photographing the target object by the first camera, and obtain a second image obtained by photographing the target object by the second camera; the first camera and the second camera are positioned on the same horizontal line, and the distance between the first camera and the second camera and the target object is the target distance;
a determining module 702, configured to determine a target registration parameter corresponding to the first camera; wherein, the target registration parameters are: when shooting a target object at a distance from the target, dividing a first image into grid points of a plurality of grids, and shifting an amount of grid points of a second image into a plurality of grids;
a calculating module 703, configured to calculate, according to the target registration parameter and the local interpolation algorithm, an offset of each pixel position outside the grid point in the first image relative to a corresponding pixel in the second image, to obtain a target offset;
and the correction module 704 is configured to correct the first image according to the target registration parameter and the target offset, so as to obtain a registered image registered with the second image.
In the embodiment of the invention, a first image obtained by shooting a target object by a first camera is obtained, and a second image obtained by shooting the target object by a second camera is obtained; the first camera and the second camera are positioned on the same horizontal line, and the distance between the first camera and the second camera and the target object is the target distance; determining a target registration parameter corresponding to the first camera; wherein, the target registration parameters are: when shooting a target object at a distance from the target, dividing a first image into grid points of a plurality of grids, and shifting an amount of grid points of a second image into a plurality of grids; calculating the offset of each pixel point position outside the grid points in the first image relative to the corresponding pixel point in the second image according to the target registration parameters and the local interpolation algorithm to obtain a target offset; and correcting the first image according to the target registration parameter and the target offset to obtain a registration image registered with the second image. In this way, a registered image registered with the second image can be corrected based on the local interpolation algorithm, and the field of view loss of the resultant registered image is small.
Optionally, the determining module 702 includes:
the acquisition unit is used for acquiring a first registration parameter of the first camera for shooting an image at a first preset distance and a second registration parameter of the first camera for shooting an image at a second preset distance;
the first calculation unit is used for calculating a weight value corresponding to the target distance according to the parallax value of the first camera and the second camera at the target distance; the weight value is used for weighting the first registration parameter and/or the second registration parameter;
the second calculating unit is used for calculating a target registration parameter corresponding to the first camera under the target distance based on the first registration parameter, the second registration parameter, the weight value and a preset offset calculating formula.
Optionally, the obtaining unit is configured to:
obtaining a first checkerboard image shot by a first camera at a first preset distance from a first preset checkerboard;
obtaining a second checkerboard image shot by a second camera at a first preset distance from a first preset checkerboard;
dividing the first checkerboard image into a first preset number of first grid points to obtain a second preset number of first grid points;
and calculating the offset of the first grid point based on the coordinate offset of the grid point adjacent to the first grid point relative to the grid point in the second grid point image, so as to obtain a first registration parameter.
Optionally, the obtaining unit is further configured to:
obtaining a third checkerboard image shot by the first camera at a second preset distance from the second preset checkerboard; the third checkerboard image is obtained by combining a preset number of block local checkerboard images obtained by scanning a second preset checkerboard by a first camera;
obtaining a fourth checkerboard image shot by the second camera at a second preset distance from a second preset checkerboard; the fourth checkerboard image is obtained by combining a preset number of block local checkerboard images obtained by scanning a second preset checkerboard by a second camera;
dividing the third checkerboard image into a first preset number of third grid points to obtain a second preset number of third grid points;
and calculating the offset of the third grid point based on the coordinate offset of the corner points of the checkerboard adjacent to the third grid point relative to the corner points of the checkerboard in the fourth checkerboard image, so as to obtain a second registration parameter.
Optionally, when the first preset distance is smaller than the second preset distance, the first preset checkerboard is a checkerboard with a plurality of identical checkerboards recorded thereon; the second preset checkerboard is a checkerboard with a checkerboard recorded thereon.
Optionally, the computing module 703 is specifically configured to:
and calculating the offset of each pixel point position outside the grid points in the first image relative to the corresponding pixel point in the second image according to the target registration parameters and the bilinear interpolation algorithm to obtain the target offset.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (6)
1. An image registration apparatus, comprising:
the acquisition module is used for acquiring a first image obtained by shooting a target object by the first camera and acquiring a second image obtained by shooting the target object by the second camera; the first camera and the second camera are positioned on the same horizontal line, and the distance between the first camera and the second camera and the target object is a target distance;
the determining module is used for determining target registration parameters corresponding to the first camera; wherein the target registration parameters are: an offset amount of grid points dividing the first image into a plurality of grids with respect to grid points dividing the second image into a plurality of grids when photographing the target object at the target distance;
the calculating module is used for calculating the offset of each pixel point position outside the grid points in the first image relative to the corresponding pixel point in the second image according to the target registration parameters and a local interpolation algorithm to obtain a target offset;
and the correction module is used for correcting the first image according to the target registration parameter and the target offset to obtain a registration image registered with the second image.
2. The apparatus of claim 1, wherein the determining module comprises:
the acquisition unit is used for acquiring a first registration parameter of the first camera for shooting an image at a first preset distance and a second registration parameter of the first camera for shooting an image at a second preset distance;
the first calculation unit is used for calculating a weight value corresponding to the target distance according to the parallax value of the first camera and the second camera at the target distance; wherein the weight value is used for weighting the first registration parameter and/or the second registration parameter;
the second calculating unit is used for calculating a target registration parameter corresponding to the first camera under the target distance based on the first registration parameter, the second registration parameter, the weight value and a preset offset calculation formula.
3. The apparatus according to claim 2, wherein the obtaining unit is configured to:
obtaining a first checkerboard image shot by the first camera at a first preset distance from a first preset checkerboard;
obtaining a second checkerboard image shot by the second camera at the first preset distance from the first preset checkerboard;
dividing the first checkerboard image into a first preset number of first grid points to obtain a second preset number of first grid points;
and calculating the offset of the first grid point based on the coordinate offset of the grid point adjacent to the first grid point relative to the grid point in the second grid point image, so as to obtain the first registration parameter.
4. A device according to claim 3, wherein the obtaining unit is further configured to:
obtaining a third checkerboard image shot by the first camera at a second preset distance from a second preset checkerboard; the third checkerboard image is obtained by combining a preset number of block local checkerboard images obtained by scanning the second preset checkerboard by the first camera;
obtaining a fourth checkerboard image shot by the second camera at a second preset distance from the second preset checkerboard; the fourth checkerboard image is obtained by combining the preset number block partial checkerboard images obtained by scanning the second preset checkerboard by the second camera;
dividing the third checkerboard image into a first preset number of third grid points to obtain a second preset number of third grid points;
and calculating the offset of the third grid point based on the coordinate offset of the checkerboard corner adjacent to the third grid point relative to the checkerboard corner in the fourth checkerboard image, so as to obtain the second registration parameter.
5. The apparatus of claim 4, wherein when the first preset distance is less than the second preset distance, the first preset checkerboard is a checkerboard in which a plurality of identical checkerboards are recorded; the second preset checkerboard is a checkerboard with one checkerboard recorded thereon.
6. The apparatus according to claim 1, wherein the computing module is specifically configured to:
and calculating the offset of each pixel point position outside the grid points in the first image relative to the corresponding pixel point in the second image according to the target registration parameters and the bilinear interpolation algorithm to obtain a target offset.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010296190.1A CN113538529B (en) | 2020-04-15 | 2020-04-15 | Image registration apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010296190.1A CN113538529B (en) | 2020-04-15 | 2020-04-15 | Image registration apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113538529A CN113538529A (en) | 2021-10-22 |
CN113538529B true CN113538529B (en) | 2023-06-02 |
Family
ID=78120083
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010296190.1A Active CN113538529B (en) | 2020-04-15 | 2020-04-15 | Image registration apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113538529B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106952262A (en) * | 2017-04-25 | 2017-07-14 | 大连理工大学 | A kind of deck of boat analysis of Machining method based on stereoscopic vision |
CN108305281A (en) * | 2018-02-09 | 2018-07-20 | 深圳市商汤科技有限公司 | Calibration method, device, storage medium, program product and the electronic equipment of image |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102149276B1 (en) * | 2014-10-23 | 2020-08-28 | 한화테크윈 주식회사 | Method of image registration |
US20170337682A1 (en) * | 2016-05-18 | 2017-11-23 | Siemens Healthcare Gmbh | Method and System for Image Registration Using an Intelligent Artificial Agent |
-
2020
- 2020-04-15 CN CN202010296190.1A patent/CN113538529B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106952262A (en) * | 2017-04-25 | 2017-07-14 | 大连理工大学 | A kind of deck of boat analysis of Machining method based on stereoscopic vision |
CN108305281A (en) * | 2018-02-09 | 2018-07-20 | 深圳市商汤科技有限公司 | Calibration method, device, storage medium, program product and the electronic equipment of image |
Non-Patent Citations (2)
Title |
---|
《A high precision image registration method for measurement based on the stereo camera system》;Fengkai Ke等;《Optik》;全文 * |
《基于高分三号全极化数据的西宁市城区地表地物变化检测》;靳生洪 等;《青海大学学报》;第37卷(第1期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113538529A (en) | 2021-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9300946B2 (en) | System and method for generating a depth map and fusing images from a camera array | |
JP6299124B2 (en) | Projection system, image processing apparatus, projection method, and program | |
US7945091B2 (en) | Image processor correcting color misregistration, image processing program, image processing method, and electronic camera | |
JP5709911B2 (en) | Image processing method, image processing apparatus, image processing program, and imaging apparatus | |
KR101589310B1 (en) | Lens shading correction method and apparatus | |
US8199202B2 (en) | Image processing device, storage medium storing image processing program, and image pickup apparatus | |
US8610801B2 (en) | Image processing apparatus including chromatic aberration correcting circuit and image processing method | |
JP6308748B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
US10255665B2 (en) | Image processing device and method, image capturing device, program, and record medium | |
US20100245632A1 (en) | Noise reduction method for video signal and image pickup apparatus | |
CN110322485B (en) | Rapid image registration method of heterogeneous multi-camera imaging system | |
CN105791801A (en) | Image Processing Apparatus, Image Pickup Apparatus, Image Processing Method | |
US20120327259A1 (en) | Image processing device, image processing method, image capturing device, and program | |
WO2016185832A1 (en) | Image processing device, image processing method, and program | |
WO2019232793A1 (en) | Two-camera calibration method, electronic device and computer-readable storage medium | |
CN108917722B (en) | Vegetation coverage degree calculation method and device | |
WO2009141403A1 (en) | Correction of optical lateral chromatic aberration in digital imaging systems | |
CN113538529B (en) | Image registration apparatus | |
Stamatopoulos et al. | Accuracy aspects of utilizing raw imagery in photogrammetric measurement | |
KR101578029B1 (en) | Apparatus and method for correcting image distortion | |
JP4994158B2 (en) | Image correction device | |
JP6176073B2 (en) | Imaging system and program | |
JP2009302960A (en) | Video signal processing apparatus, program and method | |
JP6105960B2 (en) | Image processing apparatus, image processing method, and imaging apparatus | |
JP2015109681A (en) | Image processing method, image processing apparatus, image processing program, and imaging apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |