CN113538529A - Image registration apparatus - Google Patents

Image registration apparatus Download PDF

Info

Publication number
CN113538529A
CN113538529A CN202010296190.1A CN202010296190A CN113538529A CN 113538529 A CN113538529 A CN 113538529A CN 202010296190 A CN202010296190 A CN 202010296190A CN 113538529 A CN113538529 A CN 113538529A
Authority
CN
China
Prior art keywords
image
checkerboard
camera
target
distance
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.)
Granted
Application number
CN202010296190.1A
Other languages
Chinese (zh)
Other versions
CN113538529B (en
Inventor
丁红艳
田仁富
沈玉姣
刘刚
曾峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010296190.1A priority Critical patent/CN113538529B/en
Publication of CN113538529A publication Critical patent/CN113538529A/en
Application granted granted Critical
Publication of CN113538529B publication Critical patent/CN113538529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T5/80
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20228Disparity calculation for image-based rendering

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 a target registration parameter corresponding to the first camera; the calculation 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 the 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 loss of field of view of the resulting registered image.

Description

Image registration apparatus
Technical Field
The invention relates to the technical field of image processing, in particular to an image registration device.
Background
At present, distortion and relative spatial position relation of two cameras are determined by adopting a Zhang Zhengyou calibration algorithm in the related technology, and then image registration is realized by correcting the distortion and the relative spatial position relation of the cameras. However, this method has a serious loss of field of view of the registered images due to the correction of the distortion and relative spatial position relationship of the two cameras. Wherein, the visual field loss means: 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 loss.
The invention provides a double-camera image registration scheme, which can reduce the field loss of an obtained registration image.
Disclosure of Invention
It is an object of embodiments of the present invention to provide an image registration apparatus to reduce the field-of-view loss of the resulting registered images. 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 target object and the distance between the second camera and the target object are target distances;
the determining module is used for determining a target registration parameter corresponding to the first camera; wherein the target registration parameters are: shifting amounts of grid points of the first image divided into the plurality of grids with respect to grid points of the second image divided into the plurality of grids when the target object is photographed at the distance from the target;
the calculation 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 the 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 target object and the distance between the second camera and the target object are target distances; determining a target registration parameter corresponding to the first camera; wherein the target registration parameters are: shifting amounts of grid points of the first image divided into the plurality of grids with respect to grid points of the second image divided into the plurality of grids when the target object is photographed at the distance from the target; 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 the 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, the registered image registered with the second image can be corrected based on the local interpolation algorithm, and the field of view loss of the obtained registered image is small.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
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 the 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 flowchart of forward mapping for image rectification of left and right cameras 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 technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following first explains the related terms relating to the embodiments of the present invention.
Two cameras: the cameras are placed side by side about two, and two cameras are located same water flat line.
Image registration: the method refers to a process of matching and superposing two or more images acquired at different times, different imaging devices or under different conditions (illumination, camera positions and angles).
Loss of field of view: after the image is corrected, the field of view is reduced relative to the original image, where the reduction is referred to as field loss, and assuming that the number of effective pixels remaining after the image is corrected is a and the total number of pixels of the original image is b1, the field loss calculation formula is as follows:
Figure BDA0002452281220000031
parallax value: the parallax refers to a direction difference generated when a dual-camera system observes the same target, and specifically, the parallax refers to a direction difference generated when the same target is observed from two points having a certain distance, wherein an included angle between the two points when the target is seen is called the parallax of the two points, and the distance between the two points is called a baseline. Assuming that the focal length of the camera is f and the baseline distance is b2, the parallax value d at the distance Z is calculated as follows:
Figure BDA0002452281220000032
wherein, for a given two-camera system, the disparity value d is inversely proportional to the distance Z, the closer the distance, the greater the disparity, and the farther the distance, the smaller the disparity.
In the related technology, distortion and relative spatial position relation of two cameras are determined by adopting Zhangyingyou calibration algorithm, and then image registration is realized by correcting the distortion and relative spatial position relation of the cameras. However, this method corrects the distortion and relative spatial position relationship of the two cameras, resulting in serious loss of field of view of the registered image and serious degradation of sharpness.
In order to solve the technical problem, embodiments of the present invention provide an image registration method and apparatus.
Fig. 1 is a flowchart of an image registration method according to an embodiment of the present invention. Referring to fig. 1, an image registration method provided by an embodiment of the present invention may include the following steps:
s101: acquiring a first image obtained by shooting a target object by a first camera, and acquiring 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 target object and the distance between the second camera and the target object are target distances;
s102: determining a target registration parameter corresponding to the first camera; wherein the target registration parameters are: shifting amounts of grid points of the first image divided into the plurality of grids with respect to grid points of the second image divided into the plurality of grids when the target object is photographed at the distance from the target;
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 the 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, the image registration method provided by the embodiment of the invention can calculate the offset of each pixel point outside the grid point in the first image based on the local interpolation algorithm to obtain the target offset, and further can obtain the registration image registered with the second image according to the target registration parameter and the target offset, and the field loss of the registration image obtained by the registration method is small.
The image registration method shown in fig. 1 will be described in detail below by way of a specific embodiment.
S101: acquiring a first image obtained by shooting a target object by a first camera, and acquiring 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 target object and the distance between the second camera and the target object are target distances;
s102: determining a target registration parameter corresponding to the first camera; wherein the target registration parameters are: shifting amounts of grid points of the first image divided into the plurality of grids with respect to grid points of the second image divided into the plurality of grids when the target object is photographed at the distance from the target;
the method for 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 at a second preset distance; calculating a corresponding weight value at 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; and calculating a target registration parameter corresponding to the first camera at 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 obtained by pre-calibration. When the target registration parameter of the first camera at any target distance needs to be determined, the first registration parameter and the second registration parameter can be read.
The obtaining of the first registration parameter of the image shot by the first camera at the first preset distance may include:
acquiring a first checkerboard image shot by a first camera at a first preset distance from a first preset checkerboard; acquiring 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 grids 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 checkerboard corner points adjacent to the first grid point relative to the checkerboard corner points in the second checkerboard image to obtain a first registration parameter.
It can be understood that the first registration parameter of the image captured by the first camera at the first preset distance can be calibrated by the calibration device composed of the first camera and the first preset checkerboard. The first predetermined checkerboard may be a checkerboard array board composed of a plurality of checkerboards.
A 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, there may be a checkerboard array in the first checkerboard image. The first checkerboard array may then be divided into (N-1) × (N-1) first grids using the grids shown in FIG. 4, resulting in NxN grid points. Fig. 4 is a schematic diagram of N × N grid points according to an embodiment of the present invention.
The offset for a first grid point may then be calculated based on the coordinate offsets of the checkerboard corner points adjacent to the first grid point with respect to the checkerboard corner points in the second checkerboard image. For example, for grid point k, 3 tessellated corner point pairs which are nearest to grid point k and are not collinear may be searched with grid point k as the center, and the pixel coordinates thereof are (x) respectivelyl1,yl1) And (x)r1,yr1)、(xl2,yl2) And (x)r2,yr2)、(xl3,yl3) And (x)r3,yr3). Wherein (x)l1,yl1)、(xl2,yl2) And (x)l3,yl3) The coordinates of the corner points of the first checkerboard image which are nearest to the grid point k and are not collinear are 3 (x)r1,yr1)、(xr2,yr2) And (x)r3,yr3) The coordinates of the nearest non-collinear 3 checkerboard corner points in the second checkerboard image from the grid point corresponding to grid point k. Wherein the offset xoffset at grid point kkAnd yoffsetkThe calculation formula is as follows:
Figure BDA0002452281220000061
Figure BDA0002452281220000062
after the offsets of the N × N grid points in the first image are obtained through calculation, the offsets of the N × N grid points may be stored in hardware as image registration parameters, so as to obtain first registration parameters at a first preset distance.
It can be understood that, when the first predetermined distance is the closer distance, since a first predetermined checkerboard can be easily disposed, the first predetermined checkerboard can fill the entire field of view of the first camera. In this case, only one first checkerboard image needs to be obtained by shooting the first checkerboard once. That is to say, for the first camera, the registration calibration of the first camera at the first preset distance can be completed only by acquiring an image once, and the calibration speed is high. Wherein, under this kind of circumstances, first predetermine the checkerboard can be for having the checkerboard of the same check of polylith of record to can be full of this first camera's whole field of view scope.
In addition, the obtaining of the second registration parameter of the image shot by the first camera at 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 local checkerboard images obtained by scanning a second preset checkerboard through 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 a preset number of local checkerboard images obtained by scanning a second preset checkerboard through a second camera;
dividing the third checkerboard image into a first preset number of third grids 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 points adjacent to the third grid point relative to the checkerboard corner points in the fourth checkerboard image to obtain a second registration parameter.
It can be understood that the second registration parameter of the image captured by the first camera at the second preset distance can be calibrated by the calibration device composed of the first camera and the second preset checkerboard. Wherein, the second predetermined checkerboard may be a checkerboard array board formed by 1 checkerboard.
When the second preset distance is a longer distance, the second preset checkerboard is not easy to set, so that the second preset checkerboard can fill the whole field range of the first camera. In this case, the second predetermined checkerboard may be set as a checkerboard in which one checkerboard is recorded. Then, the first camera can be driven by the rotating device to automatically scan, so that local checkerboard images in different areas in the second preset checkerboard can be collected, and the collected local checkerboard images are combined to obtain a third checkerboard image. Therefore, the chessboard boards do not need to be frequently replaced according to the change of the distance, and the calibration time is saved.
It can be understood that, at any distance, the first camera can automatically scan under the driving of the rotating device, collect the local checkerboard images in different areas of the second preset checkerboard, and combine the collected multiple local checkerboard images to obtain a third checkerboard image, so as to obtain the registration parameter at the distance based on the third checkerboard image. Wherein, the quantity of the plurality of local checkerboard images collected under different distances is different.
A third checkerboard image captured by the first camera at a 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 the manner of obtaining the first registration parameter, and is not described herein again.
It is understood that it is reasonable to use the third checkerboard image to perform the calibration of the registration parameters at a long distance, and also to perform the calibration of the registration parameters at an arbitrary distance.
In addition, when the first preset distance is smaller than the second preset distance, the first preset checkerboard may also be a checkerboard in which one checkerboard is recorded, and the second preset checkerboard may be a checkerboard in which a plurality of checkerboards are recorded, 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 utilizedsA first registration parameter of and a second predetermined distance Z of a distancelThe second registration parameter can obtain a registration parameter of any target distance, and the detailed implementation process is as follows:
generating a first registration parameter and a second registration parameter according to calibration and a set target distance Z (Z)1≤Z≤Z2) Using parallaxAnd calculating the weight of the value, and calculating the target registration parameter at the target distance Z by interpolation. Wherein Z is1The closest distance, Z, that the first camera and the second camera can shoot2The distance between the first camera and the second camera is the farthest distance that the first camera and the second camera can shoot. Based on this, the target distance can be divided into three stages of processing:
a section A: when Z is1≤Z<ZsUsing a global offset pair ZsAnd correcting the registration parameters to obtain the registration parameters at the target distance Z. Actually measured Z1A global offset of
Figure BDA0002452281220000071
Suppose ZsAt the kth grid point by an offset of
Figure BDA0002452281220000081
And
Figure BDA0002452281220000082
then, the formula for calculating the weighted value W at the target distance Z and the preset offset of the kth grid point is as follows:
Figure BDA0002452281220000083
Figure BDA0002452281220000084
Figure BDA0002452281220000085
in the above formula dz、dz1、dzsRespectively, represent distance Z, Z1、ZsWhere W is a weight coefficient. Press the above formula to ZsAnd correcting the first registration parameter to obtain a target registration parameter at the target distance Z.
And B, section: when Z iss≤Z≤ZlWhen, parallax may be adoptedValue as weight, for ZsFirst registration parameter of (a) and (Z)lThe second registration parameter is interpolated to obtain the target registration parameter at the distance Z. Suppose ZsAt the kth grid point by an offset of
Figure BDA0002452281220000086
And
Figure BDA0002452281220000087
Zlat the kth grid point by an offset of
Figure BDA0002452281220000088
And
Figure BDA0002452281220000089
then, the formula for calculating the weighted value W at the target distance Z and the preset offset of the kth grid point is as follows:
Figure BDA00024522812200000810
Figure BDA00024522812200000811
Figure BDA00024522812200000812
in the above formula dz、dzs、dzlRespectively, represent distance Z, Zs、ZlThe disparity value of (a). Press the above formula to ZsAnd ZlAnd interpolating the registration parameters to obtain the registration parameters at the distance Z.
And C, section: when Z isl<Z≤Z2Using a global offset pair ZlAnd correcting the second registration parameter to obtain a target registration parameter at the distance Z. Actually measured Z2A global offset of
Figure BDA00024522812200000813
Suppose ZlAt the kth grid point by an offset of
Figure BDA00024522812200000814
And
Figure BDA00024522812200000815
then, the formula for calculating the weighted value W at the target distance Z and the preset offset of the kth grid point is as follows:
Figure BDA00024522812200000816
Figure BDA00024522812200000817
Figure BDA00024522812200000818
in the above formula dz、dzl、dz2Respectively, represent distance Z, Zl、Z2The disparity value of (a). Press the above formula to ZlAnd correcting the registration parameters to obtain 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 the target offset;
the local offset interpolation based on the local interpolation algorithm is realized as follows: as shown in FIG. 5, assume that any pixel Q is located at a grid point P1、P2、P3、P4Rectangular region formed by pixels Q and P1P2Euclidean distance of L1And P is2P3Euclidean distance of L2And P is3P4Euclidean distance of L3And P is4P1Euclidean distance of L4The offset xoffset at the pixel point QQAnd yoffsetQThe calculation formula is as follows:
Figure BDA0002452281220000091
Figure BDA0002452281220000092
Figure BDA0002452281220000093
Figure BDA0002452281220000094
xoffsetQ=WP1×xoffsetP1+WP2×xoffsetP2+WP3×xoffsetP3+WP4×xoffsetP4
yoffsetQ=WP1×yoffsetP1+WP2×yoffsetP2+WP3×yoffsetP3+WP4×yoffsetP4
that is, the offset of each pixel point position outside the grid points in the first image with respect to the corresponding pixel point in the second image may be calculated according to the target registration parameter and the 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.
Wherein, the inner rectangle can be calculated according to the target registration parameter at the target distance Z, and is used for removing the black edge generated by image correction. The inner rectangle is the largest common rectangular area overlapped with the second image after the first image is subjected to offset correction. The first image shift amount correction procedure may be: first image- > local offset interpolation- > offset correction- > registration image.
In addition, if the first camera provided by the embodiment of the present invention is a left camera and the second camera is a right camera, the left and right camera images may be subjected to rectification mapping according to a target registration parameter at a target distance Z. As shown in fig. 6, which is a forward mapping process of image rectification for left and right cameras, the present invention adopts backward mapping, i.e. the inverse process of fig. 6. Wherein, the forward mapping process of the left original graph is as follows: left original graph- > local offset difference- > offset correction- > clipping- > amplifying- > left target graph. That is, the forward mapping procedure of the first image is: and obtaining a first image- > calculating the target offset of each pixel point outside the grid points in the first image according to a local difference algorithm- > correcting the first image according to the target registration parameter and the target offset- > cutting to obtain an inner rectangle- > amplifying the inner rectangle to the field range of the first camera-shooting- > to obtain a registration image.
The forward mapping refers to determining the coordinate position in the left target image based on the coordinate position in the left original image, and the backward mapping refers to determining the coordinate position in the left original image based on the coordinate position in the left target image. In addition, the offset interpolation is realized to be consistent with S103, and the clipping and the amplification are internal rectangles calculated by the step two, and black edges generated by image correction are removed. And, the forward mapping process of the right original graph is as follows: right original graph- > clipping- > enlarging- > right target graph, and the related description can refer to the description for the right original graph, which is not described herein again.
Corresponding to the above method embodiment, an embodiment of the present invention further provides an image registration apparatus, referring to fig. 7, which may include:
an obtaining module 701, configured to obtain a first image obtained by shooting a target object with a first camera, and obtain a second image obtained by shooting the target object with 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 target object and the distance between the second camera and the target object are target distances;
a determining module 702, configured to determine a target registration parameter corresponding to the first camera; wherein the target registration parameters are: shifting amounts of grid points of the first image divided into the plurality of grids with respect to grid points of the second image divided into the plurality of grids when the target object is photographed at the distance from the target;
a calculating module 703, configured to calculate, according to the target registration parameter and the local interpolation algorithm, an offset of each pixel point position outside the grid point in the first image with respect to a corresponding pixel point in the second image, so as to obtain a target offset;
and the correcting module 704 is configured to correct the first image according to the target registration parameter and the target offset, so as 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 target object and the distance between the second camera and the target object are target distances; determining a target registration parameter corresponding to the first camera; wherein the target registration parameters are: shifting amounts of grid points of the first image divided into the plurality of grids with respect to grid points of the second image divided into the plurality of grids when the target object is photographed at the distance from the target; 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 the 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, the registered image registered with the second image can be corrected based on the local interpolation algorithm, and the field of view loss of the obtained registered image is small.
Optionally, the determining module 702 includes:
the device comprises an obtaining unit, a processing unit and a processing unit, wherein the obtaining unit is used for obtaining 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 at a second preset distance;
the first calculating unit is used for calculating a corresponding weight value at a target distance according to a 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;
and the second calculating unit is used for calculating a target registration parameter corresponding to the first camera at the target distance based on the first registration parameter, the second registration parameter, the weight value and a preset offset calculation formula.
Optionally, the obtaining unit is configured to:
acquiring a first checkerboard image shot by a first camera at a first preset distance from a first preset checkerboard;
acquiring 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 grids 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 checkerboard corner points adjacent to the first grid point relative to the checkerboard corner points in the second checkerboard image 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 local checkerboard images obtained by scanning a second preset checkerboard through 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 a preset number of local checkerboard images obtained by scanning a second preset checkerboard through a second camera;
dividing the third checkerboard image into a first preset number of third grids 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 points adjacent to the third grid point relative to the checkerboard corner points in the fourth checkerboard image 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 same checkerboards recorded therein; the second predetermined checkerboard is a checkerboard in which one checkerboard is recorded.
Optionally, the calculation 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, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the 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)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within 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 a first camera and acquiring 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 target object and the distance between the second camera and the target object are target distances;
the determining module is used for determining a target registration parameter corresponding to the first camera; wherein the target registration parameters are: an offset amount of a grid point dividing the first image into a plurality of grids with respect to a grid point dividing the second image into a plurality of grids when the target object is photographed at the target distance;
the calculation 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.
2. The apparatus of claim 1, wherein the determining module comprises:
the acquiring unit is used for acquiring a first registration parameter of an image shot by the first camera at a first preset distance and a second registration parameter of the image shot at a second preset distance;
the first calculating unit is used for calculating a corresponding weight value at the target distance according to a parallax value of the first camera and the second camera at the target distance; wherein the weight value is used to weight the first registration parameter and/or the second registration parameter;
and the second calculating unit is used for calculating a target registration parameter corresponding to the first camera at 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 of 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 checkerboard;
dividing the first checkerboard image into a first preset number of first grids 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 checkerboard corner points adjacent to the first grid point relative to the checkerboard corner points in the second checkerboard image to obtain the first registration parameter.
4. The apparatus of 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 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 the second preset distance from the second preset checkerboard; the fourth checkerboard image is obtained by combining the local checkerboard images of the preset number, which are obtained by scanning the second preset checkerboard by the second camera;
dividing the third checkerboard image into the first preset number of third grids 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 points adjacent to the third grid point relative to the checkerboard corner points in the fourth checkerboard image to obtain the second registration parameter.
5. The apparatus of claim 4, wherein when the first predetermined distance is less than the second predetermined distance, the first predetermined checkerboard is a checkerboard in which a plurality of identical checkerboards are recorded; the second preset checkerboard is a checkerboard recorded with one checkerboard.
6. The apparatus of 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 a bilinear interpolation algorithm to obtain the target offset.
CN202010296190.1A 2020-04-15 2020-04-15 Image registration apparatus Active CN113538529B (en)

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 true CN113538529A (en) 2021-10-22
CN113538529B 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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160117820A1 (en) * 2014-10-23 2016-04-28 Hanwha Techwin Co., Ltd. Image registration method
CN106952262A (en) * 2017-04-25 2017-07-14 大连理工大学 A kind of deck of boat analysis of Machining method based on stereoscopic vision
US20170337682A1 (en) * 2016-05-18 2017-11-23 Siemens Healthcare Gmbh Method and System for Image Registration Using an Intelligent Artificial Agent
CN108305281A (en) * 2018-02-09 2018-07-20 深圳市商汤科技有限公司 Calibration method, device, storage medium, program product and the electronic equipment of image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160117820A1 (en) * 2014-10-23 2016-04-28 Hanwha Techwin Co., Ltd. Image registration method
US20170337682A1 (en) * 2016-05-18 2017-11-23 Siemens Healthcare Gmbh Method and System for Image Registration Using an Intelligent Artificial Agent
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)

* Cited by examiner, † Cited by third party
Title
FENGKAI KE等: "《A high precision image registration method for measurement based on the stereo camera system》", 《OPTIK》 *
靳生洪 等: "《基于高分三号全极化数据的西宁市城区地表地物变化检测》", 《青海大学学报》, vol. 37, no. 1 *

Also Published As

Publication number Publication date
CN113538529B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
JP6722323B2 (en) System and method for imaging device modeling and calibration
US10560684B2 (en) System and methods for calibration of an array camera
US9300946B2 (en) System and method for generating a depth map and fusing images from a camera array
CN105453136B (en) The three-dimensional system for rolling correction, method and apparatus are carried out using automatic focus feedback
US7945091B2 (en) Image processor correcting color misregistration, image processing program, image processing method, and electronic camera
CN105791801B (en) Image processing apparatus, image pick-up device and image processing method
US10638109B2 (en) Method for the FPGA-based long range multi-view stereo with differential image rectification
WO2020010945A1 (en) Image processing method and apparatus, electronic device and computer-readable storage medium
US20090059041A1 (en) Method of correcting image distortion and apparatus for processing image using the method
EP2278788A1 (en) Method and apparatus for correcting lens shading
US10255665B2 (en) Image processing device and method, image capturing device, program, and record medium
US20100033584A1 (en) Image processing device, storage medium storing image processing program, and image pickup apparatus
CN110322485B (en) Rapid image registration method of heterogeneous multi-camera imaging system
JPWO2011010438A1 (en) Parallax detection device, distance measuring device, and parallax detection method
WO2019232793A1 (en) Two-camera calibration method, electronic device and computer-readable storage medium
JP5809865B2 (en) Image processing apparatus and image processing method
US8433187B2 (en) Distance estimation systems and method based on a two-state auto-focus lens
CN111383254A (en) Depth information acquisition method and system and terminal equipment
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
JP5167614B2 (en) Distance image generating apparatus, distance image generating method and program
JP6105960B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP2004220371A (en) Image processing method, image processor, image processing program, and recording medium recorded with image processing program
JP4542821B2 (en) Image processing method, image processing apparatus, and image processing program

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