Summary of the invention
In order to overcome the problems referred to above, the present invention provides a kind of method for panoramic imaging based on single camera and dress thereof to society
Put, its simple in construction, low cost, easy for installation and disturb little.
A kind of technical scheme of the present invention is: provide a kind of method for panoramic imaging based on single camera, including walking as follows
Rapid:
100. use single camera to obtain the image of rear view of vehicle;
200. pairs of images obtained carry out distortion correction and are converted into correction chart picture;
The old global image of storage is carried out splicing and formed new global image, by the described new overall situation by 300. with described correction chart picture
Old global image described in image update;
Described new global image is converted into birds-eye view picture by 400.;
500. according to physical location by auto model image co-registration to described birds-eye view picture and formed panorama reversing image.
As improvement of the present invention, also include step 600, show described panorama reversing image.
As improvement of the present invention, in described step 200, the image obtained is carried out barrel-type distortion correction, barrel shape
Distortion correction formula is as follows:
Wherein, 、For correction parameter,=-0.0000001,=-0.0000012,Adjust the abnormal of y-axis direction
Become,Adjust the distortion in x-axis direction,For the coordinate points needing distortion correction in the image that obtains, described in x, y
Coordinate points in correction chart picture.
As improvement of the present invention, in described correction chart picture, select to be positioned at left footpath and the right wing footpath of both sides, if
Left footpath, right wing footpath displacement the same, then prove vehicle reversing time do not turn;If the displacement in left footpath, right wing footpath differs
Sample, then prove that vehicle is turned, according to the distance between left footpath, the displacement difference in right wing footpath and left footpath, right wing footpath when reversing
Calculate the anglec of rotation, rotate described correction chart picture according to the described anglec of rotation.
As improvement of the present invention, using SSDA analogue method to calculate left footpath or the displacement in right wing footpath, formula is as follows:
Using bilinear interpolation to complete the multiple rotary of template, formula is as follows:
;
Using double-template angular measurement to carry out prediction and the calculating of backing track angle, formula is as follows:
θ=arctan (newposy2-newposy1)/(xpos2-xpos1)), wherein θ is backing track angle, and x, y are respectively
Coordinate points in described correction chart picture.
As improvement of the present invention, in described step 300, the renewal speed of described new global image is more than or equal to
The back-up speed of vehicle.
As improvement of the present invention, in described step 400, obtain perspective matrix according to fixed point algorithm, have an X-rayed square
Battle array is:
,
Wherein,It is 1,
According to perspective matrix projection algorithm, input picture is multiplied with specifying perspective matrix, draws equation below:
Wherein, u, v are x-axis and the y-axis coordinate of the point in described new global image,It it is the coordinate in corresponding described birds-eye view picture.
The another kind of technical scheme of the present invention is: provide a kind of panoramic imaging device based on single camera, including:
Photographic head, described photographic head is for obtaining the image of rear view of vehicle;
Distortion correction module, described distortion correction module carries out distortion correction to the image obtained and is converted into correction chart picture;
Image mosaic more new module and memory module, described image mosaic more new module is by the old overall situation figure in described memory module
As carrying out splicing and formed new global image with described correction chart picture, update in described memory module with described new global image
Described old global image;
Image conversion module, described new global image is converted into birds-eye view picture by described image conversion module;
Image processing module, described image processing module according to physical location by auto model image co-registration to described birds-eye view picture
In and formed panorama reversing image;
Described photographic head, described distortion correction module, described image mosaic more new module, described image conversion module and described figure
As processing module is electrically connected with successively, described memory module is electrically connected with described image mosaic more new module.
As improvement of the present invention, also include that display module, described image processing module and described display module are electrical
Connecting, described display module shows described panorama reversing image.
As improvement of the present invention, also including rotation correction module, described distortion correction module is by described rotation school
Positive module is electrically connected with described image mosaic more new module;Vehicle is not turned when reversing, and described rotation correction module is by institute
Stating correction chart picture and be transferred to described image mosaic more new module, vehicle is turned when reversing, and described rotation correction module is by described
Correction chart picture is transferred to described rotation correction module, and it is rotated and is transferred to described image by described rotation correction module spells
Connect more new module.
Due to the fact that and have employed distortion correction module, image mosaic more new module, image conversion module and image procossing
Module, compared with prior art, the present invention is only with a photographic head, and prior art have employed 4 photographic head;When storage mould
When block receives new global image, memory module will be with the new and old global image of new global image, and renewal speed is fast, decreases
Memory space, improves operational efficiency, is possible not only to show that vehicle-surroundings image can also show under-vehicle image.
During work, the image that photographic head obtains first is carried out distortion correction and is converted into correction chart by the present invention
Picture, this is done to make correction chart picture more true, prevents error, thus cause unsafe accident.Correction completes
After, old global image and correction chart picture are carried out splicing and being formed new global image, then new global image is converted into and gets a bird's eye view
Image, the most just forms panorama reversing image so that reversing process is distincter, and human pilot is more convenient to operate, more pacifies
Entirely, meanwhile, reduce further difficulty during human pilot reversing so that the precision of panorama reversing image is higher, has structure
Simply, low cost, interference is little, error is little, easy to use, improve the reversing advantage such as safety coefficient.
Detailed description of the invention
In describing the invention, it is to be understood that " " center ", " on ", D score in term, "front", "rear", " left ",
Orientation or the position relationship of the instruction such as " right " are based on orientation shown in the drawings or position relationship, are for only for ease of and describe this
Bright and simplification describes rather than indicates or imply that the device of indication or element must have specific orientation, with specific orientation
Structure and operation, be therefore not considered as limiting the invention.Additionally, term " first ", " second " are only used for describing purpose,
And it is not intended that indicate or hint relative importance.
In describing the invention, it should be noted that unless otherwise clearly defined and limited, term " is installed ", " even
Connect ", " being connected " should be interpreted broadly, connect for example, it may be fixing, it is also possible to be that dismounting connects, or be integrally connected;Permissible
It is to be mechanically connected, it is also possible to be electrical connection;Can be to be joined directly together, it is also possible to be to be indirectly connected to by intermediary, Ke Yishi
The connection of two element internals.For the ordinary skill in the art, can understand that above-mentioned term is at this with concrete condition
The concrete meaning of invention.
Referring to disclosed in Fig. 1, Fig. 1 is a kind of method for panoramic imaging based on single camera, also refers to Fig. 2 and Tu
Disclosed in 3, Fig. 2 be postrotational correction chart picture and old global image carries out the principle schematic spliced, disclosed in Fig. 3 be
New global image is converted into the principle schematic of birds-eye view picture.Described method for panoramic imaging based on single camera, including as follows
Step:
100. use single camera to obtain the image of rear view of vehicle;
200. pairs of images obtained carry out distortion correction and are converted into correction chart picture;
The old global image of storage is carried out splicing and formed new global image, by the described new overall situation by 300. with described correction chart picture
Old global image described in image update;
Described new global image is converted into birds-eye view picture by 400.;
500. according to physical location by auto model image co-registration to described birds-eye view picture and formed panorama reversing image;
600. show described panorama reversing image.
In this method, owing to have employed a described photographic head, and described photographic head generally uses wide-angle lens, and it regards
Angle is between arriving less than or equal to 180 degree more than or equal to 130 degree.During using, visual angle will make shooting more than 100 degree
Image produces barrel-type distortion.So-called barrel-type distortion refers to: place uniform grid in object plane, it is illuminated as thing, if
Diaphragm is placed between thing and lens, it can be seen that away from low, in image plane than near optical axis of the amplification in optical axis region
Evagination sight shown in figure occurs.
In the described step 200 of this method, the image obtained is carried out barrel-type distortion correction, barrel-type distortion updating formula
As follows:
;
Wherein,、For correction parameter,=-0.0000001,=-0.0000012,Adjust the distortion in y-axis direction,Adjust the distortion in x-axis direction,For the coordinate points needing distortion correction in the image of acquisition, x, y are described school
Coordinate points in positive image.
In the described step 200 of this method, in described correction chart picture, select to be positioned at left footpath and the right wing footpath of both sides,
If the displacement in left footpath, right wing footpath is the same, then prove that vehicle is not turned when reversing;If left footpath, the displacement in right wing footpath
Different, i.e. the displacement in left footpath and right wing footpath is variant, then prove that vehicle is turned, according to left footpath, right wing footpath when reversing
Displacement difference and left footpath, right wing footpath between distance calculate the anglec of rotation, according to the described anglec of rotation rotate described correction chart
Picture.It is to say, need whether vehicle is turned in reversing process to judge, if vehicle is turned in reversing process,
Then need the angle according to turning that described correction chart picture is rotated;When vehicle is not turned in reversing process, then it is not required to
According to the angle turned, described correction chart picture is rotated.
In this method, using SSDA analogue method to calculate left footpath or the displacement in right wing footpath, formula is as follows:
;
Using bilinear interpolation to complete the multiple rotary of template, formula is as follows:
;
Using double-template angular measurement to carry out prediction and the calculating of backing track angle (angle that reversing is turned), formula is such as
Under:
θ=arctan (newposy2-newposy1)/(xpos2-xpos1)), wherein θ is that backing track angle (turn by reversing
Angle), x, y are respectively the coordinate points in described correction chart picture.
In the described step 300 of this method, the renewal speed of described new global image is more than or equal to the reversing of vehicle
Speed, say, that the renewal speed of described new global image can be adjusted according to the back-up speed of vehicle, the most permissible
Prevent due to described new global image updated slowly, and the dangerous accident caused.The field range of described new global image
Including partial visual field scope and the field range of whole described correction chart pictures of described old global image, about the described old overall situation
Image is prior art with the splicing of described correction chart picture, i.e. the splicing of image, the most no longer the splicing skill to image
Art explains.Here it is emphasized that described new global image comprises the partial visual field model of described old global image
Enclose, this is because, during reversing, the distance of reversing is the longest, it is meant that the quantity of the image that described photographic head obtains is more
Many, then the quantity of described correction chart picture is the most, if the field range of described old global image not being carried out cutting, that
The field range of described old global image will be very wide, the most not only wastes resource, it is also possible to reduce the described new overall situation
The splicing speed of image.
During original state, described old global image is empty image, after described photographic head works, claps described photographic head
First image taken the photograph carries out distortion correction, and as the first old global image of Zhang Suoshu.After normal work (reversing), to institute
The present image stating photographic head shooting carries out distortion correction, and by the presently described correction chart picture after distortion correction and a upper institute
The partial visual field scope stating old global image carries out being spliced to form described new global image.
In the described step 400 of this method, obtaining perspective matrix according to fixed point algorithm, perspective matrix is:
,
WhereinIt is 1,
According to perspective matrix projection algorithm, input picture is multiplied with specifying perspective matrix, draws equation below:
Equation one,Equation two,
Wherein, u, v are x-axis and the y-axis coordinate of the point in described new global image,、 Get a bird's eye view described in corresponding
Coordinate in image.
AboutExtremelySampling process be: first, described new global image is chosen 4 points, according to map close
System, correspondingly chooses 4 mapping points in described birds-eye view picture.Then, by the coordinate of 4 points in described new global image
In in described birds-eye view picture, the coordinate of 4 mapping points brings equation one and equation two into, 8 solution of equation 8 parameters, finally draw
ExtremelyValue.
In order to draw more easilyExtremelyValue, the described new global image chosen is isosceles trapezoid, then institute
State birds-eye view picture then for rectangle, say, that isosceles trapezoid is by becoming rectangle after mapping, i.e. coordinate points in isosceles trapezoid is led to
The coordinate points in rectangle has been reformed into after crossing the conversion of equation one and equation two.4 points are chosen in described new global image, this
4 points are 4 summits of isosceles trapezoid, choose 4 mapping points in rectangle, and these 4 mapping points are 4 summits of rectangle, and
Carry it in equation one and equation two, 8 solution of equation 8 parameters, finally it is easy to drawExtremelyValue, then=
1.1605,=1.3604, =-78.7857, =0,=2.2578,=-19.5210,=0, =
0.004。
In the described step 500 of this method, the method that described auto model image is shown by Weighted Fusion is with described
Getting a bird's eye view image co-registration, say, that described auto model image is transparent, so benefit of design is, when there being one on road
Well cover for sewer, after reversing automobile, well lid has exceeded photographic head region and has been positioned at body bottom, but still can see and be positioned at car
Well lid under body.Concrete methods of realizing is: the value of described auto model image is multiplied by 0.6, the original value of described birds-eye view picture
It is multiplied by 0.4, then described auto model image and described image addition of getting a bird's eye view is obtained new pixel value, it is possible to realize two
Image co-registration obtains described panorama reversing image, and the coefficient of which image is big or closer to 1, the proportion of which image is the biggest,
But the coefficient of two images and be necessary for 1.
In the described step 500 of this method, it is according to auto model image and described to get a bird's eye view image scaled, by vehicle mould
Type image co-registration is in described birds-eye view picture and form described panorama reversing image, after forming described panorama reversing image, also
Needing described panorama reversing image to be carried out cutting and regulates the scale of described panorama reversing image, the described panorama made falls
Car image meets the standard of display.
Referring to disclosed in Fig. 4, Fig. 4 is a kind of panoramic imaging device based on single camera 1, including:
Photographic head 1, described photographic head 1 is for obtaining the image of rear view of vehicle;
Distortion correction module 2, described distortion correction module 2 carries out distortion correction to the image obtained and is converted into correction chart picture;
Image mosaic more new module 3 and memory module 8, described image mosaic more new module 3 by described memory module 8 old entirely
Office's image carries out splicing and formed new global image with described correction chart picture, updates described memory module with described new global image
Described old global image in 8;
Described image conversion module 4, described new global image is converted into birds-eye view picture by described image conversion module 4;
Image processing module 5, described image processing module 5 according to physical location by auto model image co-registration to described birds-eye view
In Xiang and formed panorama reversing image;
Described photographic head 1, described distortion correction module 2, described image mosaic more new module 3, described image conversion module 4 and institute
Stating image processing module 5 to be electrically connected with successively, described memory module 8 and described image mosaic more new module 3 is electrically connected with.
In the present embodiment, also include that display module 6, described image processing module 5 and described display module 6 are electrically connected with,
Described display module 6 shows described panorama reversing image, and described display module 6 is LCDs or LED display.
In the present embodiment, described photographic head 1 is with the horizontal the installation angle of 70 degree.User when mounted, with described bird
Image of looking down from a height is that the setting angle of described photographic head 1 is adjusted by standard, when described new global image is isosceles trapezoid, and described bird
When image of looking down from a height is rectangle, then proving that the setting angle of described photographic head 1 has regulated, setting angle now is 70 degree.
In the present embodiment, the correction principle of described distortion correction module 2 is that barrel-type distortion updating formula is as follows:
;
Wherein,、For correction parameter,=-0.0000001,=-0.0000012,Adjust the distortion in y-axis direction,Adjust the distortion in x-axis direction,For the coordinate points needing distortion correction in the image of acquisition, x, y are described school
Coordinate points in positive image.
Timing, input needs the relevant parameter of the coordinate points of correction, it is possible to the dependent coordinate point after being corrected
Parameter, thus obtain described correction chart picture.
In the present embodiment, also including rotation correction module 7, described distortion correction module 2 is by described rotation correction module 7
It is electrically connected with described image mosaic more new module 3;Vehicle is not turned when reversing, and described rotation correction module 7 is by described school
Positive image transmitting gives described image mosaic more new module 3, and vehicle is turned when reversing, and described rotation correction module 7 is by described school
Positive image transmitting gives described rotation correction module 7, and it is rotated and be transferred to described image by described rotation correction module 7 spells
Connect more new module 3.
The correction principle of described rotation correction module 7 is, in described correction chart picture select be positioned at both sides left footpath and
Right wing footpath, if the displacement in left footpath, right wing footpath is the same, then proves that vehicle is not turned when reversing;If left footpath, right wing footpath
Displacement different, i.e. the displacement in left footpath and right wing footpath is variant, then prove vehicle reversing time turn, according to left footpath,
Distance between the displacement difference in right wing footpath and left footpath, right wing footpath calculates the anglec of rotation, rotates described according to the described anglec of rotation
Correction chart picture.It is to say, need whether vehicle is turned in reversing process to judge, if vehicle is in reversing process
Turn, then need the angle according to turning that described correction chart picture is rotated;When vehicle is not turned in reversing process, then
Need not the angle according to turning described correction chart picture is rotated.
Using SSDA analogue method to calculate left footpath or the displacement in right wing footpath, formula is as follows:
;
Using bilinear interpolation to complete the multiple rotary of template, formula is as follows:
;
Using double-template angular measurement to carry out prediction and the calculating of backing track angle (angle that reversing is turned), formula is such as
Under:
θ=arctan (newposy2-newposy1)/(xpos2-xpos1)), wherein θ is that backing track angle (turn by reversing
Angle), x, y are respectively the coordinate points in described correction chart picture.
When described rotation correction module 7 works, rotate described correction chart picture according to θ angle.
In the present embodiment, the renewal speed of described image mosaic more new module 3 is more than or equal to the back-up speed of vehicle, also
That is, the renewal speed of described image mosaic more new module 3 can be adjusted according to the back-up speed of vehicle, the most permissible
Prevent due to described image mosaic more new module 3 updated slowly, and the dangerous accident caused.Described image mosaic updates mould
Block 3 is prior art, i.e. the splicing of image, the most no longer explains described image mosaic more new module 3.
In the present embodiment, the operation principle of described image conversion module 4 is, obtains perspective matrix according to fixed point algorithm,
Perspective matrix is:
,
WhereinIt is 1,=1.1605,=1.3604, =-78.7857, =0,=2.2578,=-
19.5210,=0, =0.004。
According to perspective matrix projection algorithm, input picture is multiplied with specifying perspective matrix, draws equation below:
Equation one,Equation two,
Wherein, u, v are x-axis and the y-axis coordinate of the point in described new global image,、It it is corresponding described birds-eye view
Coordinate in Xiang,
When described image conversion module 4 works, it is only necessary to input the point coordinates in described new global image, described bird will be drawn
Look down from a height the point coordinates in image, thus obtain described birds-eye view picture.
In the present embodiment, the method that described image processing module 5 is shown by Weighted Fusion is by described auto model image
Getting a bird's eye view image co-registration with described, so benefit of design is, when there being a well cover for sewer on road, after reversing automobile, well lid surpasses
Cross photographic head 1 region and be positioned at body bottom, but still can see the well lid being positioned under vehicle body.Concrete methods of realizing please be joined
See the content in above-mentioned method for panoramic imaging based on single camera 1.
Due to the fact that and have employed described distortion correction module 2, described image mosaic more new module 3, the conversion of described image
Module 4 and described image processing module 5, compared with prior art, the present invention is only with a described photographic head 1, and existing skill
Art have employed 4 described photographic head 1;When described memory module 8 receives described new global image, described memory module 8 is just
Can update described old global image with described new global image, renewal speed is fast, decreases memory space, improves operation effect
Rate, is possible not only to show that vehicle-surroundings image can also show under-vehicle image.
During work, the image that described photographic head 1 obtains first is carried out distortion correction and is converted into school by the present invention
Positive image, this is done to make described correction chart picture more true, prevents error, thus cause unsafe accident.
After having corrected, described old global image and described correction chart picture are carried out splicing and being formed described new global image, then will
Described new global image is converted into described birds-eye view picture, the most just forms described panorama reversing image so that reversing process is more
Distinctness, human pilot is more convenient to operate, safer, meanwhile, reduce further difficulty during human pilot reversing so that
Described panorama reversing image precision higher, have simple in construction, low cost, interference is little, error is little, easy to use, improve
The advantages such as reversing safety coefficient.