Tunnel image splicing method and system
Technical field
The invention belongs to technical field of computer vision, in particular to tunnel image joint technical field, can obtain big
The tunnel scene image at visual angle.
Background technique
Since tunnel-liner section is generally bigger, in order to reach relatively high Crack Detection precision, it is necessary to by more
A area array cameras realizes the covering on tunnel-liner surface.There can be certain overlapping region between every two camera.In order to straight
The disease on the displaying tunnel-liner surface of sight, needs the image data multiple area array cameras to be spliced.I.e. number Zhang Youchong
The image of folded part, different perspectives are combined into the seamless high-definition picture of width large size.
Tunnel image joint be by and meanwhile shoot multiple images with intersection in the same section in tunnel by registration,
Fusion is spliced into the big visual field picture that a width includes section.Current image mosaic technology mainly has the method and frequency domain of time domain
In phase correlation method etc..Wherein the method based on characteristic matching is a kind of method more commonly used at present.G.P.Stein is proposed
Parametric solution method, although precision is higher, its detect consecutive frame between textural characteristics bring calculation amount can not expire
The requirement of the quick tunnel image joint of foot.Characteristic point is carried out based on Feature Points Matching, such as some characteristic point detective operators of SIFT
Matched mode, calculation amount is huge during carrying out Feature Points Matching, and tunnel image joint speed is not able to satisfy, and right
Single in the fire resistant coating or cement surface texture of tunnel image, feature is less, the method based on Feature Points Matching often for
This kind of tunnel images do not work.
The general smoother of tunnel wall surface in reality.Textural characteristics are relatively simple, in addition to having crack, water stain etc. some
Outside facility on region and tunnel wall with disease, other regions of tunnel include less feature.SIFT etc. one is only used only
Method of the class based on Feature Points Matching is to be unable to complete the splicing in entire tunnel, and be unable to satisfy the great tunnel shadow of data volume
As splicing requires.
In order to guarantee tunnel image resolution ratio with higher, using different cameral and different focal length, tunnel image is acquired,
Therefore tunnel image to be spliced includes image captured by numerous different camerals and different focal length mirror, is mentioned to the robustness of splicing
Bigger challenge is gone out.
Summary of the invention
The present invention provides a kind of quick joining method of tunnel image and system according to prior art defect.
To achieve the above object, the present invention provides a kind of tunnel image splicing method, for for tunnel image collection system
The image of each camera acquisition is spliced in system, and the tunnel image acquisition system includes multiple cameras and a laser scanning
Instrument, in acquisition vehicle travel process, all cameras expose the tunnel image for obtaining corresponding section simultaneously, to all in certain section
The tunnel image that camera single exposure obtains is spliced, and is included the following steps,
Step 1, normalized image, the data based on laser scanner, according to camera obtained by preparatory calibration and laser scanning
The relative positional relationship of instrument calculates the corresponding object distance of each camera, extracts normalization coefficient, to the image of each camera acquisition
It is normalized, obtains the consistent image to be spliced of resolution ratio;
The image of each camera acquisition is normalized in the extraction normalization coefficient, and implementation is as follows,
Firstly, the resolution ratio of each image shot by camera is acquired using following formula,
Wherein, r is the resolution ratio of image, and dpi is the size of each pixel on camera CCD, and f is the focal length of camera, and s is to throw
The radius of shadow;
Then, after the resolution ratio for obtaining each image shot by camera, reference resolution is chosen, corresponding camera is denoted as base
Quasi- camera;The resolution ratio of other image shot by camera and the ratio of the reference resolution are calculated, the ratio of acquisition is normalization system
Number;
Finally, according to the normalization coefficient being calculated;By the width of the resolution ratio of other image shot by camera it is high respectively with
Corresponding normalization coefficient makees product, the image after obtaining corresponding normalization;
Step 2, cylindrical surface projecting, according to conic projection formula, all image projections to be spliced that step 1 is obtained to circle
On cylinder, wherein the focal length of conic projection is the corresponding focal length of benchmark camera and projection radius with projection radius;
The inverse formula of the conic projection formula is as follows,
Wherein, (x, y) indicates that the coordinate of the point on original image, (x ', y ') indicate that the coordinate of the point after projection, f indicate
The focal length of camera lens, s indicate projection radius;
Step 3, characteristic matching, including match point is obtained using characteristic matching, the part invalid to characteristic matching is using mark
Fixed matching obtains match point, and rejects the interference of mispairing point pair;
Step 4, calculate transformation matrix, to the match point that step 3 is handled be calculated size be 3 × 3 it is initial
Transformation matrix simplify and extracts translation parameters, obtains transformation matrix final between image;
Step 5, unified coordinate system, using final transformation matrix obtained by step 4 by image to be spliced obtained by step 2
It is successively transformed into reference in coordinate systems in image, forms the big view field image of a width;
Step 6, image co-registration are merged the overlapping region of image to be spliced to obtain the smooth and seamless of splicing reconstruct
Tunnel image.
Moreover, obtaining being achieved in that for match point using calibration in step 3, tunnel model offer is pre-established
Calibration field acquires the image that calibration paper is posted on tunnel model, carries out feature point extraction to the adjacent image after acquisition, obtains mark
Match point is determined, when there is the invalid part of characteristic matching, to the partial response calibration according to corresponding obtained by step 1
Normalization coefficient processing, then according on the image after the mode conversion to cylindrical surface projecting of step 2, obtains final match point.
Moreover, initial transformation matrix is homography matrix in step 4.
Moreover, image co-registration uses laplacian pyramid amalgamation mode in step 6.
Moreover, the lap between adjacent sections is removed, is obtained whole according to the splicing result of the image of single section
The splicing result of a tunnel image.
The present invention provides a kind of tunnel image joint system, for acquiring for camera each in tunnel image acquisition system
Image spliced, the tunnel image acquisition system includes multiple cameras and a laser scanner, in acquisition vehicle row
During sailing, all cameras expose the tunnel image for obtaining corresponding section simultaneously, obtain in all camera single exposures of certain section
The tunnel image taken is spliced, and is comprised the following modules,
Normalized image module is swept according to camera obtained by preparatory calibration with laser for the data based on laser scanner
The relative positional relationship for retouching instrument calculates the corresponding object distance of each camera, extracts normalization coefficient, to the figure of each camera acquisition
As being normalized, the consistent image to be spliced of resolution ratio is obtained;
The image of each camera acquisition is normalized in the extraction normalization coefficient, and implementation is as follows,
Firstly, the resolution ratio of each image shot by camera is acquired using following formula,
Wherein, r is the resolution ratio of image, and dpi is the size of each pixel on camera CCD, and f is the focal length of camera, and s is to throw
The radius of shadow;
Then, after the resolution ratio for obtaining each image shot by camera, reference resolution is chosen, corresponding camera is denoted as base
Quasi- camera;The resolution ratio of other image shot by camera and the ratio of the reference resolution are calculated, the ratio of acquisition is normalization system
Number;
Finally, according to the normalization coefficient being calculated;By the width of the resolution ratio of other image shot by camera it is high respectively with
Corresponding normalization coefficient makees product, the image after obtaining corresponding normalization;
Cylindrical surface projecting module is used for according to conic projection formula, all figures to be spliced that normalized image module is obtained
As projecting on cylindrical surface, wherein the focal length of conic projection and projection radius are the corresponding focal lengths of benchmark camera and project radius;
The inverse formula of the conic projection formula is as follows,
Wherein, (x, y) indicates that the coordinate of the point on original image, (x ', y ') indicate that the coordinate of the point after projection, f indicate
The focal length of camera lens, s indicate projection radius;
Characteristic matching module, for obtaining match point using characteristic matching, the part invalid to characteristic matching is using calibration
Matching obtains match point, and rejects the interference of mispairing point pair;
Transformation matrix module, for size to be calculated as at the beginning of 3 × 3 to the match point that characteristic matching module is handled
Beginning transformation matrix simplify and extracts translation parameters, obtains transformation matrix final between image;
Coordinate system unified modules, for utilizing transformation matrix final obtained by transformation matrix module by cylindrical surface projecting module institute
It obtains image to be spliced to be successively transformed into reference in coordinate systems in image, forms the big view field image of a width;
Image co-registration module obtains the smooth and seamless of splicing reconstruct for being merged the overlapping region of image to be spliced
Tunnel image.
Moreover, obtaining being achieved in that for match point in characteristic matching module using calibration, pre-establishing tunnel mould
Type provides calibration field, acquires the image that calibration paper is posted on tunnel model, carries out feature point extraction to the adjacent image after acquisition,
Calibration point is obtained, when there is the invalid part of characteristic matching, to the partial response calibration according to normalized image
Corresponding normalization coefficient processing obtained by module, then according to the image after the mode conversion to cylindrical surface projecting of cylindrical surface projecting module
On, obtain final match point.
Moreover, initial transformation matrix is homography matrix in transformation matrix module.
Moreover, image co-registration uses laplacian pyramid amalgamation mode in image co-registration module.
Moreover, setting output module, for the splicing result according to the image of single section, by the weight between adjacent sections
Folded part removes, and obtains the splicing result of entire tunnel image.
The actual conditions in present invention combination China disclose a kind of tunnel image combined based on feature and photography geometry
Splicing scheme, has that splicing speed is fast, splicing precision is higher, and robustness is high, the advantages such as practical, spliced tunnel
Image remains the resolution ratio of initial data, detects convenient for subsequent tunnel defect.
Detailed description of the invention
Fig. 1 is the flow chart of the embodiment of the present invention.
Fig. 2 is the normalization schematic diagram of the embodiment of the present invention.
Fig. 3 is that the transformation parameter of the embodiment of the present invention extracts schematic diagram.
Fig. 4 is that the translation parameters of the embodiment of the present invention extracts schematic diagram.
Specific embodiment
In order to make the objectives, technical solutions and advantages of the present invention clearer, below with reference to embodiment and referring to attached drawing,
The present invention is described in more detail.It should be understood that these descriptions are merely illustrative, and it is not intended to limit model of the invention
It encloses.
The present invention is a kind of quickly to be spliced based on Feature Points Matching and the tunnel image that combines of artificial point feature point matching
Method.Specific implementation step as shown in Figure 1, the realization process of embodiment can be summarized as following steps, each step
It is embodied as follows:
Step 1: normalized image, based on the data by laser scanner, the camera obtained according to preparatory calibration and scanning
The relative positional relationship of instrument calculates the corresponding object distance of each camera, extracts normalization coefficient, place is normalized to image
Reason, obtains the consistent image to be spliced of resolution ratio.
The tunnel image acquisition system that data source of the present invention uses is onboard system, including the multiple cameras of setting (such as
16) and a laser scanner.Camera is respectively erected in one and is similar in the rigid arc frame of semicircle, and arc frame is placed in and vehicle
On the vertical automobile of line direction.In acquisition vehicle travel process, camera is once exposed according to certain triggering spacing, all cameras
The tunnel image that light obtains, as a section, the information comprising this section of tunnel.During laser scanner is generally placed upon under arc frame
Between.In order to guarantee the tunnel image resolution ratio with higher of acquisition, convenient for the Defect inspection of subsequent tunnel, tunnel image is adopted
Collection has used the camera of multiple and different models and the camera lens of different focal length.Different types of camera and camera lens matched combined are at tunnel
Road image capturing system, so that tunnel image of the source data packet containing different resolution of acquisition, right for subsequent splicing
The image of different resolution has carried out normalized, i.e. unified resolution.
Referring to fig. 2, in order to obtain the acquisition of each camera image resolution ratio, need to obtain corresponding object when camera acquisition
Away from being calculated.The outer school of engaging in an inspection of camera and laser, the outer ginseng matrix of available camera and laser are carried out in advance, i.e. calibration obtains
The relative positional relationship of the camera and scanner that arrive, according to the data laser scanner of laser scanner to tunnel when acquisition
Laser coordinate system is transformed to camera coordinates system by outer ginseng matrix and camera internal reference matrix and projected by the distance of wall, is resolved
Each camera pair obtains corresponding object distance (i.e. the distance of camera to tunnel wall) when the acquisition of each camera, each camera corresponding one
A object distance.With the serial number abscissa of camera, object distance is ordinate, establishes rectangular coordinate system, (every to all the points in coordinate system
The corresponding point of a camera) it is fitted, so that the line of the point after fitting is smooth curve.The object that resolving is obtained in this way
Away from carrying out curve fitting, that is, it is fitted laser data, eliminates the interference of noise.The internal reference calibration for first passing through camera in advance can acquire each
The focal length of a camera acquires the resolution ratio of the image obtained after each camera shooting using following formula.
Wherein, r is the resolution ratio of image, and dpi is the size of each pixel on camera CCD (charge coupled cell), and f is phase
The focal length of machine, s are projection radius.
After the resolution ratio for obtaining each image shot by camera, one of which can be chosen as reference resolution, such as take
Lowest resolution, can also take highest resolution or any one.Embodiment is minimum for base with all resolution ratio intermediate-resolutions
Standard, the corresponding camera of the minimum image of intermediate-resolution are benchmark camera.It calculates other image resolution ratios and the benchmark is differentiated
The ratio of rate, the ratio of acquisition are normalization coefficient.According to the image resolution ratio normalization coefficient being calculated.By each width
The high corresponding normalization coefficient respectively of the width of image makees product, the image after obtaining normalization.Benchmark camera itself is visual
It is 1 for normalization coefficient, product processing can be carried out respectively to other image shot by camera other than benchmark camera.
Step 2: cylindrical surface projecting, according to conic projection formula, by all image projections to cylindrical surface to be spliced, so that
Shooting image meets visual consistency.
In order to maintain the space constraint relationship in actual scene, need uniformly to be mapped to one to the tunnel image after normalization
On the cylindrical surface projecting face of a standard, cylindrical picture sequence is obtained.For example, 16 cameras in tunnel image acquisition system from a left side to
It is right that successively No. 16 marked as No. 1 camera, No. 2 camera ... camera, each camera image captured by certain section are normalizing
And the result after projecting is followed successively by the 16th the 1st image of cylindrical picture sequence, the 2nd image ... image.
Due to having carried out resolution ratio unification to image in step 1, the focal length and projection radius of conic projection herein are
It is the corresponding focal length of benchmark camera and projection radius when resolving normalization coefficient.It is burnt that the projection radius of benchmark camera is equal to it
Away from.It is as follows using the inverse projection formula of conic projection formula,
Image after available all original image conic projections.
Wherein, (x, y) indicates that the coordinate of the point on original image, (x ', y ') indicate that the coordinate of the point after projection, f indicate
The focal length of camera lens, s indicate projection radius.
Step 3: characteristic matching obtains match point, for without obvious using characteristic matching according to step 2 acquired results
Feature or the invalid part of characteristic matching obtain match point using calibration, and reject the interference of mispairing point pair.
Embodiment is matched using SIFT feature, and when specific implementation can also use other characteristic matching modes.Embodiment is adopted
With the interference for rejecting mispairing point pair with RANSAC algorithm (RANSAC), when specific implementation, can also use other rough errors
Rejecting mode.
Since actual tunnel image includes the unconspicuous region of textured single features, also having includes crack, water stain etc.
The obvious region of feature.Tunnel image in reality is divided into two classes, one kind is characterized obvious part, a kind of for no obvious characteristic portion
Point.Two different matching process are taken for two class tunnel images,
Part obvious for feature includes the feature of the tunnel defects such as crack.This part is selected, illumination has been become
, there is the SIFT algorithm of preferable resistance in situations such as change, image rotation, scaling, affine deformation, fuzzy, compression, but due to SIFT
Algorithm describes complexity height for feature vector, and calculating is very time-consuming, is not able to satisfy the requirement that tunnel image quickly splices, uses
GPU-CPU or other parallel computation SIFT methods are accelerated, and the efficiency of algorithm after acceleration can promote 10-20 times.It is using
During carrying out Feature Points Matching with upper type, since when carrying out tunnel image taking, the image of adjacent cameras shooting must
There must be certain degree of overlapping, which does not exceed the 50% of image size.Therefore embodiment is with 50% region of image
The overlapping region of adjacent image.The general area of overlapping has been known in advance, and SIFT algorithm need to only detect the region of overlapping, this will
Greatly speed up the speed of characteristic point detection.
For the part of no obvious characteristic, which, which is suitable for SIFT algorithm, can not extract enough and useful feature
Point.Therefore for this partial region, calibration point has been selected, so-called calibration point pre-establishes tunnel model and provides inspection
Drill ground acquires the image that calibration paper is posted on tunnel model, carries out feature point extraction to the adjacent image after acquisition, obtains original
Several match points of image, generally in 40-50 to left and right.There is part without obvious characteristic when actually executing this process to step 3
When, resulting match point is demarcated to the part in advance and is converted in the way of image normalization, i.e., by original image on
Coordinate with point makees product with corresponding normalization coefficient (obtaining by step 1), the images match point after being normalized,
The match point in normalized image is transformed to after projection on image according still further to the mode of step 2, obtains final match point.
For example, in advance the calibration point of No. 1 and No. 2 camera of acquisition, No. 2 and No. 3 camera calibration point ... the 15th
Number and No. 16 camera calibration point, when occurring No. 3 and the matching of No. 4 camera respective image SIFT feature is invalid, tune
Resulting match point is demarcated in advance with the part be normalized obtain required match point with conic projection.
Feature Points Matching is carried out by tunnel image of the both the above mode to a section.But in obtained match point
In the presence of a part of pseudo- point pair, bigger error can be generated if being directly fitted, therefore obtaining a bore tunnel image
Match point after above-mentioned match point is filtered out using RANSAC algorithm (RANSAC), the algorithm be existing skill
Art, principle is to calculate the mathematical model parameter of sample data set according to one group of sample data set comprising abnormal data, to obtain
To effective sample data.The basic assumption of the algorithm be in sample comprising correct data also include abnormal data i.e. exterior point,
RANSAC assumes that the model parameter for meeting these data can be calculated for one group of given correct data.The original of the algorithm
It manages substantially as follows: concentrating random selection two o'clock to determine straight line in sample point, selected point focuses on linear distance less than a certain
The point of defined threshold is the supported collection of the straight line.It repeats to randomly choose multiple, it is believed that the straight line with maximum support feature set is
For the fitting of sample point set.Fitting distance threshold within the scope of point be available point, on the contrary it is then be noise.
By using RANSAC algorithm to after characteristic matching point (including based on SIFT feature extract obtain match point and
The match point of calibration) smart matching is carried out, just obtain final all match points.
Step 4: transformation matrix is calculated, the match point that step 3 is handled is calculated 3 × 3 initial transformation square
Battle array.The matrix includes scaling, rotation, the transformation parameters such as translation.The transformation parameter being calculated is simplified, is finally schemed
Transformation parameter as between is to get to transformation matrix final between image.
Picture point of the spatial point in two camera planes has one-to-one relationship, and corresponding relationship is linear homogeneous
, can be described by third-order matrix, can the matrix be referred to as homography matrix.Appoint and takes four not on the same line correct
Matching double points can calculate a homography matrix using straight linear transformation.Due to being still remained at this time without match point,
There are certain deviations when with point location, it is therefore proposed that when homography matrix is calculated first with RANSAC algorithm estimation one
Then a initial homography matrix minimizes the re-projection error between two images using L-M method.By minimizing error letter
Number calculates optimal homography matrix, i.e. transformation matrix.Specific calculating process uses existing algorithm, and it will not go into details by the present invention.
By it is above-mentioned obtain transformation matrix after, since a section includes multiple image, obtained transformation matrix contains
Certain error, the splicing of multiple images will cause error propagation, and error will be increasing, and such splicing result is not
It is receptible.Therefore it after obtaining the transformation matrix of image two-by-two by the above method, needs to do transformation matrix certain letter
Change, transformation matrix contains the transformation relation between image two-by-two, that is, rotates, and scales, translation.It is sharp in front of the step of
Completed with normalization coefficient by all image resolution ratios to be spliced are unified, thus zoom factor herein will very little, can will
Zoom factor in transformation matrix is rejected, not too much big for the effect image of splicing.Tunnel image acquisition system is rigid system
It unites, the rotation between image is a definite value, therefore the twiddle factor in matrix is can to immobilize.So last transformation
Matrix reduction is at the matrix only comprising translation.Wherein in the translation and acquisition system of vertical direction between camera optical center it is vertical
Direction displacement is related, in model calibration it can be concluded that the opposite translational movement with tunnel model of vertical direction between all cameras.
The translational movement of the vertical direction between image two-by-two can be calculated at this time according to real-time laser data in actually splicing.?
The displacement of horizontal direction can be extracted in transformation matrix obtained above, as the actual degree of overlapping of image two-by-two.Such as Fig. 4
Shown in, left side matrix is general transformation matrix, rotation, scaling comprising image, shift factor.By to twiddle factor and
After the simplification of scaling factor, matrix can simplify the flat of the translation and Y-direction that the X-direction of image is contained only for right side matrix
It moves.So by simplification above, final transformation matrix actually one only include translation parameters matrix.Wherein m11, m12, m21,
m22It is scaling and twiddle factor, m13, m23It is both horizontally and vertically displacement, m31, m32It is deformation both horizontally and vertically
Amount.ΔX, ΔYIt is displacement both horizontally and vertically respectively.
Although above-mentioned way makes spliced image effect have a certain impact, this is influenced in actual engineer application
In be acceptable.The efficiency that such simplification will greatly improve in splicing.And it eliminates much for transformation
The adjustment of matrix operates and optimization operation.
Step 5: unified coordinate system, using the transformation matrix after resolving obtained by step 4 by figure to be spliced obtained by step 2
As being successively transformed into reference in coordinate systems in image, the big view field image of a width is formed.
Since the tunnel image of a section is comprising several.It needs all images are unified to a reference frame
Under, it is therefore desirable to transformation and positional relationship of each image under unified coordinate system is calculated.What is calculated in step 4 is
Transformation relation between two images, and while being spliced into figure, will determine that list of each image in whole picture stitching image should be related to,
Therefore in tunnel image mosaic, according to cylindrical picture sequence obtained by step 2, on the basis of preset reference image, if with reference to
The homography matrix of image is H0, each image is successively transformed to according to transformation relation two-by-two true with reference to image in cylindrical picture sequence
In fixed coordinate system, so that forming the list of an entirety should be related to.According to formulaH in formulaiIndicate i-th
A transformation matrix, therefore the homography matrix H ' of n-th image coordinate systemnIt is from the 0th transformation matrix H0To n-th of transformation square
Battle array HnProduct.Such as in tunnel image acquisition system be equipped with 16 cameras when, n is up to 16.
By the unification of above-mentioned image coordinate system, the image that a width includes all image informations to be spliced can be formed.
Step 6: image co-registration is merged the overlapping region of image to be spliced to obtain the smooth and seamless of splicing reconstruct
Tunnel image.
Image co-registration refers to synthesizes the new image of a width several images of Same Scene according to certain rules, and makes to melt
Image expression after conjunction more comprehensively information.And the redundancy of image can be reduced to the full extent.This tunnel figure
As merging in splicing using laplacian pyramid, other image interfusion methods such as Poisson can also be applied.Image
Laplacian pyramid fusion is broadly divided into two steps, and one decomposes for image gaussian pyramid, and two be laplacian pyramid
It decomposes.Original image is defined as the 0th layer, by carrying out Gassian low-pass filter and interlacing every column down-sampling to image, obtains height
This pyramidal first layer repeats this step until being unable to down-sampling, that is, constructs gaussian pyramid.Construction is obtained
Each layer of interpolation expansion process of gaussian pyramid obtains and one layer of an equal amount of image thereon, the gaussian pyramid of this layer
The difference with this layer of image of a size that image is expanded with next layer by interpolation, as Laplce's figure of this layer
Picture constructs laplacian pyramid by this method.The obtained every tomographic image of Laplce's quintar is merged, then adopt
The image that sample is finally merged.Image after fusion eliminates the redundancy of two original images, contains two images
All information.Laplacian pyramid fusion is carried out to all tunnel images of a section, a width is constituted and is completely free of
One bore tunnel image of redundancy.Due to the influence of illumination contrast etc. between image, the image after splicing can be deposited
In the non-uniform situation of light and shade.Dodging is carried out to image using the even smooth method such as Poisson's equation, obtains uniform illumination
Stitching image.
It is the connection scheme for single cross-section image above, the splicing result of entire tunnel image in order to obtain can be with
Certain cutting is carried out to single section, the lap between adjacent sections is removed, so that continuous section can make up
One non-overlapping continuous tunnel image.Corresponding object distance when the shooting of each camera has been obtained, in step 1 with No. 1
For camera, using No. 1 projection radius, it can determine that the breadth of No. 1 camera, the i.e. picture that No. 1 camera obtains correspond to actual field
The width of scape can be determined in driving direction, between the consecutive image of the shooting of No. 1 camera in conjunction with the triggering spacing of camera
Degree of overlapping, since acquisition system is fixed and invariable, the degree of overlapping of No. 1 camera consecutive image is also between two neighboring section
Degree of overlapping.The image height of section result images is carried out after a section splices according to the degree of overlapping being calculated
It cuts.Obtain final cross-section image.
It realizes, can also be provided using modular mode when it is implemented, computer software mode can be used in the above process
Corresponding system.The embodiment of the present invention provides a kind of tunnel image joint system, for for each in tunnel image acquisition system
The image of camera acquisition is spliced, and the tunnel image acquisition system includes multiple cameras and a laser scanner, is being adopted
Collect in vehicle travel process, all cameras expose the tunnel image for obtaining corresponding section simultaneously, in all cameras one of certain section
The tunnel image that secondary exposure obtains is spliced, and is comprised the following modules:
Normalized image module is swept according to camera obtained by preparatory calibration with laser for the data based on laser scanner
The relative positional relationship for retouching instrument calculates the corresponding object distance of each camera, extracts normalization coefficient, to the figure of each camera acquisition
As being normalized, the consistent image to be spliced of resolution ratio is obtained;
The image of each camera acquisition is normalized in the extraction normalization coefficient, and implementation is as follows,
Firstly, the resolution ratio of each image shot by camera is acquired using following formula,
Wherein, r is the resolution ratio of image, and dpi is the size of each pixel on camera CCD, and f is the focal length of camera, and s is to throw
The radius of shadow;
Then, it after the resolution ratio for obtaining each image shot by camera, is differentiated on the basis of minimum in all resolution ratio
Rate, corresponding camera are denoted as benchmark camera;The resolution ratio of other image shot by camera and the ratio of the reference resolution are calculated, is obtained
The ratio taken is normalization coefficient;
Finally, according to the normalization coefficient being calculated;By the width of the resolution ratio of other image shot by camera it is high respectively with
Corresponding normalization coefficient makees product, the image after obtaining corresponding normalization;
Cylindrical surface projecting module is used for according to conic projection formula, all figures to be spliced that normalized image module is obtained
As projecting on cylindrical surface, wherein the focal length of conic projection and projection radius are the corresponding focal lengths of benchmark camera and project radius;
The inverse formula of the conic projection formula is as follows,
Wherein, (x, y) indicates that the coordinate of the point on original image, (x ', y ') indicate that the coordinate of the point after projection, f indicate
The focal length of camera lens, s indicate projection radius;
Characteristic matching module matches invalid part to SIFT feature for obtaining match point using SIFT feature matching
Match point is obtained using calibration, and rejects the interference of mispairing point pair with RANSAC algorithm;
Transformation matrix module, for size to be calculated as at the beginning of 3 × 3 to the match point that characteristic matching module is handled
Beginning transformation matrix simplify and extracts translation parameters, obtains transformation matrix final between image;
Coordinate system unified modules, for utilizing transformation matrix final obtained by transformation matrix module by cylindrical surface projecting module institute
It obtains image to be spliced to be successively transformed into reference in coordinate systems in image, forms the big view field image of a width;
Image co-registration module obtains the smooth and seamless of splicing reconstruct for being merged the overlapping region of image to be spliced
Tunnel image.
It is possible to further which output module is arranged, for the splicing result according to the image of single section, by adjacent sections
Between lap removal, obtain the splicing result of entire tunnel image.
Each module specific implementation can be found in corresponding steps, and it will not go into details by the present invention.
Specific embodiment described herein is only an example for the spirit of the invention.The neck of technology belonging to the present invention
The technical staff in domain can make various modifications or additions to the described embodiments or replace by a similar method
In generation, however, it does not deviate from the spirit of the invention or beyond the scope of the appended claims.