CN108305224A - A kind of distortion correction method of image, device and television set - Google Patents

A kind of distortion correction method of image, device and television set Download PDF

Info

Publication number
CN108305224A
CN108305224A CN201810036866.6A CN201810036866A CN108305224A CN 108305224 A CN108305224 A CN 108305224A CN 201810036866 A CN201810036866 A CN 201810036866A CN 108305224 A CN108305224 A CN 108305224A
Authority
CN
China
Prior art keywords
image
target pixel
pixel points
distortion
straight line
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
CN201810036866.6A
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.)
Huaya Microelectronics Shanghai Inc
Original Assignee
Huaya Microelectronics Shanghai Inc
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 Huaya Microelectronics Shanghai Inc filed Critical Huaya Microelectronics Shanghai Inc
Priority to CN201810036866.6A priority Critical patent/CN108305224A/en
Publication of CN108305224A publication Critical patent/CN108305224A/en
Pending legal-status Critical Current

Links

Classifications

    • G06T5/80
    • G06T3/047
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4007Interpolation-based scaling, e.g. bilinear interpolation

Abstract

The embodiment of the present application provides a kind of distortion correction method of image, device and television set, is related to display technology field, to solve the problems, such as that the prior art existing calculating time course when carrying out deformity correction to fault image is long, efficiency is too low.This method includes:According to coordinate, target pixel points in benchmark image the coordinate on the vertex of residing subregion and vertex amount of distortion in fault image of the target pixel points in benchmark image, mapping point of the target pixel points in fault image is calculated;Wherein, the image that image is formed after being distorted on the basis of fault image;If pixel is not present in mapping point, the pixel near mapping point is chosen as the first pixel, and according to the coordinate of the first pixel and color-values and mapping point, calculates the color-values of target pixel points;If there are pixels for mapping point, using the color-values of the pixel as the color-values of target pixel points.

Description

A kind of distortion correction method of image, device and television set
Technical field
This application involves a kind of display technology field more particularly to distortion correction method of image, device and television sets.
Background technology
When shooting image using wide-angle lens, taken image is easy beyond the region except certain angle range Generate distortion, due to the generation of this distortion be due to the characteristic of wide-angle camera itself caused by, wide-angle lens is being clapped After taking the photograph fault image, need to carry out geometric transformation to the fault image according to aberration correction algorithm.
The distortion correction flow of the fault image of the prior art includes:First, the distortion mathematics of wide-angle lens is pre-estimated Then model is based on the distortion mathematical model and aberration correction algorithm, calculates each pixel in benchmark image and distorting Coordinate in image and corresponding color-values, complete the geometric transformation of fault image.But since existing distortion correction is calculated Method process is complicated, so that the prior art coordinate and color of each pixel in fault image in calculating benchmark image When value, overlong time is calculated, calculation amount is excessive.
Therefore, how deformity correction fast and effectively to be carried out to fault image, is current urgent problem to be solved.
Invention content
Embodiments herein provides a kind of distortion correction method of image, device and television set, to solve existing skill The too low problem of the art calculating overlong time existing when carrying out deformity correction to fault image, efficiency.
In order to achieve the above objectives, embodiments herein adopts the following technical scheme that:
In a first aspect, a kind of distortion correction method of image is provided, including:
According to coordinate, the target pixel points in benchmark image residing subregion of the target pixel points in benchmark image The amount of distortion of the coordinate on vertex and the vertex in fault image calculates the target pixel points in the fault image Mapping point;Wherein, the fault image is the image formed after the benchmark image is distorted;
If pixel is not present in the mapping point, the pixel near the mapping point is chosen as the first pixel Point, and according to the coordinate of first pixel and color-values and the mapping point, calculate the color of the target pixel points Coloured silk value;
If there are pixels for the mapping point, using the color-values of the pixel as the color of the target pixel points Coloured silk value.
Second aspect provides a kind of distortion correction device of image, including:Processor and memory;Wherein, the storage Device is executed for controlling the processor described in first aspect for storing computer executable code, the computer executable code Method.
The third aspect provides a kind of television set, including:The distortion correction device of image described in second aspect.
Scheme provided by the present application, by abnormal in benchmark image generation to the vertex of each subregion in benchmark image in advance The coordinate of amount of distortion and the vertex in benchmark image in the fault image formed after change is stored, so as to need It, can be according to the target pixel points in benchmark image when determining the color-values of a certain target pixel points in the benchmark image Coordinate, the target pixel points coordinate on the vertex of residing subregion and vertex in benchmark image it is abnormal in fault image Variable calculates mapping point of the target pixel points in the fault image, then, then determines the mapping in the fault image It whether there is pixel at coordinate, if there are pixel, directly using the color-values of the pixel as the target pixel points Color-values, if pixel is not present, from the pixel chosen in fault image near the mapping point as the first pixel, And according to the coordinate of first pixel and color-values and the mapping point, indirectly estimate the color of the target pixel points Value.Need the mapping point and color-values of all pixels point in calculating benchmark image, the application logical compared with the prior art Amount of distortion of the partial pixel point in fault image in prestoring benchmark image is crossed, to extrapolate other pixels in benchmark image The color-values of point, shorten whole correction time, improve correction efficiency.
Description of the drawings
It, below will be in embodiment or description of the prior art in order to illustrate more clearly of the technical solution of the embodiment of the present application Required attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some realities of the application Example is applied, it for those of ordinary skill in the art, without creative efforts, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 a are a kind of fault image schematic diagram one provided by the embodiments of the present application;
Fig. 1 b are a kind of fault image schematic diagram two provided by the embodiments of the present application;
Fig. 1 c are a kind of fault image schematic diagram three provided by the embodiments of the present application;
Fig. 2 is a kind of flow diagram of the distortion correction method of image provided by the embodiments of the present application;
Fig. 3 is a kind of subregion schematic diagram of benchmark image provided by the embodiments of the present application;
Fig. 4 a are a kind of pincushion distortion image schematic diagram provided by the embodiments of the present application;
Fig. 4 b are the corresponding benchmark image of pincushion distortion image one shown in Fig. 4 a;
Fig. 4 c are the corresponding benchmark image of pincushion distortion image two shown in Fig. 4 a;
Fig. 5 is the position view on four vertex of subregion where a kind of pixel S provided by the embodiments of the present application;
Fig. 6 is the position view on three vertex of subregion where a kind of pixel S provided by the embodiments of the present application;
Fig. 7 is the position view on two vertex of subregion where a kind of pixel S provided by the embodiments of the present application;
Fig. 8 is a kind of structural schematic diagram of the distortion correction device of image provided by the embodiments of the present application.
Specific implementation mode
Part term involved in the application is explained below, is understood with helping reader:
" pattern distortion ", the also referred to as geometric distortion of image refer to the several of generated image picture elements in image imaging process The deformations such as extruding, stretching, extension, offset and the distortion what position occurs relative to reference system (ground physical location or topographic map), make Geometric position, size, shape, the orientation etc. for obtaining image change.In this application, the distortion type of fault image include but It is not limited to:Barrel-type distortion (as shown in Figure 1a), pincushion distortion (as shown in Figure 1 b) and beard type distortion (as illustrated in figure 1 c).It answers It is noted that three kinds of above-mentioned distortion are only a kind of example, the fault image mentioned by the application is not limited to above-mentioned three kinds.
" benchmark image ", the benchmark image in the embodiment of the present invention is orthoscopic image, after which is distorted The image of formation is fault image.It should be noted that the color of all pixels point of benchmark image in the embodiment of the present invention Value is unknown, but amount of distortion of the vertex of each subregion in the benchmark image in fault image is known, i.e. benchmark Image is known with the distortion correction model of corresponding fault image.
" color-values of pixel ", in general, usually using the tone value (hue value) of color, intensity value (Reinheitszahl) The color-values of pixel are showed with brightness value.It can usually be indicated using three primary colors RGB, referred to as the rgb value of pixel, It can be referred to as the three primary colours color-values of pixel, the three primary colours of pixel include three kinds of red primary, green primary and blue primary, In, three kinds of primary colours are mutual indepedent, and any color cannot be generated by other two mixture of colours.
The terms "and/or", only a kind of incidence relation of description affiliated partner, indicates that there may be three kinds of passes System, for example, A and/or B, can indicate:Individualism A exists simultaneously A and B, these three situations of individualism B.In addition, herein Middle character "/", it is a kind of relationship of "or" to typically represent forward-backward correlation object.In the embodiment of the present application, unless otherwise indicated, The meaning of " plurality " is refer to two or more.
For the ease of clearly describing the technical solution of the embodiment of the present application, in embodiments herein, use " the One ", the printed words such as " second " distinguish function or the essentially identical identical entry of effect or similar item, and those skilled in the art can To understand that the printed words such as " first ", " second " are not defined quantity and execution order.
It should be noted that in the embodiment of the present application, " illustrative " or " such as " etc. words make example, example for indicating Card or explanation.Be described as in the embodiment of the present application " illustrative " or " such as " any embodiment or design scheme do not answer It is interpreted than other embodiments or design scheme more preferably or more advantage.Specifically, " illustrative " or " example are used Such as " word is intended to that related notion is presented in specific ways.
It should be noted that in the embodiment of the present application, unless otherwise indicated, the meaning of " plurality " is refer to two or two with On.
It should be noted that in the embodiment of the present application, " (English:Of) ", " corresponding (English:Corresponding, Relevant) " and " corresponding (English:Corresponding it) " can use with sometimes, it is noted that do not emphasizing it When difference, meaning to be expressed is consistent.
The executive agent of the distortion correction method of image provided by the embodiments of the present application can be the distortion correction of image Device, or the method for distortion correction for executing above-mentioned image display equipment.Wherein, the device of the distortion correction of image Can be the central processing unit (English in above-mentioned display equipment:Central Processing Unit, referred to as:It CPU) or can Think the control unit or function module in above-mentioned display equipment.Illustratively, above-mentioned display equipment can be comprising The display equipment of display screen, for example, computer, tablet computer, television set etc. have the product of display function.
Below in conjunction with the Figure of description of the embodiment of the present application, technical solution provided by the embodiments of the present application is said It is bright.Obviously, it is described be the application a part of the embodiment, instead of all the embodiments.It should be noted that hereafter institute Technical characteristic in the absence of conflict, can be used in combination, shape some or all of in any number of technical solutions provided The technical solution of Cheng Xin.
Based on the above, embodiments herein provides a kind of method of the distortion correction of image, as shown in Fig. 2, should Method specifically comprises the following steps:
S201, coordinate, target pixel points residing subregion in benchmark image according to target pixel points in benchmark image Vertex amount of distortion in fault image of coordinate and vertex, calculate mapping of the target pixel points in the fault image Coordinate.
Benchmark image can be divided into multiple subregions by the application before executing S201.Illustratively, which can be The region of conventional shape, for example, benchmark image is divided into mutually non-overlapping rectangular area or diamond-shaped area.
Illustratively, by benchmark image be divided into it is multiple be not overlapped each other, the M*N (transverse widths of width a height of (bw, bh) On the longitudinal directions subregion number * height on subregion number) a square region, wherein bw is that each subregion transverse width includes Pixel number, bh be each subregion longitudinally highly include pixel number.For example, as shown in Figure 3, it is assumed that benchmark image 21 are divided into 56 square partitions, and the subregion 22 in Fig. 3 is the subregion residing for target pixel points.
Amount of distortion of the vertex in fault image refers in the application, coordinate of the vertex in benchmark image and the vertex The shift differences between coordinate in fault image.Illustratively, above-mentioned amount of distortion includes horizontal distortion amount and vertical distortion Amount.
For example, by taking pincushion distortion image shown in Fig. 4 a as an example, Fig. 4 b are pincushion distortion image pair shown in Fig. 4 a A kind of benchmark image answered, by taking the vertex P ' (x2, y2) in Fig. 4 b as an example, the mapping points of vertex P ' in fig.4 are P, corresponding Mapping point be (x1, y1), corresponding horizontal distortion amount be (x2-x1), vertical amount of distortion be (y2-y1).
In embodiments of the present invention, during carrying out distortion correction to fault image, if it is desired to ensure benchmark image It is identical with the resolution ratio of fault image, it will usually display is amplified to benchmark image, but display is amplified to benchmark image Afterwards, the corresponding clarity of the image can reduce.
Example 1:By taking the pincushion distortion image in Fig. 1 b as an example, due to the pattern of pincushion distortion image can inwardly occur it is abnormal Become, it therefore,, can be to the pattern of the central area of image when carrying out distortion correction to pincushion distortion image as shown in Fig. 4 a, 4b Suitably amplified, the clarity so as to cause the pattern of the central area of the image reduces.
Example 2:By taking the barrel-type distortion image in Fig. 1 a as an example, due to the image of barrel-type distortion image can occur outward it is abnormal Become, therefore when carrying out distortion correction to barrel-type distortion image, the peripheral pattern of the image can suitably be amplified, to lead The clarity of the peripheral pattern of the image is caused to reduce.
For the above situation, the embodiment of the present invention appropriate can reduce abnormal when carrying out distortion correction to fault image The size for becoming image, to improve the clarity of benchmark image.
For example, by taking the pincushion distortion image in Fig. 4 a as an example, Fig. 4 c are another benchmark image of Fig. 4 a, wherein Benchmark image shown in Fig. 4 c includes two parts:A part (is such as schemed to carry out the image after distortion correction to pincushion distortion image B1 in 4c), the color-values of and peripheral frame (b2 in such as Fig. 4 c), the pixel in the frame can be set as predetermined threshold Value, for example, it can be set to being black or white.
Illustratively, terminal is before executing S201, and the embodiment of the invention also includes following step:
A1, the coordinate according to target pixel points in benchmark image find object pixel from the distortion scale to prestore The point amount of distortion of the coordinate on the vertex of residing subregion and the vertex in fault image in benchmark image.
Wherein, above-mentioned distortion scale includes:The coordinate on the vertex of each subregion and the vertex exist in benchmark image Amount of distortion in fault image.
Illustratively, above-mentioned amount of distortion includes:Horizontal distortion amount and vertical amount of distortion, therefore, the application can be directed to A distortion scale is respectively set in horizontal distortion amount and vertical amount of distortion.
In embodiments of the present invention, the acquisition process of scale of distorting specifically comprises the following steps:
Step 1:Estimate distortion model.
Illustratively, estimate that the process of distortion model specifically comprises the following steps:
B1, test image is shown in device screen.
Wherein, above-mentioned test image is the normal picture not being distorted.
In embodiments of the present invention, in order to improve the follow-up determination efficiency for determining distortion model, test image here can To select the image of the regular geometric line graph with specific content, for example, the image of chessboard grid pattern.
B2, the test image shown in device screen is shot using specific camera head, obtains the test image Fault image.
Wherein, the image that above-mentioned specific camera head is shot can be distorted, for example, wide-angle camera collects image Barrel-type distortion can occur.
B3, fault image and test image that shooting obtains are subjected to feature extraction respectively.
B4, characteristic matching is carried out to the characteristics of image of fault image and the characteristics of image of test image, calculates matching characteristic Corresponding amount of distortion.
B5, according to the corresponding distortion duration set of calculated matching characteristic, estimate the distortion model of the fault image.
It should be noted that fault image in the application distortion type and image parameter (for example, resolution ratio) with The distortion type and image parameter of fault image in the application are identical.In other words, the fault image in the application is abnormal Varying model is identical as the distortion model of the fault image of above-mentioned test image.
Illustratively, the corresponding amount of distortion of matching characteristic includes:Horizontal distortion amount Dx (x, y) and vertical amount of distortion Dy (x, y).When executing step B5, N solution multinomials may be used to simulate the distortion of camera, estimate distortion model.
In a kind of example, 5 solution multinomials may be used to estimate distortion model in the application, in general, 5 solution multinomials are abnormal Varying model needs to estimate 42 distortion factors.
Wherein, the following formula of horizontal distortion model 1:
Assuming that the N=p+q=5 in above-mentioned formula 1, can be obtained following formula 2 after above-mentioned formula 1 is unfolded:
The following formula of vertical distortion model 3:
Assuming that the N=p+q=5 in above-mentioned formula 1, can be obtained following formula 4 after above-mentioned formula 3 is unfolded:
Step 2:The coordinate on the vertex of each subregion in the test image shown in device screen is substituted into distortion model In, calculate the amount of distortion of the coordinate.
If there are pixels for S202a, mapping point, using the color-values of pixel as the color-values of target pixel points.
If pixel is not present in S202b, mapping point, the pixel near mapping point is chosen as the first pixel Point, and according to the coordinate of the first pixel and color-values and mapping point, calculate the color-values of target pixel points.
Optionally, in embodiments of the present invention, if mapping point is in the company of two pixel of arbitrary neighborhood in fault image On line, then the first pixel includes two pixels nearest with mapping point distance on the line.
Optionally, in embodiments of the present invention, if mapping point is not at two pixel of arbitrary neighborhood in fault image On line, then the first pixel includes four pixels nearest with mapping point distance in the fault image.
Optionally, if vertex is four vertex of the target pixel points residing subregion in benchmark image, S201 is being executed When, it can be realized by following process:
S201a1, it is punished in benchmark image according to coordinate of the target pixel points in benchmark image, target pixel points The amount of distortion of the coordinate on the vertex in area and vertex in fault image determines to include target pixel points institute in benchmark image The 4th straight line and the 5th straight line comprising target pixel points on any two vertex intersect vertically the intersection point to be formed in punishment area Amount of distortion and the 5th straight line with comprising the target pixel points in benchmark image in residing subregion any two vertex the 6th Amount of distortion of the intersection point that straight line intersection is formed in fault image.
S201a2, the coordinate according to the amount of distortion and coordinate and target pixel points of two intersection points, determine target pixel points Amount of distortion in fault image.
S201a3, according to the amount of distortion of target pixel points and the coordinate of target pixel points, calculate target pixel points abnormal Become the mapping point in image.
In embodiments of the present invention, the relationship of the 4th above-mentioned straight line and the 6th straight line has following two situations:
The first situation:4th straight line and the 6th straight line are the target pixel points two articles of residing subregion in benchmark image Parallel edges.
The second situation:6th straight line is the diagonal straight line of the target pixel points residing subregion in benchmark image, and mesh Pixel is in the 4th straight line to mark, the 6th straight line and the target pixel points boundary of residing subregion in benchmark image are surrounded Region in.
It is further alternative, it is determined in S201a1 comprising the target pixel points in benchmark image arbitrary two in residing subregion 4th straight line on a vertex and the 5th straight line comprising target pixel points intersect vertically the amount of distortion of the intersection point to be formed, specifically include Following steps:
S1, the coordinate according to two vertex of the coordinates and the 4th straight line of target pixel points, calculate comprising the target 4th straight line Yu the 5th straight line comprising target pixel points on pixel any two vertex in residing subregion in benchmark image Intersect vertically the coordinate of the intersection point to be formed.
S2, coordinate and amount of distortion according to two vertex of the coordinate of intersection point, the 4th straight line, determine intersection point in fault image In amount of distortion.
Optionally, determine that the 5th straight line is appointed in benchmark image in residing subregion with comprising the target pixel points in S201a1 Amount of distortion of the intersection point that 6th straight line intersection on two vertex of meaning is formed in fault image specifically includes following content:
S3, according to the coordinate of target pixel points and two apex coordinates of the 6th straight line, calculate comprising the target picture The seat for the intersection point that 6th straight line and the 5th straight line intersection on vegetarian refreshments any two vertex in residing subregion in benchmark image are formed Mark.
S4, according to the coordinate of intersection point, two apex coordinates of the 6th straight line and amount of distortion, determine intersection point in fault image In amount of distortion.
Illustratively, by taking subregion shown in Fig. 3 as an example, as shown in figure 5, the 4th above-mentioned straight line and the 6th straight line are the mesh Two parallel edges of pixel residing subregion in benchmark image are marked, P0, P1, P2, P3 are the target pixel points in benchmark image In residing subregion four vertex.
First, the 4th straight line of the target pixel points residing subregion in benchmark image can be determined according to P0, P1, passed through The coordinate S (i, j) of target pixel points make one article with the target pixel points of P0, P1 determination in benchmark image residing subregion the The intersection point of the 5th vertical straight line of four straight lines, the 5th straight line and the 4th straight line is intersection point A, then according to the seat of target pixel points Mark S (i, j), P0 (i0,j0)、P1(i0,j1), it may be determined that the coordinate of A points is (i0,j).According to the seat of the intersection point A in step A1 Mark A (i0, j), on the 4th straight line two vertex coordinate P0 (i0,j0)、P1(i0,j1) and horizontal distortion in fault image X (P0), X (P1) and vertical amount of distortion Y (P0), Y (P1) are measured according to bilinear interpolation method, it may be determined that intersection point A is in distortion figure Horizontal distortion amount as in is X (A) and vertical amount of distortion Y (A).Specific formula for calculation is as follows:
Secondly, the 6th straight line of the target pixel points residing subregion in benchmark image can be determined according to P2, P3, and the The intersection points B of five straight lines and the 6th straight line, then coordinate S (i, j), P2 (i that can be according to target pixel points1,j0)、P3(i1,j1), It can determine that the coordinate of B points is (i1,j).According to the coordinate B (i of intersection points B1, j), on the 6th straight line two vertex coordinate P2 (i1,j0)、P3(i1,j1) and horizontal distortion amount X (P2), X (P3) and vertical amount of distortion of the target pixel points in fault image Y (P2), Y (P3) are according to bilinear interpolation method, it may be determined that horizontal distortion amount of the intersection points B in fault image is X (B) and hangs down Straight amount of distortion Y (B).Specific formula for calculation is as follows:
Finally, according to X (A), Y (A), X (B), Y (B), calculate mapping point of the target pixel points in fault image (x ', y ').
Certainly, when the diagonal straight line that the 4th straight line is the target pixel points residing subregion in benchmark image, and target picture Vegetarian refreshments is in the 4th straight line, the 6th straight line and the target pixel points area that the boundary of residing subregion is surrounded in benchmark image In domain.Three vertex that then can be by the target pixel points in benchmark image in residing subregion, determine that target pixel points exist Amount of distortion in fault image.
Illustratively, by taking subregion shown in Fig. 3 as an example, as shown in fig. 6, the 6th straight line be the target pixel points in reference map The diagonal straight line of residing subregion as in, and target pixel points are in the 4th straight line, the 6th straight line and the target pixel points in base In quasi- image in the boundary area defined of residing subregion, P1, P2, P3 are punished by the target pixel points in benchmark image Three vertex in area.
P1, P2, P3 in Fig. 6 include the line the (the i.e. the 4th of straight line (i.e. the 5th straight line) and P2P3 of target pixel points S Straight line) B points are vertically intersected on, include the line (i.e. the 6th straight line) of the straight line (i.e. the 5th straight line) and P1P2 of target pixel points S A points are intersected at, then can determine the coordinate of A points and B points by similar triangles;Further according to the method for bilinear interpolation, pass through The coordinate of the coordinate of P1, P2, the amount of distortion in fault image and A points determines amount of distortion of the A points in fault image, passes through The coordinate of the coordinate of P2, P3, the amount of distortion in fault image and B points determines amount of distortion of the B points in fault image;Last root Determine that target pixel points are distorting according to the coordinate of the coordinate of A points and B points, the amount of distortion in fault image and target pixel points S Amount of distortion in image.The detailed process of the realization is repeated no more herein.
Optionally, when target pixel points are in any two vertex of the target pixel points residing subregion in benchmark image Line on, when executing S201, can be realized by following process:
S201b1, according to coordinate of the target pixel points in benchmark image, the coordinate on two vertex on line and top Amount of distortion of the point in fault image, determines amount of distortion of the target pixel points in fault image.
S201b2, according to the amount of distortion of target pixel points and the coordinate of target pixel points, calculate target pixel points abnormal Become the mapping point in image.
Illustratively, the position view on two vertex of subregion where target pixel points S as shown in Figure 7, if target Pixel S is in the target pixel points in benchmark image on the line of the corresponding pixel of vertex P0 and P2 of residing subregion, The then amount of distortion according to the coordinate of target pixel points, the coordinate of P0, P2 and P0, P2 in fault image is inserted in conjunction with linear Value method, it may be determined that amount of distortion of the target pixel points in fault image.
It should be noted that when abscissa and target pixel points of target pixel points are in benchmark image in residing subregion Any two vertex abscissa or ordinate all same, i.e. the target pixel points are in benchmark image in residing subregion The line on any two vertex is parallel to any reference axis, or, when the target pixel points are in benchmark image in residing subregion Times of the slope of the line on any two vertex with target pixel points with the target pixel points in benchmark image in residing subregion It, then can be according to the object pixel of this residing for target pixel points when the slope of the line on any vertex in two vertex of meaning is identical The amount of distortion and coordinate on two vertex of the point in benchmark image in residing subregion, determine target pixel points in fault image Mapping point.
Optionally, if mapping point is not in fault image on the line of two pixel of arbitrary neighborhood, the first pixel Point includes four pixels with mapping point distance recently in fault image.It is corresponding, according to the first pixel in S202b Coordinate and color-values and mapping point, the process for calculating the color-values of target pixel points specifically comprise the following steps:
S202b1, coordinate and color-values and mapping point according to the first pixel determine to include first pixel In the first straight line of any two pixel and the second straight line of containment mapping coordinate intersect vertically the color of the intersection point to be formed It is worth, and the intersection point that the third straight line comprising the first pixel of any two in the first pixel is crossed to form with second straight line Color-values.
S202b2, color-values and coordinate and mapping point according to two intersection points, calculate the color of target pixel points Value.
In embodiments of the present invention, above-mentioned first straight line and the relationship of third straight line have following two situations:
The first situation:First straight line and third straight line are two parallel lines being mutually parallel.
The second situation:Third straight line is the diagonal straight line of the first pixel area defined, and at mapping point In in the boundary area defined of first straight line, third straight line and the first pixel area defined.
Illustratively, include that four pixels nearest with mapping point distance in fault image are with the first pixel Example, the specific implementation process of S202b include the following steps:
Step 1:Obtain the coordinate of target pixel points N corresponding 4 target pixel points K0, K1, K2, K3, K0 (i0,j0), K1(i0,j1), K2 (i1,j0), K3 (i1,j1), (i0<i1,j0<j1)。
Step 2:According to this four point coordinates values, corresponding color-values, G (P0), G (P1), G are obtained in fault image (P2) and G (P3).
Step 3:The color-values at target pixel points N (x', y') are calculated using bilinear interpolation method.
Calculate the color-values of the intersection point A of K0 and K1 points:
G (A)=(x'-j0)·G(K0)+(j1- x') G (K1) (formula 11)
Calculate the color-values of the intersection points B point of K2 and K3 points:
G (B)=(x'-j0)·G(K2)+(j1- x') G (K3) (formula 12)
The color-values of corresponding pixel are at target pixel points N:
G (N)=(y'-i0)·G(A)+(i1- y') G (B) (formula 13)
It should be noted that used bilinearity differential technique during the color-values of above-mentioned calculating A points, B points and N points Occupation mode, can refer to the process of the amount of distortion of above-mentioned calculating target pixel points, which is not described herein again.
The distortion correction method of image provided by the present application, by advance to the vertex of each subregion in benchmark image at this The coordinate of amount of distortion and the vertex in benchmark image in the fault image that benchmark image is formed after being distorted is deposited Storage, so as to it needs to be determined that a certain target pixel points in the benchmark image color-values when, can be according to the target picture Coordinate of the vegetarian refreshments in benchmark image, the target pixel points coordinate on the vertex of residing subregion and the vertex in benchmark image Amount of distortion in fault image calculates mapping point of the target pixel points in the fault image, and then, then determining should It whether there is pixel at mapping point in fault image, if there are pixel, directly make the color-values of the pixel For the color-values of the target pixel points, if pixel is not present, from the pixel chosen in fault image near the mapping point Point is used as the first pixel, and according to the coordinate of first pixel and color-values and the mapping point, indirectly estimates The color-values of the target pixel points.Need compared with the prior art the mapping point of all pixels point in calculating benchmark image with And color-values, the application is by amount of distortion of the partial pixel point in fault image in the benchmark image that prestores, to extrapolate base The color-values of other pixels in quasi- image shorten whole correction time, improve correction efficiency.
Fig. 8 shows a kind of possible structural schematic diagram of distortion correction device of image involved in above-described embodiment. The device includes:Processor 31, memory 32, system bus 33 and communication interface 34.Memory 31 is held for storing computer Line code, processor 31 are connect with memory 32 by system bus 33, and when device is run, processor 31 is for executing storage The computer executable code that device 32 stores, to execute the distortion correction method of any one image provided in an embodiment of the present invention, Such as, processor 31 is used to support the distortion correction device of image to execute the Overall Steps in Fig. 2, and/or for described herein Technology other processes, the distortion correction method of specific image can refer to above and the associated description in attached drawing, herein not It repeats again.
The embodiment of the present invention also provides a kind of storage medium, which may include memory 32.
The embodiment of the present invention also provides a kind of television set, which includes the distortion correction device of image shown in Fig. 8.
Processor 31 can be a processor, can also be the general designation of multiple processing elements.For example, processor 31 can be with For CPU.Processor 31 or other general processors, digital signal processor (digital signal Processing, DSP), it is application-specific integrated circuit (application specific integrated circuit, ASIC), existing It is field programmable gate array (field-programmable gate array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components etc. be may be implemented or executed in conjunction with described by the disclosure of invention Various illustrative logic blocks, module and circuit.General processor can be that microprocessor or the processor can also It is any conventional processor etc..Processor 31 can also be application specific processor, which may include Base-Band Processing At least one of chip, radio frequency processing chip etc..The processor can also be the combination of realization computing function, such as comprising One or more microprocessors combine, the combination etc. of DSP and microprocessor.Further, which can also wrap Include the chip with other dedicated processes functions of the device.
Can be realized in a manner of hardware the step of method in conjunction with described in the disclosure of invention, can also be by Reason device executes the mode of software instruction to realize.Software instruction can be made of corresponding software module, and software module can be by Deposit in random access memory (random access memory, RAM), flash memory, read-only memory (read only Memory, ROM), Erasable Programmable Read Only Memory EPROM (erasable programmable ROM, EPROM), electrically erasable can Program read-only memory (electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM (CD- ROM) or in the storage medium of any other form well known in the art.A kind of illustrative storage medium is coupled to processing To enable a processor to from the read information, and information can be written to the storage medium in device.Certainly, storage is situated between Matter can also be the component part of processor.Pocessor and storage media can be located in ASIC.In addition, the ASIC can be located at In terminal device.Certainly, pocessor and storage media can also be used as discrete assembly and be present in terminal device.
System bus 33 may include data/address bus, power bus, controlling bus and signal condition bus etc..The present embodiment In for clear explanation, various buses are all illustrated as system bus 33 in fig. 8.
Communication interface 34 can be specifically the transceiver on the device.The transceiver can be wireless transceiver.For example, nothing Line transceiver can be the antenna etc. of the device.Processor 31 is by communication interface 33 and other equipment, if for example, the device is When a module or component in the display equipment, the device between other modules in the display equipment for carrying out data Interaction, e.g., the device and the display module of the display equipment carry out data interaction, control the display module and show through gamut compression Front and back image.
Those skilled in the art are it will be appreciated that in said one or multiple examples, work(described in the invention It can be realized with hardware, software, firmware or their arbitrary combination.It when implemented in software, can be by these functions Storage in computer-readable medium or as on computer-readable medium one or more instructions or code be transmitted. Computer-readable medium includes computer storage media and communication media, and wherein communication media includes convenient for from a place to another Any medium of one place transmission computer program.It is any that storage medium can be that general or specialized computer can access Usable medium.
Finally it should be noted that:Above-described specific implementation mode, to the purpose of the present invention, technical solution and beneficial to effect Fruit has been further described, it should be understood that the foregoing is merely the specific implementation modes of the present invention, not For limiting protection scope of the present invention, all any modifications on the basis of technical scheme of the present invention, made equally are replaced It changes, improve, should all include within protection scope of the present invention.

Claims (8)

1. a kind of distortion correction method of image, which is characterized in that including:
According to the vertex of coordinate of the target pixel points in benchmark image, the target pixel points residing subregion in benchmark image Amount of distortion in fault image of coordinate and the vertex, calculate the target pixel points reflecting in the fault image Penetrate coordinate;Wherein, the fault image is the image formed after the benchmark image is distorted;
If pixel is not present in the mapping point, pixel near the mapping point is chosen as the first pixel, And according to the coordinate of first pixel and color-values and the mapping point, calculate the color of the target pixel points Value;
If there are pixels for the mapping point, using the color-values of the pixel as the color of the target pixel points Value.
2. if according to the method described in claim 1, it is characterized in that, the mapping point is in the fault image arbitrary On the line of adjacent two pixel, then first pixel includes with the mapping point on the line apart from nearest two Pixel.
If 3. according to the method described in claim 1, it is characterized in that, the mapping point be not in the fault image appoint It anticipates on the line of adjacent two pixel, then first pixel includes with the mapping point in the fault image apart from most Four close pixels.
4. according to the method described in claim 3, it is characterized in that, calculate the color-values of the target pixel points, including:
According to the coordinate of first pixel and color-values and the mapping point, determine to include first pixel In first straight line and the second straight line comprising the mapping point of any two pixel intersect vertically the intersection point to be formed Color-values and the second straight line and the third straight line intersection shape comprising any two pixel in first pixel At intersection point color-values;
According to the color-values of two intersection points and coordinate and the mapping point, the color-values of the target pixel points are calculated;
Wherein, the first straight line and the third straight line are two parallel lines being mutually parallel;Or,
The third straight line is the diagonal straight line of the first pixel area defined, and the mapping point is in described In the boundary area defined of first straight line, the third straight line and the region.
5. according to the method described in claim 1, it is characterized in that, calculating the target pixel points in the fault image Mapping point, including:
According to the vertex of coordinate of the target pixel points in benchmark image, the target pixel points residing subregion in benchmark image Amount of distortion in fault image of coordinate and the vertex, determine that the 4th comprising any two vertex in the subregion is straight Line and the 5th straight line comprising the target pixel points intersect vertically the intersection point to be formed amount of distortion and the 5th straight line with Include amount of distortion of the intersection point that the 6th straight line intersection on any two vertex is formed in the subregion in fault image;
According to the coordinate of the amount of distortion and coordinate and the target pixel points of two intersection points, determine that the target pixel points exist Amount of distortion in fault image;
According to the amount of distortion of the target pixel points and the coordinate of the target pixel points, the target pixel points are calculated abnormal Become the mapping point in image;
Wherein, the 4th straight line and two articles of parallel edges that the 6th straight line is the subregion;Or,
6th straight line is the diagonal straight line of the subregion, and the target pixel points are in the 4th straight line, described the In the boundary area defined of six straight lines and the subregion.
6. according to the method described in claim 1, it is characterized in that, when the target pixel points are in arbitrary the two of the subregion On the line on a vertex, mapping point of the target pixel points in fault image is calculated, including:
According to coordinate of the target pixel points in benchmark image, the coordinate on two vertex on the line and the top Amount of distortion of the point in fault image, determines amount of distortion of the target pixel points in fault image;
According to the amount of distortion of the target pixel points and the coordinate of the target pixel points, the target pixel points are calculated abnormal Become the mapping point in image.
7. a kind of distortion correction device of image, which is characterized in that including:Processor and memory;Wherein, the memory is used In storage computer executable code, the computer executable code is any for controlling the processor perform claim requirement 1 to 6 Method described in.
8. a kind of television set, which is characterized in that including:The distortion correction device of image described in claim 7.
CN201810036866.6A 2018-01-15 2018-01-15 A kind of distortion correction method of image, device and television set Pending CN108305224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810036866.6A CN108305224A (en) 2018-01-15 2018-01-15 A kind of distortion correction method of image, device and television set

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810036866.6A CN108305224A (en) 2018-01-15 2018-01-15 A kind of distortion correction method of image, device and television set

Publications (1)

Publication Number Publication Date
CN108305224A true CN108305224A (en) 2018-07-20

Family

ID=62869058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810036866.6A Pending CN108305224A (en) 2018-01-15 2018-01-15 A kind of distortion correction method of image, device and television set

Country Status (1)

Country Link
CN (1) CN108305224A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109255760A (en) * 2018-08-13 2019-01-22 青岛海信医疗设备股份有限公司 Distorted image correction method and device
CN109602373A (en) * 2018-12-06 2019-04-12 余姚市盈宝电器有限公司 Foam detects alarm mechanism
CN109871841A (en) * 2019-02-14 2019-06-11 腾讯科技(深圳)有限公司 Image processing method, device, terminal and storage medium
CN111915537A (en) * 2020-08-13 2020-11-10 歌尔光学科技有限公司 Image processing method and device, image acquisition device and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1598778B1 (en) * 2004-05-18 2008-08-13 Agfa HealthCare NV Method for automatically mapping of geometric objects in digital medical images
KR20090021627A (en) * 2007-08-27 2009-03-04 주식회사 코아로직 Method of correcting image distortion and image processing device of adapting the same method
CN104537616A (en) * 2014-12-20 2015-04-22 中国科学院西安光学精密机械研究所 Correction method for fisheye image distortion
CN107221306A (en) * 2017-06-29 2017-09-29 上海顺久电子科技有限公司 Method, device and the display device of brightness of image in correction splicing device screen

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1598778B1 (en) * 2004-05-18 2008-08-13 Agfa HealthCare NV Method for automatically mapping of geometric objects in digital medical images
KR20090021627A (en) * 2007-08-27 2009-03-04 주식회사 코아로직 Method of correcting image distortion and image processing device of adapting the same method
CN104537616A (en) * 2014-12-20 2015-04-22 中国科学院西安光学精密机械研究所 Correction method for fisheye image distortion
CN107221306A (en) * 2017-06-29 2017-09-29 上海顺久电子科技有限公司 Method, device and the display device of brightness of image in correction splicing device screen

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王健 等: "投影图像畸变的一种校正方法", 《西安邮电学院学报》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109255760A (en) * 2018-08-13 2019-01-22 青岛海信医疗设备股份有限公司 Distorted image correction method and device
CN109602373A (en) * 2018-12-06 2019-04-12 余姚市盈宝电器有限公司 Foam detects alarm mechanism
CN109871841A (en) * 2019-02-14 2019-06-11 腾讯科技(深圳)有限公司 Image processing method, device, terminal and storage medium
CN109871841B (en) * 2019-02-14 2023-04-21 腾讯科技(深圳)有限公司 Image processing method, device, terminal and storage medium
CN111915537A (en) * 2020-08-13 2020-11-10 歌尔光学科技有限公司 Image processing method and device, image acquisition device and readable storage medium

Similar Documents

Publication Publication Date Title
CN108305224A (en) A kind of distortion correction method of image, device and television set
CN107221306B (en) The method, apparatus and display equipment of brightness of image in correction splicing device screen
CN109345454B (en) Bitmap image vectorization method, storage medium and system
CN106204441B (en) Image local amplification method and device
CN108074220A (en) A kind of processing method of image, device and television set
CN108281090B (en) Display substrate, display screen and electronic equipment
CN113238829A (en) Background color generation method and device, electronic equipment and storage medium
CN111163301B (en) Color adjustment method, device and computer readable storage medium
CN111063292A (en) Color gamut mapping method, color gamut mapping component, display device and storage medium
US20210012459A1 (en) Image processing method and apparatus
CN109389150A (en) Image consistency comparison method, device, storage medium and electronic equipment
CN116168091A (en) Image processing method, apparatus, computer device and computer program product
CN108574835B (en) Method and device for correcting image colors in equipment screen
US20160314615A1 (en) Graphic processing device and method for processing graphic images
CN110427944A (en) Acquisition methods, device, equipment and the storage medium of car plate detection data
CN116978308A (en) Display correction method and device and electronic equipment
CN104008523A (en) Graphic processing method
CN107257454B (en) A kind of method, apparatus and display equipment of image color offset
US8577162B2 (en) Output apparatus and output method
CN111870950B (en) Game control display control method and device and electronic equipment
JP4765667B2 (en) Image processing program and image processing apparatus
JP5828052B1 (en) Image compression apparatus, image compression method, and image compression program
CN113139921A (en) Image processing method, display device, electronic apparatus, and storage medium
CN114792283A (en) Image processing method, device and equipment and computer readable storage medium
CN116225972B (en) Picture difference comparison method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180720