Background technology
Fish eye lens is a kind of focal length for 16mm or shorter and visual angle is close or equal to 180 °.It is a kind of extreme
Wide-angle lens, " fish eye lens " is being commonly called as it.To make camera lens reach the Camera angle of maximum, the preceding mirror of this phtographic lens
Piece diameter and in parabolical to camera lens front portion protrude, it is rather similar to the eyes of fish, " fish eye lens " therefore and gain the name.Flake mirror
A kind of special lens that head belongs in bugeye lens, the scope that its visual angle is made every effort to reach or can seen beyond human eye.Cause
This, there is very big difference in the scene of fish eye lens and the real world in people's eye, because we see in real life
Scenery be well-regulated solid form, and the picture effect produced by fish eye lens is then beyond this category.
With the development of society, fish eye lens has application to the every aspect of society, many apparatus have fish eye lens,
Such as vehicle-mounted supervising device, the camera of some wide-angles etc., when fish eye lens is applied to equipment, because fish eye lens is present
The deviation of technique, cause this species diversity is fish-eye center offset in equipment, and center offset refers to flake mirror
The relative displacement of scene image and true scene image captured by head, the offset is mainly used in correcting fish eye images, real
On border, in fish-eye application, the fish eye lens of the same model of same manufacturer production uses phase when correcting fish eye images
Same off-centring value, this way is unscientific, and the accuracy of image rectification is not high.
Therefore, there is deficiency to the acquisition of fish eye lens parameter, it is to be improved.
The content of the invention
Present invention aim to address to fish eye lens parameter acquiring not enough, there is provided a kind of quick obtaining in the prior art
The method of fish eye lens center offset in equipment, can with the simple and quick numeral for getting fish eye lens center offset,
And then improve the accuracy of fish eye images correction and splice the quality of fish eye images.
For up to above-mentioned purpose, the invention provides following technical scheme:
A kind of method of fish eye lens center offset in quick obtaining equipment, including step:
The fish eye images that A, acquisition are shot through fish eye lens;
B, the center point coordinate and circle that fish eye images are identified with rectangular image area in processing, acquisition fish eye images
The center point coordinate of imaging region;
C, the center point coordinate for calculating rectangular image area and the center point coordinate of circular imaging region relative coordinate values.
The figure of the circular threshold boundary line both sides of the Circle in Digital Images shape imaging region obtained in method as described above, the step A
As coloured jump.
The color of circular imaging region is in method as described above, the fish eye images that described acquisition is shot through fish eye lens
White.
In method as described above, the step B, described image rectangular image area is lens sensors region.
Method as described above, the step B is completed by DSP Processor.
Present invention also offers a kind of system of fish eye lens center offset in quick obtaining equipment, including:
Image collection module, for obtaining the fish eye images shot through fish eye lens;
Image processing module, for fish eye images to be identified with processing, obtains rectangular image area in fish eye images
The center point coordinate of center point coordinate and circular imaging region;
Output module is calculated, is sat for calculating the central point of center point coordinate and circular imaging region of rectangular image area
Target relative coordinate values.
System as described above, the circular threshold boundary line both sides for the Circle in Digital Images shape imaging region that described image acquisition module is obtained
The coloured jump of image.
The color of circular imaging region is white in system as described above, the fish eye images that described image acquisition module is obtained
Color.
Rectangular image area is lens sensors region in system as described above, the fish eye images.
System as described above, described image processing module includes a DSP Processor.
Relative to prior art, the invention provides a kind of method of fish eye lens center offset in quick obtaining equipment
And system, shot by fish eye lens fish eye images analyzing and processing quickly calculate head center offset in equipment, acquisition is set
Fish-eye center offset in standby, and then the accuracy that equipment is corrected to fish eye images is improved, improve the matter of image mosaic
Amount.
Embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings
The present invention is further described.It should be appreciated that specific embodiment described herein is only to explain this present invention, not
For limiting the present invention.
Fig. 1 is the method flow diagram of fish eye lens center offset in a kind of quick obtaining equipment of the present invention.Such as
Described in Fig. 1, the method flow diagram of fish eye lens center offset in a kind of quick obtaining equipment of the present invention, including it is following
Step:
101st, the fish eye images shot through fish eye lens are obtained;
As described in step 101, specifically, the mode for obtaining the fish eye images shot through fish eye lens is a lot, it can obtain
The image of fish eye lens front position, for example:A blank sheet of paper is placed in fish eye lens front end, blank sheet of paper is shot, can also
Some scene images are shot, however, it is desirable to ensure the image of the circular threshold boundary line both sides of the Circle in Digital Images shape imaging region obtained
Coloured jump, the circular threshold boundary line of the circular imaging region is that fish eye lens shooting picture is justified to be formed as shown in Fig. 2 206
As the boundary line in region, wherein, it is preferred that the color of circular imaging region is in the fish eye images that acquisition is shot through fish eye lens
White, if because white, its RGB color rank value is(255,255,255), but the rectangular image area beyond circular imaging region
The RGB color rank value in domain is(0,0,0), it is ater, can thus makes the image of the circular threshold boundary line both sides of circular imaging region
Color range difference it is maximum, its circular threshold boundary line is also apparent.
102nd, fish eye images are identified with processing, the center point coordinate and circle of rectangular image area in fish eye images is obtained
The center point coordinate of shape imaging region;
As described in step 102, the process that fish eye images are identified with processing is completed by DSP Processor, described
DSP Processor be a kind of digital signal processor, analysis image can be identified, its to fish eye images discriminance analysis original
Reason is as shown in Fig. 2 Fig. 2 is the schematic diagram of fish eye lens center offset in quick obtaining equipment of the present invention, shown in Fig. 2
Image is the non-corrected image shot through fish eye lens, and the acquisition modes of its image are as described in above-mentioned step 101, in Fig. 2
In, 201 be imaging region, and 202 be rectangular image area, is lens sensors region, that is, shoots the region of picture, 203 are into
As the center in region, 204 be the center of image-region, and the process of DSP processing images is recognition imaging region 201, histogram
As region 202, the process at the center 203 of imaging region and the center 203 of image-region, after fish eye images are identified,
The center point coordinate of fish eye lens rectangular image area and the center point coordinate of circular imaging region are obtained, 203 be imaging region
Center, three differences on circular boundary that can be by absorbing imaging region 201, which carry out calculating analysis, to be obtained, and 204 are
Picture centre, as shoots the symmetrical centre of picture, the intersection point of the diagonal line of image is the point, can be by obtaining histogram
The relative coordinate values of diagonal 4 points of the image in picture region 202 are calculated, for example:Four point coordinates are respectively(0,0)(10,0)(0,8)
(10,8), then the picture centre point coordinates calculated is(5,4).
103rd, the relative coordinate of the center point coordinate and the center point coordinate of circular imaging region of rectangular image area is calculated
Value.
As described in step 103, specifically, as shown in Fig. 2 205 be fish-eye center offset, i.e. rectangular image
The center point coordinate relative value of the center point coordinate in region and circular imaging region, for example:The central point of rectangular image area is sat
Mark and the center point coordinate of circular imaging region is respectively(1,2)With(2,3), by can be calculated fish-eye off-centring
Measure and be(1,1).
Fig. 3 is the system schematic of fish eye lens center offset in quick obtaining equipment of the present invention.Fig. 3 institute of institute
Show, including be sequentially connected the image collection module 301 connect, image processing module 302 calculates output module 303, wherein, it is described
Image collection module 301 be used to obtain the fish eye images that shoot through fish eye lens;Described image processing module 302 be used for pair
Fish eye images are identified in processing, acquisition fish eye images in the center point coordinate and circular imaging region of rectangular image area
Heart point coordinates;Described calculating output module 303 is used for the center point coordinate and circular imaging region for calculating rectangular image area
Center point coordinate relative coordinate values.
System as described above, it is preferred that the circular edges for the Circle in Digital Images shape imaging region that described image acquisition module is obtained
The coloured jump of image of boundary line both sides, in other words, circular threshold boundary line are obvious, and color range difference is bigger, and its boundary line is more obvious,
The point that later stage is obtained on boundary line is also more accurate, and the center of circle that it is calculated is also more accurate.
The color of circular imaging region is white in system as described above, the fish eye images that described image acquisition module is obtained
Color, as detailed above.
Rectangular image area is lens sensors region in system as described above, the fish eye images.
System as described above, described image processing module includes a DSP Processor, as detailed above.
In summary, the method for fish eye lens center offset and it is in a kind of quick obtaining equipment for providing of the present invention
System, first, obtains the fish eye images shot through fish eye lens;Then, fish eye images are identified with processing, fish eye images are obtained
The center point coordinate of the center point coordinate of rectangular image area and circular imaging region;Finally, calculate in rectangular image area
The relative coordinate values of heart point coordinates and the center point coordinate of circular imaging region, according to relative coordinate calculate it is fish-eye in
Heart offset, by above-mentioned steps, can quickly calculate fish-eye center offset in equipment, and then improve equipment pair
The accuracy that fish eye images are corrected, improves the quality of image mosaic.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can
To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention
Protect scope.