CN1937698A - Image processing method for image distortion automatic correction - Google Patents

Image processing method for image distortion automatic correction Download PDF

Info

Publication number
CN1937698A
CN1937698A CN 200610117277 CN200610117277A CN1937698A CN 1937698 A CN1937698 A CN 1937698A CN 200610117277 CN200610117277 CN 200610117277 CN 200610117277 A CN200610117277 A CN 200610117277A CN 1937698 A CN1937698 A CN 1937698A
Authority
CN
China
Prior art keywords
image
sin
theta
partiald
cos
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.)
Pending
Application number
CN 200610117277
Other languages
Chinese (zh)
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.)
Shanghai Jiao Tong University
Original Assignee
Shanghai Jiao Tong University
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 Shanghai Jiao Tong University filed Critical Shanghai Jiao Tong University
Priority to CN 200610117277 priority Critical patent/CN1937698A/en
Publication of CN1937698A publication Critical patent/CN1937698A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

一种图像畸变自动校正的图像处理方法,本发明利用radon变换快速的提取出名片、文本的四边轮廓,利用轮廓顶点信息,对畸变图像进行校正,并且,建立拍摄设备内部成像数学模型,建立包括名片、文本纵横比参数的方程组,通过解方程组的方法求出矩形物体的纵横比并应用到校正过程中,使最后的校正结果不会产生变形。最后,通过文字识别,识别校正之后的图像是否出现倒置,判断是否需要对校正之后的图像进行旋转,从而得到符合要求的校正结果。本发明能够快速的实现畸变校正,整个过程不需要人工参与,真正实现自动校正。本发明可用于医学成像、监控设备、手机、数码相机、数码摄像机等大多数成像设备中,易于实现,用户操作简单。

Figure 200610117277

An image processing method for automatic correction of image distortion. The invention uses radon transformation to quickly extract the four-sided contours of business cards and texts, uses the contour vertex information to correct the distorted image, and establishes a mathematical model of the internal imaging of the shooting device, including For the equations of business card and text aspect ratio parameters, the aspect ratio of the rectangular object is obtained by solving the equations and applied to the correction process, so that the final correction result will not be deformed. Finally, through character recognition, it is recognized whether the corrected image is inverted, and it is judged whether the corrected image needs to be rotated, so as to obtain a corrected result that meets the requirements. The invention can quickly realize distortion correction, does not need manual participation in the whole process, and truly realizes automatic correction. The invention can be used in most imaging devices such as medical imaging, monitoring equipment, mobile phones, digital cameras, digital video cameras, etc., and is easy to realize and easy for users to operate.

Figure 200610117277

Description

Picture distortion is from the image processing method of dynamic(al) correction
Technical field
What the present invention relates to is a kind of method of technical field of image processing, specifically is the image processing method of a kind of picture distortion from dynamic(al) correction.
Background technology
When taking data such as business card, text with capture apparatus such as digital camera or mobile phones, the image that was photographed tends to tilt, and the object of original rectangles such as business card, text can take place to distort and become arbitrary quadrilateral.Its reason is when taking business card or text, photographer not over against and perpendicular to subject, but certain horizontal range and deviation angle are arranged apart from subject.And photographer is when taking these data, seldom can go over against and vertical, therefore, this distortion phenomenon is very common, to people read these above data information or cause some difficulties when carrying out word processing.
Find by prior art documents, Chinese patent publication number: CN1607824A, open day is on April 20th, 2005, denomination of invention: image processing system and image processing method and electronic camera and image processing apparatus.A cover image processing system and a processing method thereof described in this invention, and its image processing system is made up of Electrofax and image processing apparatus.Wherein, Electrofax comprises image pickup part, the image recording portion, machining information obtaining section and processed record information portion, image pickup part is taken the body that is taken, the image that image recording portion record is photographed by this image pickup part, and the machining information obtaining section is according to the image that is recorded in this image recording portion, obtain the machining information that uses in the regulation processing to this image, processed record information portion will be by this obtaining section machining information of obtaining and the image corresponding record that obtains the source.Image processing apparatus, it possesses taken the image of record by Electrofax, by the machining information of described Electrofax record, carries out the image processing part that regulation is processed according to answering with this image degree.In this invention, the image that Electrofax photographs is presented on the monitor with regeneration mode, if the user needs the correction image distortion, the user need do it yourself to operate the tetragonal outline line that becomes benchmark when identification is revised so, after finding the outline line of wanting, determine operation, the coordinate information on 4 summits of the outline line selected is write the title portion of the image file of display image.Afterwards, when revising, image processing apparatus therefrom reads coordinate information and carries out the correction operation.This technological invention needs the user to do it yourself to operate, and can not realize that from dynamic(al) correction, process complexity, accuracy are not high, except digital camera, also needs personal computer (PC) and projecting apparatus, the equipment complexity, and processing procedure is slower.
In addition, Photoshop software (software towards Digital Image Processing of U.S. Adobe company exploitation) also can be realized the function of image distortion correction, but must on personal computer, implement, need the user to start to regulate and proofread and correct angle, therefore in the operating process error can appear, accuracy is not high, can not realize zero offset capability.And this software can only proofread and correct the trapezoidal distortion of buildings such as building, and the shape that can not proofread and correct business card, text tilts and the distortion of platform shape, and range of application is little.
Summary of the invention
The present invention is directed to the deficiencies in the prior art, the image processing method of a kind of picture distortion from dynamic(al) correction is provided.The shape that the present invention can proofread and correct business card, text tilts and the distortion of platform shape, can realize distortion correction fast, and whole process does not need artificial participation, really realizes from dynamic(al) correction, is easy to realize, and is simple to operate.
The present invention is achieved by the following technical solutions, comprises five steps:
(1) extracts profile: utilize otsu algorithm (big Tianjin algorithm) to carry out automatic threshold and cut apart, adopt morphological method to carry out edge contour and extract;
(2) resolve profile: utilize radon conversion (a kind of projective transformation that is used for straight-line detection that Austrian mathematician Radon proposes) will go up edge contour that the step extracts and separate out, and try to achieve the coordinate of four end points with the formal solution of linear equation;
(3) calculate aspect ratio: be created as the Mathematical Modeling of picture device interior optical imagery, utilize optical imagery knowledge, set up equation group, try to achieve aspect ratio;
(4) distortion correction: utilize two groups of coordinates to try to achieve the distortion correction matrix image is proofreaied and correct, the aspect ratio of image remains unchanged in the trimming process;
(5) rectification building-out: in the time of digital above the method for utilizing digit recognition is judged the image after proofreading and correct inverted phenomenon takes place, select whether need image rotating, the image of finishing after the correction can not proofreaied and correct.
Among the present invention, at first extract tetragonal edge contours such as business card, text, four edges is separated.Wherein, profile extracts used big Tianjin algorithm, is the fast method that a kind of automatic threshold is cut apart.This method can calculate the segmentation threshold of cromogram or gray-scale map very soon, and converts former figure to binary map.Among the present invention, utilize business card, text etc. and the difference of background on brightness and colorfulness, big Tianjin algorithm is cut apart when converting binary map in threshold value background is made as black automatically, and business card etc. are made as white, therefore, in the binary map that obtains, comprise two parts: the business card or the text of the background of black and white.When morphology extracts the border, utilize the Boundary Extraction operator that binary map is carried out computing, edge contour can be extracted, like this, obtain a tetragonal binary map of white.
When resolving profile, the radon conversion of using is a kind of algorithm of straight-line detection.The white tetragonal binary map that step (1) obtains is used the radon conversion, obtain the radon conversion figure of four corresponding bright spots.The corresponding tetragonal limit of each bright spot by reading the XY coordinate figure of the correspondence of bright spot on radon conversion figure, can be obtained the straight line analytic expression on every limit come.Tetragonal four end points coordinates can be obtained in per two limits of simultaneous.
Imaging device internal imaging process is followed lens image formation rule.Suppose that rectangle thing length and width such as business card or text are respectively l, m, with respect to photographer's rectangle anglec of rotation is α, take the lens primary optical axis and the camera plane angle theta of equipment, the coordinate of rectangular centre in the rectangular coordinate system at shooting area place is (x0, y0), the shooting area center is D to the optical center of lens distance, optical coefficient is k, one has 8 unknown parameters, can four end points coordinate representations of rectangle be come out with these 8 parameters, utilize two special light then: the light of crossing the light of primary optical axis and being parallel to primary optical axis is obtained the coordinate of four end points on imaging screen come.Like this, utilize tetragonal four end points coordinates of trying to achieve in the step (2) again, can form an equation group by simultaneous, comprise 8 equations and 8 unknown numbers,, can solve the length-width ratio of rectangle, just aspect ratio by the group of solving an equation.
Carry out timing, need to proofread and correct the coordinate of preceding four end points, i.e. the coordinate of being tried to achieve in the step (2), and the coordinate of proofreading and correct back four end points.Can be with the coordinate before proofreading and correct, and after proofreading and correct quadrangle become the condition of rectangle and proofread and correct after keep the condition of the aspect ratio of trying to achieve, obtain the coordinate of proofreading and correct back four end points.Utilizing these two groups of coordinates to try to achieve the distortion correction matrix proofreaies and correct.
Trimming process becomes rectangle with the quadrangle of distortion on the one hand, also will keep aspect ratio constant on the other hand.But after the correction, business card or the Word message above the text be it seems for the reader, may be inverted.Therefore, need utilize the technology of literal identification, whether numeral or the English alphabet differentiated above the business card are inverted.If inverted, image rotating is judged again so, to guarantee that literal is not put upside down among the last result.
The present invention can be used as the central processing module that the distortion correction submodule embeds imaging device inside, makes imaging device have the automatic distortion correction function.The distortion correction submodule is shared identical digital signal processing chip with central processing module on hardware, use digital image processing method of the present invention on the software, realizes automatic distortion correction on function.
Compared with prior art, the present invention can realize distortion correction fast, and whole process does not need artificial participation, really realizes from dynamic(al) correction.And, introduce the optical imagery Mathematical Modeling, try to achieve the former aspect ratio of business card, text, make and proofread and correct the result and keep original aspect ratio constant, guarantee that last correction result is undistorted in shape.At last, use literal identification, determine the not inversion of business card, the Word message above the text, use simple and convenient.The present invention can be used in most of imaging devices such as medical imaging, watch-dog, mobile phone, digital camera, Digital Video, and need not do big change on hardware, realizes simple.
Description of drawings
Fig. 1 is the inventive method flow chart
Fig. 2 is an imaging device internal optics imaging Mathematical Modeling.
Fig. 3 is the plane graph of shooting area.
Embodiment
The present invention utilizes the radon conversion to extract four cincture exterior features of business card, text fast, utilize the profile vertex information, fault image is proofreaied and correct, and, set up capture apparatus internal imaging Mathematical Modeling, foundation comprises the equation group of aspect ratio parameters such as business card, text, and the method for organizing by solving an equation is obtained the aspect ratio of rectangle object and is applied in the trimming process, makes last correction result can not produce distortion.At last, by literal identification, whether the image after identification is proofreaied and correct occurs being inverted, and judges whether and need the image after proofreading and correct be rotated, thereby obtain satisfactory correction result.
As shown in Figure 1, image processing method of the present invention comprises five steps, is respectively and extracts profile, resolves profile, calculates aspect ratio, distortion correction, rectification building-out.
Extract the profile step and comprise two parts, automatic threshold is cut apart with the morphology profile and is extracted.What automatic threshold was cut apart employing is big Tianjin algorithm.Consider the difference of background in colorfulness and brightness on business card or text and next door, adopt big Tianjin algorithm to separate business card or text with background simply fast.Use big Tianjin algorithm, cromogram or gray-scale map are become binary map BW, background parts is a black on binary map BW, and business card etc. become the quadrangle of a white.Then, to binary map BW applied morphology boundary extraction method, its processing procedure is: with one 3 * 3 value is the binary map BW that the corrosion of 1 matrix obtains above entirely, obtain a new binary map BW1, deduct among the binary map BW2 that boundary profile binary map BW2. that BW1 just obtains needing in the end obtains with BW then, background and tetragonal inside become black entirely, and have only tetragonal four edges to keep white.Like this, white tetragonal boundary profile just is extracted out.
What resolve the use of profile step is the algorithm of radon change detection straight line.The radon conversion can be understood as the projection of image in ρ-θ space, the every bit correspondence image space straight line in ρ-θ space, and the radon conversion is the integration of image pixel point on every straight line, also can be regarded as the image projection on trunnion axis after the θ angle that turns clockwise.Therefore every straight line can form a bright spot in ρ-θ space in the image, and the detection of straight line is converted in the detection of ρ-θ transform domain to bright spot.Therefore, the boundary profile binary map BW2 that the profile extraction step is obtained uses the radon conversion, can find has four tangible bright spots on the radon conversion figure that obtains, they are corresponding tetragonal four edges respectively, utilize the ρ of four bright spots, the θ value, the linear equation analytic expression of four edges writes out accurately.Therefore, boundary profile is resolved successfully.The equation on two limits of simultaneous can find the solution out with the coordinate of four end points respectively.These four end points are called as input point in distortion correction.
Calculate in the aspect ratio step, at first will set up the Mathematical Modeling of imaging device internal optics imaging.As shown in Figure 2, the lens centre O of imaging device and imaging screen and irradiated area (being the imaging zone) center O ' three point on a straight line, set up coordinate system as shown in Figure 2.Wherein, lens centre and imaging region centre distance are D, and the angle on the plane at lens primary optical axis and imaging region place is θ.During shooting, the set of lenses focal length of imaging device is f, and device interior image optics coefficient is k.Fig. 3 is the plane graph of imaging region.The length of supposing rectangular article such as business card, text is l, and wide is m, and the coordinate of the center of rectangle in the imaging region coordinate system is that (x0, y0), with respect to reference axis, rectangle has rotated the α angle.For convenience of calculation, order
R = ( l 2 ) 2 + ( m 2 ) 2
∂ 1 = arctan ( m l ) - ∂
∂ 2 = arctan ( l m ) - ∂
So, in coordinate system shown in Figure 3, the coordinate of four end points of rectangle is respectively
(R×cos( 1)+x 0,R×sin( 1)×sin(θ)+y 0,-D+R×sin( 1)×cos(θ)+y 0×sin(θ))
(-R×sin( 2)+x 0,R×cos( 2)×sin(θ)+y 0,-D+R×cos( 2)×cos(θ)+y 0×sin(θ))
(R×sin( 2)+x 0,-R×cos( 2)×sin(θ)+y 0,-D-R×cos( 2)×cos(θ)+y 0×sin(θ))
(-R×cos( 1)+x 0,-R×sin( 1)×sin(θ)+y 0,-D-R×sin( 1)×cos(θ)+y 0×sin(θ))
Utilize these four end points to cross two special light that are refracted to after the lens on the imaging screen, can obtain the coordinate of the picture of these four end points on imaging screen.These two straight lines, one was the straight line of optical center of lens, and direction is constant, and other one is the straight line that is parallel to primary optical axis, crosses lens refraction afterwards through falling on the imaging screen after the overfocus.Just can obtain the coordinate of picture point according to the equation of these two straight lines.The XY coordinate of the picture point of four end points correspondences of trying to achieve behind the work in coordinate system shown in Figure 2 is respectively:
( - f × [ R × COS ( ∂ 1 ) + x 0 ] D - f - R × sin ( ∂ 1 ) × cos ( θ ) - y 0 × sin ( θ ) , - f × [ R × sin ( ∂ 1 ) × sin ( θ ) + y 0 ] D - f - R × sin ( ∂ 1 ) × cos ( θ ) - y 0 × sin ( θ ) )
( f × [ R × sin ( ∂ 2 ) - x 0 ] D - f - R × cos ( ∂ 2 ) × cos ( θ ) - y 0 × sin ( θ ) , - f × [ R × cos ( ∂ 2 ) × sin ( θ ) + y 0 ] D - f - R × cos ( ∂ 2 ) × cos ( θ ) - y 0 × sin ( θ ) )
( - f × [ R × sin ( ∂ 2 ) + x 0 ] D - f + R × cos ( ∂ 2 ) × cos ( θ ) - y 0 × sin ( θ ) , f × [ R × cos ( ∂ 2 ) × sin ( θ ) - y 0 ] D - f + R × cos ( ∂ 2 ) × cos ( θ ) - y 0 × sin ( θ ) )
( f × [ R × cos ( ∂ 1 ) - x 0 ] D - f + R × sin ( ∂ 1 ) × cos ( θ ) - y 0 × sin ( θ ) , f × [ R × sin ( ∂ 1 ) × sin ( θ ) - y 0 ] D - f + R × sin ( ∂ 1 ) × cos ( θ ) - y 0 × sin ( θ ) )
Utilize again in the step (2), the coordinate of tetragonal four end points in the image of trying to achieve, simultaneous:
- f × [ R × cos ( ∂ 1 ) + x 0 ] D - f - R × sin ( ∂ 1 ) × cos ( θ ) - y 0 × sin ( θ ) × k = x 1 - s 2
- f × [ R × sin ( ∂ 1 ) × sin ( θ ) + y 0 ] D - f - R × sin ( ∂ 1 ) × cos ( θ ) - y 0 × sin ( θ ) × k = y 1 - t 2
f × [ R × sin ( ∂ 2 ) - x 0 ] D - f - R × cos ( ∂ 2 ) × cos ( θ ) - y 0 × sin ( θ ) × k = x 2 - s 2
- f × [ R × cos ( ∂ 2 ) × sin ( θ ) + y 0 ] D - f - R × cos ( ∂ 2 ) × cos ( θ ) - y 0 × sin ( θ ) × k = y 2 - t 2
- f × [ R × sin ( ∂ 2 ) + x 0 ] D - f + R × cos ( ∂ 2 ) × cos ( θ ) - y 0 × sin ( θ ) × k = x 3 - s 2
f × [ R × cos ( ∂ 2 ) × sin ( θ ) - y 0 ] D - f + R × cos ( ∂ 2 ) × cos ( θ ) - y 0 × sin ( θ ) × k = y 3 - t 2
f × [ R × cos ( ∂ 1 ) - x 0 ] D - f + R × sin ( ∂ 1 ) × cos ( θ ) - y 0 × sin ( θ ) × k = x 4 - s 2
f × [ R × sin ( ∂ 1 ) × sin ( θ ) - y 0 ] D - f + R × sin ( ∂ 1 ) × cos ( θ ) - y 0 × sin ( θ ) × k = y 4 - t 2
Wherein, k is the scaling coefficient between imaging screen and the image, and s and t are the dimensions of image array, x1, x2, x3, x4, y1, y2, y3, y4 be respectively clapping of calculating in the step (2) image in the coordinate of four end points of white quadrangle.Like this, above equation group totally 8 unknown numbers (focal distance f is known), 8 equations, unknown number can solve respectively, like this, the ratio of l and m is that aspect ratio can be readily solved.
During distortion correction, utilize two groups of coordinate figures.One group is the coordinate figure of white tetragonal four end points of trying to achieve in step (2), another group be proofread and correct after the coordinate figure of four end points of rectangle of these four end points correspondences, this group end points is become datum mark.The upper left end points of fixed white quadrangle at first, the upper left end points of rectangle also is this point after proofreading and correct, and is motionless on the position, coordinate figure is also constant.Selecting then with the fixed endpoint is a limit of end points, calculates its length of side, and with the length of side of a this edge length of side as the rectangle after proofreading and correct, the aspect ratio that utilization is calculated above can calculate the length of side on an other limit of the rectangle after proofreading and correct.After the length and width of rectangle are all determined, utilize the coordinate of fixing point again, can respectively the coordinate Calculation of its excess-three point be come out.Therefore, the coordinate of four end points of rectangle after proofreading and correct is decided, and promptly the coordinate of datum mark is decided.Utilize the coordinate of input point and datum mark correction matrix can be obtained.Solution procedure is as follows: before supposing to proofread and correct four point coordinates for (x1, y1), (x2, y2), (x3, y3), (x4, y4), four point coordinates are (x1 ', y1 ') after proofreading and correct, (x2 ', y2 '), (x3 ', y3 '), (x4 ', y4 '), the distortion correction matrix H, H = h 11 h 12 h 13 h 21 h 22 h 23 h 31 h 32 h 33 h=(h 11,h 12,h 13,h 21,h 22,h 23,h 31,h 32,h 33) T
There is relational expression between them: x 1 y 1 1 0 0 0 - x 1 ′ x 1 - x 1 ′ y 1 - x 1 0 0 0 x 1 y 1 1 - y 1 ′ x 1 - y 1 ′ y 1 - y 1 x 2 y 2 1 0 0 0 - x 2 ′ x 2 - x 2 ′ y 2 - x 2 0 0 0 x 2 y 2 1 - y 2 ′ x 2 - y 2 ′ y 2 - y 2 x 3 y 3 1 0 0 0 - x 3 ′ x 3 - x 3 ′ y 3 - x 3 0 0 0 x 3 y 3 1 - y 3 ′ x 3 - y 3 ′ y 3 - y 3 x 4 y 4 1 0 0 0 - x 4 ′ x 4 - x 4 ′ y 4 - x 4 0 0 0 x 4 y 4 1 - y 4 ′ x 4 - y 4 ′ y 4 - y 4 × h = 0
Utilize this relational expression can solve h, corresponding distortion correction matrix H can solve.Utilize the coordinate and the distortion correction matrix of the picture element of original image to proofread and correct original image, in the image that obtains after proofreading and correct, business card and text become rectangle, and have kept original aspect ratio.
Using literal identification compensates the image after proofreading and correct.The development of present character recognition technology rapidly, and because business card or the numeral above the text all are block letter, than handwritten text identification simple a lot.The rectification building-out step comprises four parts: image segmentation, feature extraction, literal identification, judgement compensation.After image after proofreading and correct carried out preliminary treatment, image binaryzation, make the image after the binaryzation, literal etc. are black, and other backgrounds become white.The word of asking that utilizes morphology connected region method will need to discern splits, specific practice is as follows: detect first black picture element point on binary map, suppose that it is a black picture element point on the connected domain, its beginning as recursive procedure, recurrence formula is: X k=(X K-1 B) ∩ A, X kThe connected region that representative extracts, the binary map above the A representative, B is one 3 * 38 connected region templates.After satisfactory connected region is found out with all, carry out normalization again, all connected regions are all carried out interpolation become 20 * 10 matrix.Because the overwhelming majority comprises Arabic numerals in business card or the text, so the present invention discerns Arabic numerals emphatically.If do not have numeral in business card or the text, can discern English alphabet and Chinese character successively so.For example, when the present invention discerns numeral, by to 2,3,4,5,7 (because 0,1,6,8, even 9 be inverted and also have corresponding digital corresponding with it, for example, 0 and 0,6 and 9, or the like.) analysis of feature, adopt four kinds of numerical characteristics: the horizontal line feature, vertical line feature, horizontal direction are crossed the line number, and vertical direction is crossed the line number, and these digital numerical characteristics are as shown in table 1 below.Therefore, set up the respective classified device, as shown in the following Table 2, can be respectively with these digit recognition.For example, identify numeral 2 now, explanation so, business cards etc. are not inverted, if, utilize grader not identify numeral, explanation so, business cards etc. are inverted.Therefore, need the image after proofreading and correct be rotated again, the image that obtains then is only last needs.
Table 1 is the numerical characteristic form.
Numerical characteristic 2 3 4 5 7
The horizontal line feature Last horizontal line 0 0 0 1 1
Following horizontal line 1 0 0 0 0
The vertical line feature Left side vertical line 0 0 0 0 0
Right vertical line 0 0 0 0 0
Horizontal direction is crossed the line feature Went up the line number 2 2 2 1 2
Played the line number 2 2 1,2 2 1
Vertical direction is crossed the line feature The line number is crossed on a left side 4,3 2,3,4 2,3 4,3 1,2
The right line number of crossing 3 4 2 3 2
Table 2 is the digital sort device.
Numerical characteristic 2 3 4 5 7
Last horizontal line 0 0 0 1 1
Following horizontal line 1 0 0 0 0
Left side vertical line 0 0 0 0 0
Right vertical line 0 0 0 0 0
Went up the line number 2 2 2 1 2
The right line number of crossing 3 4 2 3 2
Last 1/3 highly located the line number 1 1 2 1 1
The present invention can be used as the central processing module that the distortion correction submodule embeds imaging device inside, makes imaging device have the automatic distortion correction function.Its implementation is, the distortion correction submodule is embedded in the central processing module of imaging device as function sub-modules, on hardware, share identical digital signal processing chip with central processing module, use digital image processing method of the present invention on the software, on function, realize automatic distortion correction.

Claims (6)

1、一种图像畸变自动校正的图像处理方法,其特征在于,包括五个步骤:1. An image processing method for automatic correction of image distortion, comprising five steps: (1)提取轮廓:利用大津算法进行自动阈值分割,采用形态学方法进行边缘轮廓提取;(1) Contour extraction: use the Otsu algorithm for automatic threshold segmentation, and use morphological methods for edge contour extraction; (2)解析轮廓:利用radon变换将上步提取的边缘轮廓以直线方程的形式解析出来,并且求得四个端点的坐标;(2) Analyzing the contour: use the radon transformation to analyze the edge contour extracted in the previous step in the form of a straight line equation, and obtain the coordinates of the four endpoints; (3)计算纵横比:建立成像设备内部光学成像的数学模型,利用光学成像知识,建立方程组,求得纵横比;(3) Calculate the aspect ratio: establish a mathematical model of the optical imaging inside the imaging device, use the knowledge of optical imaging to establish a system of equations, and obtain the aspect ratio; (4)畸变校正:利用两组坐标求得畸变校正矩阵对图像进行校正,校正过程中图像的纵横比保持不变;(4) Distortion correction: use two sets of coordinates to obtain the distortion correction matrix to correct the image, and the aspect ratio of the image remains unchanged during the correction process; (5)校正补偿:利用数字识别的方法对校正后的图像判断上面的数字时候发生倒置的现象,选择是否需要旋转图像,完成校正后的图像进行校正不成。(5) Correction and compensation: Use the method of digital recognition to judge the inversion of the above numbers on the corrected image, choose whether to rotate the image, and the corrected image cannot be corrected. 2、根据权利要求1所述的图像畸变自动校正的图像处理方法,其特征是,所述的提取轮廓步骤包括两个部分:自动阈值分割和形态学轮廓提取,首先采用大津算法对图像进行自动阈值分割,得到一个二值图,在二值图上,名片、文本变成白色,除此之外的背景变为黑色;利用形态学方法,对白色区域进行处理,只留下白色四边形的边缘轮廓,这样,轮廓提取完成。2. The image processing method for automatic correction of image distortion according to claim 1, characterized in that, the step of extracting contours includes two parts: automatic threshold segmentation and morphological contour extraction. Threshold segmentation to obtain a binary image. On the binary image, the business card and text become white, and the other background becomes black; use the morphological method to process the white area, leaving only the edges of the white quadrilateral Contour, in this way, the contour extraction is completed. 3、根据权利要求1所述的图像畸变自动校正的图像处理方法,其特征是,所述的解析轮廓步骤中,利用radon变换解析出二值图上四条白色边缘直线的ρ-θ空间信息,把四条白色边缘的直线方程求出来,然后利用解方程组的方法,把四个端点的坐标求解出来。3. The image processing method for automatic correction of image distortion according to claim 1, characterized in that, in the step of analyzing the contour, the ρ-θ spatial information of the four white edge straight lines on the binary image is analyzed by using radon transformation, Find the straight line equations of the four white edges, and then solve the coordinates of the four endpoints by using the method of solving the equation system. 4、根据权利要求1所述的图像畸变自动校正的图像处理方法,其特征是,所述的计算纵横比步骤中,通过建立成像设备内部光学成像的数学模型,建立如下方程组:4. The image processing method for automatic correction of image distortion according to claim 1, characterized in that, in the step of calculating the aspect ratio, by establishing a mathematical model of optical imaging inside the imaging device, the following equations are established: -- ff ×× [[ RR ×× coscos (( ∂∂ 11 )) ++ xx 00 ]] DD. -- ff -- RR ×× sinsin (( ∂∂ 11 )) ×× coscos (( θθ )) -- ythe y 00 ×× sinsin (( θθ )) ×× kk == xx 11 -- sthe s 22 -- ff ×× [[ RR ×× sinsin (( ∂∂ 11 )) ×× sinsin (( θθ )) ++ ythe y 00 ]] DD. -- ff -- RR ×× sinsin (( ∂∂ 11 )) ×× coscos (( θθ )) -- ythe y 00 ×× sinsin (( θθ )) ×× kk == ythe y 11 -- tt 22 ff ×× [[ RR ×× sinsin (( ∂∂ 22 )) -- xx 00 ]] DD. -- ff -- RR ×× coscos (( ∂∂ 22 )) ×× coscos (( θθ )) -- ythe y 00 ×× sinsin (( θθ )) ×× kk == xx 22 -- sthe s 22 -- ff ×× [[ RR ×× coscos (( ∂∂ 22 )) ×× sinsin (( θθ )) ++ ythe y 00 ]] DD. -- ff -- RR ×× coscos (( ∂∂ 22 )) ×× coscos (( θθ )) -- ythe y 00 ×× sinsin (( θθ )) ×× kk == ythe y 22 -- tt 22 -- ff ×× [[ RR ×× sinsin (( ∂∂ 22 )) ++ xx 00 ]] DD. -- ff ++ RR ×× coscos (( ∂∂ 22 )) ×× coscos (( θθ )) -- ythe y 00 ×× sinsin (( θθ )) ×× kk == xx 33 -- sthe s 22 ff ×× [[ RR ×× coscos (( ∂∂ 22 )) ×× sinsin (( θθ )) -- ythe y 00 ]] DD. -- ff ++ RR ×× coscos (( ∂∂ 22 )) ×× coscos (( θθ )) -- ythe y 00 ×× sinsin (( θθ )) ×× kk == ythe y 33 -- tt 22 ff ×× [[ RR ×× coscos (( ∂∂ 11 )) -- xx 00 ]] DD. -- ff ++ RR ×× sinsin (( ∂∂ 11 )) ×× coscos (( θθ )) -- ythe y 00 ×× sinsin (( θθ )) ×× kk == xx 44 -- sthe s 22 ff ×× [[ RR ×× sinsin (( ∂∂ 11 )) ×× sinsin (( θθ )) -- ythe y 00 ]] DD. -- ff ++ RR ×× sinsin (( ∂∂ 11 )) ×× coscos (( θθ )) -- ythe y 00 ×× sinsin (( θθ )) ×× kk == ythe y 44 -- tt 22 其中,矩形长l,宽m,透镜中心与成像区域中心距离为D,透镜主光轴与成像区域所在的平面的夹角为θ,已知焦距f,矩形的中心在成像区域坐标系中的坐标为(x0,y0),相对于坐标轴,矩形旋转了α角,k是成像屏与图像之间的放缩系数,s和t是图像矩阵的维数,x1,x2,x3,x4,y1,y2,y3,y4分别是步骤(2)中计算出的拍得的图像中白色四边形四个端点的坐标,假设Among them, the length of the rectangle is l, the width is m, the distance between the center of the lens and the center of the imaging area is D, the angle between the main optical axis of the lens and the plane where the imaging area is located is θ, the focal length f is known, and the center of the rectangle is in the coordinate system of the imaging area The coordinates are (x0, y0), relative to the coordinate axis, the rectangle is rotated by α angle, k is the scaling factor between the imaging screen and the image, s and t are the dimensions of the image matrix, x1, x2, x3, x4, y1, y2, y3, y4 are the coordinates of the four endpoints of the white quadrilateral in the captured image calculated in step (2), assuming RR == (( ll 22 )) 22 ++ (( mm 22 )) 22 ∂∂ 11 == arctanarctan (( mm ll )) -- ∂∂ ∂∂ 22 == arctanarctan (( ll mm )) -- ∂∂ 这样,上面的方程组可解,这些参数解出来,就能得到矩形的纵横比。In this way, the above equations can be solved, and these parameters can be solved to obtain the aspect ratio of the rectangle. 5、根据权利要求1所述的图像畸变自动校正的图像处理方法,其特征是,所述的畸变校正步骤,首先利用步骤(2)中计算出来的四个端点的坐标值作为输入点,利用输入点以及纵横比将基准点计算出来,然后利用两组坐标值将畸变校正矩阵H求出来,再利用畸变校正矩阵对原图像进行校正,校正之后的图像中矩形保持纵横比不变。5. The image processing method for automatic correction of image distortion according to claim 1, characterized in that, in the distortion correction step, first, the coordinate values of the four endpoints calculated in step (2) are used as input points, and Input points and aspect ratio to calculate the reference point, then use two sets of coordinate values to obtain the distortion correction matrix H, and then use the distortion correction matrix to correct the original image, and the rectangle in the corrected image keeps the aspect ratio unchanged. 6、根据权利要求1所述的图像畸变自动校正的图像处理方法,其特征是,所述的校正补偿步骤中,采用文字识别的算法进行补偿,如果识别结果中正确识别出数字或英文字母,那么不需旋转校正之后的图像,如果识别结果没有识别出数字或英文字母,那么需要对图像进行旋转校正。6. The image processing method for automatic correction of image distortion according to claim 1, characterized in that, in the correction and compensation step, a text recognition algorithm is used for compensation, and if the number or English letter is correctly recognized in the recognition result, Then there is no need to rotate the corrected image. If the recognition result does not recognize numbers or English letters, then the image needs to be rotated and corrected.
CN 200610117277 2006-10-19 2006-10-19 Image processing method for image distortion automatic correction Pending CN1937698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610117277 CN1937698A (en) 2006-10-19 2006-10-19 Image processing method for image distortion automatic correction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200610117277 CN1937698A (en) 2006-10-19 2006-10-19 Image processing method for image distortion automatic correction

Publications (1)

Publication Number Publication Date
CN1937698A true CN1937698A (en) 2007-03-28

Family

ID=37954941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610117277 Pending CN1937698A (en) 2006-10-19 2006-10-19 Image processing method for image distortion automatic correction

Country Status (1)

Country Link
CN (1) CN1937698A (en)

Cited By (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101807293A (en) * 2010-03-19 2010-08-18 上海合合信息科技发展有限公司 Method for adjusting detection result of image quadrilateral frame
WO2011003315A1 (en) * 2009-07-08 2011-01-13 中兴通讯股份有限公司 Mobile terminal based image processing method and mobile terminal
CN101989349A (en) * 2009-08-03 2011-03-23 夏普株式会社 Image output apparatus and method, portable terminal apparatus and captured image processing system
CN102073997A (en) * 2011-01-12 2011-05-25 东华理工大学 Small-square document image perspective-recovery method
CN101256627B (en) * 2008-01-25 2011-12-28 浙江工业大学 Method for analysis of picture distortion based on constant moment
WO2012075817A1 (en) * 2010-12-10 2012-06-14 上海合合信息科技发展有限公司 Text image trimming method
CN102750669A (en) * 2012-05-29 2012-10-24 山东神思电子技术股份有限公司 Image rotation processing method
CN103106634A (en) * 2012-12-26 2013-05-15 上海合合信息科技发展有限公司 Method and system for protecting bank card individual information
CN103139438A (en) * 2011-11-21 2013-06-05 株式会社Pfu Image processing apparatus and image processing method
CN103679700A (en) * 2013-10-29 2014-03-26 成都三泰电子实业股份有限公司 Bill image inversion detection system
CN104427234A (en) * 2013-09-02 2015-03-18 联想(北京)有限公司 Image distortion correction method and electronic device
CN105590298A (en) * 2014-11-07 2016-05-18 三星电子株式会社 Extracting and correcting image data of an object from an image
CN106846607A (en) * 2017-01-11 2017-06-13 深圳怡化电脑股份有限公司 A kind of Paper Currency Identification and device
CN106952231A (en) * 2017-03-20 2017-07-14 南京大学 A real-time image correction method based on mobile phone platform
CN106991649A (en) * 2016-01-20 2017-07-28 富士通株式会社 The method and apparatus that the file and picture captured to camera device is corrected
CN107096720A (en) * 2017-06-22 2017-08-29 西安科技大学 Express mail bar code automatic recognition system and method based on image procossing
CN107944324A (en) * 2017-11-16 2018-04-20 凌云光技术集团有限责任公司 A kind of Quick Response Code distortion correction method and device
WO2018112790A1 (en) * 2016-12-21 2018-06-28 华为技术有限公司 Image processing method and apparatus
CN108320270A (en) * 2018-01-26 2018-07-24 腾讯科技(深圳)有限公司 A kind of method for correcting image, device and storage medium
CN108510463A (en) * 2018-05-07 2018-09-07 凌云光技术集团有限责任公司 A kind of antidote and device of fault image
CN108537146A (en) * 2018-03-22 2018-09-14 五邑大学 A kind of block letter mixes line of text extraction system with handwritten form
CN108805124A (en) * 2018-04-18 2018-11-13 北京嘀嘀无限科技发展有限公司 Image processing method and device, computer readable storage medium
CN109214389A (en) * 2018-09-21 2019-01-15 上海小萌科技有限公司 A kind of target identification method, computer installation and readable storage medium storing program for executing
CN109409366A (en) * 2018-10-30 2019-03-01 四川长虹电器股份有限公司 Distorted image correction method and device based on Corner Detection
CN109754381A (en) * 2019-01-03 2019-05-14 广东小天才科技有限公司 Image processing method and system
CN110097054A (en) * 2019-04-29 2019-08-06 济南浪潮高新科技投资发展有限公司 A kind of text image method for correcting error based on image projection transformation
WO2019201141A1 (en) * 2018-04-18 2019-10-24 Beijing Didi Infinity Technology And Development Co., Ltd. Methods and systems for image processing
CN110505398A (en) * 2019-07-16 2019-11-26 北京三快在线科技有限公司 A kind of image processing method, device, electronic equipment and storage medium
CN110991454A (en) * 2019-12-23 2020-04-10 云南大学 Blade image recognition method and device, electronic equipment and storage medium
CN111480104A (en) * 2017-10-10 2020-07-31 视界工程有限公司 Stereomicroscope with single objective
CN111932483A (en) * 2020-09-28 2020-11-13 江西汉辰信息技术股份有限公司 Picture processing method and device, storage medium and computer equipment
CN111814802B (en) * 2020-08-31 2021-01-26 创新奇智(南京)科技有限公司 Character image processing method and device, storage medium and electronic equipment
CN114485389A (en) * 2020-10-26 2022-05-13 住友重机械工业株式会社 Distortion aberration correction processing device, distortion correction method and storage medium
CN115760620A (en) * 2022-11-18 2023-03-07 荣耀终端有限公司 Document correction method and device and electronic equipment
CN117237957A (en) * 2023-11-16 2023-12-15 新视焰医疗科技(杭州)有限公司 Method and system for detecting direction of document and correcting inclined or malformed document
CN118552457A (en) * 2024-07-25 2024-08-27 吉林大学 A method for obtaining a true color background image in an adaptive camouflage device

Cited By (56)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256627B (en) * 2008-01-25 2011-12-28 浙江工业大学 Method for analysis of picture distortion based on constant moment
WO2011003315A1 (en) * 2009-07-08 2011-01-13 中兴通讯股份有限公司 Mobile terminal based image processing method and mobile terminal
CN101989349A (en) * 2009-08-03 2011-03-23 夏普株式会社 Image output apparatus and method, portable terminal apparatus and captured image processing system
CN101989349B (en) * 2009-08-03 2012-10-10 夏普株式会社 Image output apparatus and method and captured image processing system
CN101807293A (en) * 2010-03-19 2010-08-18 上海合合信息科技发展有限公司 Method for adjusting detection result of image quadrilateral frame
US9082192B2 (en) 2010-12-10 2015-07-14 Intsig Information Co., Ltd Text image trimming method
WO2012075817A1 (en) * 2010-12-10 2012-06-14 上海合合信息科技发展有限公司 Text image trimming method
CN102073997A (en) * 2011-01-12 2011-05-25 东华理工大学 Small-square document image perspective-recovery method
CN102073997B (en) * 2011-01-12 2012-11-07 东华理工大学 Small-square document image perspective-recovery method
CN103139438B (en) * 2011-11-21 2015-06-03 株式会社Pfu Image processing apparatus and image processing method
CN103139438A (en) * 2011-11-21 2013-06-05 株式会社Pfu Image processing apparatus and image processing method
CN102750669A (en) * 2012-05-29 2012-10-24 山东神思电子技术股份有限公司 Image rotation processing method
CN102750669B (en) * 2012-05-29 2014-07-09 山东神思电子技术股份有限公司 Image rotation processing method
CN103106634A (en) * 2012-12-26 2013-05-15 上海合合信息科技发展有限公司 Method and system for protecting bank card individual information
CN104427234A (en) * 2013-09-02 2015-03-18 联想(北京)有限公司 Image distortion correction method and electronic device
CN103679700A (en) * 2013-10-29 2014-03-26 成都三泰电子实业股份有限公司 Bill image inversion detection system
CN103679700B (en) * 2013-10-29 2016-09-07 成都三泰控股集团股份有限公司 Bill image inversion detection system
CN105590298A (en) * 2014-11-07 2016-05-18 三星电子株式会社 Extracting and correcting image data of an object from an image
CN105590298B (en) * 2014-11-07 2021-06-11 三星电子株式会社 Extracting and correcting image data of an object from an image
CN106991649A (en) * 2016-01-20 2017-07-28 富士通株式会社 The method and apparatus that the file and picture captured to camera device is corrected
CN109479082A (en) * 2016-12-21 2019-03-15 华为技术有限公司 Image processing method and device
US10909719B2 (en) 2016-12-21 2021-02-02 Huawei Technologies Co., Ltd. Image processing method and apparatus
CN109479082B (en) * 2016-12-21 2021-10-15 华为技术有限公司 Image processing method and apparatus
WO2018112790A1 (en) * 2016-12-21 2018-06-28 华为技术有限公司 Image processing method and apparatus
CN106846607A (en) * 2017-01-11 2017-06-13 深圳怡化电脑股份有限公司 A kind of Paper Currency Identification and device
CN106952231A (en) * 2017-03-20 2017-07-14 南京大学 A real-time image correction method based on mobile phone platform
CN106952231B (en) * 2017-03-20 2019-06-11 南京大学 A real-time image correction method based on mobile phone platform
CN107096720A (en) * 2017-06-22 2017-08-29 西安科技大学 Express mail bar code automatic recognition system and method based on image procossing
CN107096720B (en) * 2017-06-22 2022-11-29 西安科技大学 Express barcode automatic recognition system and method based on image processing
CN111480104A (en) * 2017-10-10 2020-07-31 视界工程有限公司 Stereomicroscope with single objective
CN107944324A (en) * 2017-11-16 2018-04-20 凌云光技术集团有限责任公司 A kind of Quick Response Code distortion correction method and device
CN108320270B (en) * 2018-01-26 2023-12-29 腾讯科技(深圳)有限公司 Image correction method, device and storage medium
CN108320270A (en) * 2018-01-26 2018-07-24 腾讯科技(深圳)有限公司 A kind of method for correcting image, device and storage medium
CN108537146B (en) * 2018-03-22 2023-03-31 五邑大学 Print form and handwriting mixed text line extraction system
CN108537146A (en) * 2018-03-22 2018-09-14 五邑大学 A kind of block letter mixes line of text extraction system with handwritten form
CN108805124B (en) * 2018-04-18 2019-10-18 北京嘀嘀无限科技发展有限公司 Image processing method and device, computer readable storage medium
WO2019201141A1 (en) * 2018-04-18 2019-10-24 Beijing Didi Infinity Technology And Development Co., Ltd. Methods and systems for image processing
CN108805124A (en) * 2018-04-18 2018-11-13 北京嘀嘀无限科技发展有限公司 Image processing method and device, computer readable storage medium
CN110622172A (en) * 2018-04-18 2019-12-27 北京嘀嘀无限科技发展有限公司 Image processing method and system
CN108510463B (en) * 2018-05-07 2020-12-25 凌云光技术股份有限公司 Method and device for correcting distorted image
CN108510463A (en) * 2018-05-07 2018-09-07 凌云光技术集团有限责任公司 A kind of antidote and device of fault image
CN109214389A (en) * 2018-09-21 2019-01-15 上海小萌科技有限公司 A kind of target identification method, computer installation and readable storage medium storing program for executing
CN109214389B (en) * 2018-09-21 2021-09-28 上海小萌科技有限公司 Target identification method, computer device and readable storage medium
CN109409366B (en) * 2018-10-30 2022-04-05 四川长虹电器股份有限公司 Distorted image correction method and device based on angular point detection
CN109409366A (en) * 2018-10-30 2019-03-01 四川长虹电器股份有限公司 Distorted image correction method and device based on Corner Detection
CN109754381A (en) * 2019-01-03 2019-05-14 广东小天才科技有限公司 Image processing method and system
CN110097054A (en) * 2019-04-29 2019-08-06 济南浪潮高新科技投资发展有限公司 A kind of text image method for correcting error based on image projection transformation
CN110505398A (en) * 2019-07-16 2019-11-26 北京三快在线科技有限公司 A kind of image processing method, device, electronic equipment and storage medium
CN110991454A (en) * 2019-12-23 2020-04-10 云南大学 Blade image recognition method and device, electronic equipment and storage medium
CN111814802B (en) * 2020-08-31 2021-01-26 创新奇智(南京)科技有限公司 Character image processing method and device, storage medium and electronic equipment
CN111932483A (en) * 2020-09-28 2020-11-13 江西汉辰信息技术股份有限公司 Picture processing method and device, storage medium and computer equipment
CN114485389A (en) * 2020-10-26 2022-05-13 住友重机械工业株式会社 Distortion aberration correction processing device, distortion correction method and storage medium
CN115760620B (en) * 2022-11-18 2023-10-20 荣耀终端有限公司 Document correction method and device and electronic equipment
CN115760620A (en) * 2022-11-18 2023-03-07 荣耀终端有限公司 Document correction method and device and electronic equipment
CN117237957A (en) * 2023-11-16 2023-12-15 新视焰医疗科技(杭州)有限公司 Method and system for detecting direction of document and correcting inclined or malformed document
CN118552457A (en) * 2024-07-25 2024-08-27 吉林大学 A method for obtaining a true color background image in an adaptive camouflage device

Similar Documents

Publication Publication Date Title
CN1937698A (en) Image processing method for image distortion automatic correction
CN110659647B (en) Seal image identification method and device, intelligent invoice identification equipment and storage medium
CN111507251B (en) Method and device for positioning answering area in test question image, electronic equipment and computer storage medium
US9785819B1 (en) Systems and methods for biometric image alignment
WO2017031716A1 (en) Method for analyzing and recognizing handwritten mathematical formula structure in natural scene image
JP5229050B2 (en) Document area extraction apparatus, method, and program from image
CN111242124B (en) Certificate classification method, device and equipment
CN102648622A (en) Image processing device, image processing method, image processing program, and recording medium with recorded image processing program
WO2020097909A1 (en) Text detection method and apparatus, and storage medium
CN106960208A (en) A kind of instrument liquid crystal digital automatic segmentation and the method and system of identification
CN104715256A (en) Auxiliary calligraphy exercising system and evaluation method based on image method
CN112597940B (en) Certificate image recognition method and device and storage medium
Raigonda Signature Verification System Using SSIM In Image Processing
CN112036259A (en) Form correction and recognition method based on combination of image processing and deep learning
CN110110697A (en) More fingerprint segmentation extracting methods, system, equipment and medium based on direction correction
CN114463770A (en) Intelligent question-cutting method for general test paper questions
US10395090B2 (en) Symbol detection for desired image reconstruction
CN111815748B (en) Animation processing method and device, storage medium and electronic equipment
CN110288040B (en) Image similarity judging method and device based on topology verification
Noh et al. Empirical study on touchless fingerprint recognition using a phone camera
JP2011107878A (en) Position detection apparatus and position detection method
CN116579963A (en) System and method for generating dynamic image by using static image
JP6175904B2 (en) Verification target extraction system, verification target extraction method, verification target extraction program
CN114299509A (en) Method, device, equipment and medium for acquiring information
CN113487515A (en) Method and device for correcting tilt of pointer instrument image

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication