CN113313724A - Line detection processing method for resisting resampling of mobile phone camera - Google Patents

Line detection processing method for resisting resampling of mobile phone camera Download PDF

Info

Publication number
CN113313724A
CN113313724A CN202110586918.9A CN202110586918A CN113313724A CN 113313724 A CN113313724 A CN 113313724A CN 202110586918 A CN202110586918 A CN 202110586918A CN 113313724 A CN113313724 A CN 113313724A
Authority
CN
China
Prior art keywords
coordinates
pixel
image
pixel density
integral
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.)
Granted
Application number
CN202110586918.9A
Other languages
Chinese (zh)
Other versions
CN113313724B (en
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.)
Shenzhen Qycloud Technology Co ltd
Original Assignee
Shenzhen Qycloud Technology Co ltd
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 Shenzhen Qycloud Technology Co ltd filed Critical Shenzhen Qycloud Technology Co ltd
Priority to CN202110586918.9A priority Critical patent/CN113313724B/en
Publication of CN113313724A publication Critical patent/CN113313724A/en
Application granted granted Critical
Publication of CN113313724B publication Critical patent/CN113313724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The invention discloses a line detection processing method for resisting resampling of a mobile phone camera, which comprises the following steps: step S1, acquiring an image to be detected; step S2, preprocessing an image to be detected, converting the image to be detected into a binary edge image to display the characteristic texture of the image to be detected; step S3, optimizing the parameter traversal range; step S4, traversing the known coordinates of a plurality of control points by using a corresponding Bezier curve formula to obtain integral pixel density values of a plurality of lines; step S5, performing differential operation on the integral pixel density values of the lines by using a preset pixel calculus operator, and then finding out the maximum integral pixel density value; in step S6, pixel coordinates of one or more lines are obtained. The invention is based on the pixel integration and pixel differentiation operation processing means, and has the capability of resisting the resampling of the mobile phone camera.

Description

Line detection processing method for resisting resampling of mobile phone camera
Technical Field
The invention relates to a visual information detection processing method, in particular to a line detection processing method for resisting resampling of a mobile phone camera.
Background
In recent years, as an important branch of artificial intelligence technology, computer vision technology is increasingly widely applied in people's work and life, such as face unlocking of mobile phones, mobile payment, automatic driving, commodity search, and the like. Currently, the research focus of computer vision technology is mainly focused on the macro detection of the rough outline, shape and form of the object exterior, but the development of image micro detection is relatively unable to keep pace with the times. Some basic applications of computer vision have scenes of microscopic detection, for example, lines and curves in an image are accurately detected at a pixel level, which is a typical microscopic detection.
However, most of the current macro detection algorithms do not have the precision required by micro detection, and the biggest reason for the problem is resampling of images by a mobile phone camera.
The application of computer vision technology to mobile phones is a great trend, but the simple operation of taking pictures by using mobile phones is actually equal to the process of resampling images by using mobile phone cameras. For example, a picture is taken on a printed engineering drawing, and all pixel values in a mobile phone picture are irregularly changed by comparing the original drawing according to the difference of illumination, angle, distance, camera hardware, a later imaging algorithm and the like during the picture taking. This will seriously affect the setting of the threshold by the conventional detection algorithm, and further cause great loss to the detection accuracy.
Currently, the conventional linear and curvilinear detection algorithm generally comprises the following steps: firstly, exposing texture edges in an image by using an edge detection algorithm such as Canny; then, a Hough Transform algorithm is applied to count peak values under polar coordinates; and finally, calculating whether a pixel is located on a straight line or a curve through a voting mechanism. In the currently mainstream open source image processing framework OpenCV, both Canny and Hough Transform algorithms need to be manually set with a threshold. This means that ideally, each picture needs to be manually set to a different threshold to achieve optimal detection accuracy. For this reason, the conventional detection algorithm falls into a contradiction: if the threshold value is set independently for each mobile phone photo, the algorithm is not universal; however, if a general threshold value is set for each photo by experience, the detection accuracy will be affected.
Therefore, there is a need in the art for an innovative microscopic detection algorithm to get rid of the threshold bottleneck of the conventional algorithm.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a line detection processing method with capability of resisting resampling of a mobile phone camera based on a pixel integration and pixel differentiation operation processing means, aiming at the defects of the prior art.
In order to solve the technical problems, the invention adopts the following technical scheme.
A line detection processing method for resisting resampling of a mobile phone camera comprises the following steps: step S1, acquiring an image to be detected; step S2, preprocessing an image to be detected, converting the image to be detected into a binary edge image to display the characteristic texture of the image to be detected; step S3, optimizing the parameter traversal range; step S4, traversing the known coordinates of a plurality of control points by using a corresponding Bezier curve formula to obtain integral pixel density values of a plurality of lines; step S5, performing differential operation on the integral pixel density values of the lines by using a preset pixel calculus operator, and then finding out the maximum integral pixel density value; in step S6, pixel coordinates of one or more lines are obtained.
Preferably, in step S3, the process of optimizing the traversal range of the parameter includes: firstly, carrying out fuzzy positioning on an image to be detected, positioning a fuzzy P point, and then making a reasonable assumption: the real point P of the straight line or the curve is positioned in a certain range around the fuzzy point P; therefore, optimization of algorithm traversal parameters is realized.
According to the line detection processing method for resisting resampling of the mobile phone camera, accurate detection of straight lines and curves can be achieved on the premise of no threshold value by performing calculus on pixel values. Two core steps are involved, namely: pixel integration and pixel differentiation. Before pixel integration is carried out, firstly, preprocessing is carried out on an image, and the image is converted into a binary edge image so as to clearly expose the characteristic texture of the image to be detected. In essence, the operation process of pixel integration is to calculate corresponding coordinates in an image according to the equation listed in the invention, integrate the corresponding pixel values to obtain integrated pixel density values, and then substitute different parameters into the equation to calculate multiple integrated pixel density values in a traversal mode. And secondly, pixel differentiation is carried out, the difference between the density values of every two adjacent integral pixels needs to be calculated respectively, and one or more groups of coordinate parameters with the maximum pixel density difference are the maximum integral pixel density difference. The straight line or the curve can be accurately detected through the maximum integral pixel density difference. From the engineering implementation point of view, in the binary edge image, the pixel value of the straight line or the curve can be set as 0, and the background can be set as 255, so that the pixel where the straight line or the curve is located and the background pixel have a strong change from 0 to 255, thereby obtaining the required maximum integrated pixel density difference. In practical application, after resampling by the mobile phone camera, the pixel values of straight lines and curves in a picture are not 0 any more, the pixel value of a background is not 255 any more, but the maximum integral pixel density difference is a relative pixel relation which can change along with the change of the whole pixel, so that the invention has the capability of resisting the resampling of the mobile phone camera, and further meets the application requirements.
Drawings
FIG. 1 is a schematic diagram of a pixel line based on a first order Bezier curve equation in a first embodiment of the present invention;
FIG. 2 is a flow chart of a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a parabola derived based on a second order Bezier curve equation in a second embodiment of the present invention;
FIG. 4 is a flow chart of a second embodiment of the present invention;
FIG. 5 is a third order Bezier curve diagram according to a third embodiment of the present invention;
fig. 6 is a flowchart of a third embodiment of the present invention.
Detailed Description
The invention is described in more detail below with reference to the figures and examples.
The invention discloses a line detection processing method for resisting resampling of a mobile phone camera, which comprises the following steps:
step S1, acquiring an image to be detected;
step S2, preprocessing an image to be detected, converting the image to be detected into a binary edge image to display the characteristic texture of the image to be detected;
step S3, optimizing the parameter traversal range;
step S4, traversing the known coordinates of a plurality of control points by using a corresponding Bezier curve formula to obtain integral pixel density values of a plurality of lines;
step S5, performing differential operation on the integral pixel density values of the lines by using a preset pixel calculus operator, and then finding out the maximum integral pixel density value;
in step S6, pixel coordinates of one or more lines are obtained.
In the method, the accurate detection of the straight line and the curve on the premise of no threshold value can be realized by performing calculus on the pixel value. Two core steps are involved, namely: pixel integration and pixel differentiation. Before pixel integration is carried out, firstly, preprocessing is carried out on an image, and the image is converted into a binary edge image so as to clearly expose the characteristic texture of the image to be detected. In essence, the operation process of pixel integration is to calculate corresponding coordinates in an image according to the equation listed in the invention, integrate the corresponding pixel values to obtain integrated pixel density values, and then substitute different parameters into the equation to calculate multiple integrated pixel density values in a traversal mode. And secondly, pixel differentiation is carried out, the difference between the density values of every two adjacent integral pixels needs to be calculated respectively, and one or more groups of coordinate parameters with the maximum pixel density difference are the maximum integral pixel density difference. The straight line or the curve can be accurately detected through the maximum integral pixel density difference. From the engineering implementation point of view, in the binary edge image, the pixel value of the straight line or the curve can be set as 0, and the background can be set as 255, so that the pixel where the straight line or the curve is located and the background pixel have a strong change from 0 to 255, thereby obtaining the required maximum integrated pixel density difference. In practical application, after resampling by the mobile phone camera, the pixel values of straight lines and curves in a picture are not 0 any more, the pixel value of a background is not 255 any more, but the maximum integral pixel density difference is a relative pixel relation which can change along with the change of the whole pixel, so that the invention has the capability of resisting the resampling of the mobile phone camera, and further meets the application requirements.
The invention provides the following embodiments respectively aiming at the detection processing processes of straight lines, parabolas, third-order Bessel curves and complex curves:
example one
In this embodiment, referring to fig. 1 and 2, the line is a straight line, and in step S4, the straight line B is expressed by using a first-order bezier curve equation1
B1(t)=(1-t)P0+tP1,t∈[0,1];
Wherein, P0And P1For the known 2 control points, t is in the range 0,1]By the parameter P0、P1T, deriving a pixel line based on the first order bezier curve equation (which can be understood as "drawing" the pixel line based on the first order bezier curve equation), and referring to fig. 1, setting P0Has the coordinates of (x)0,y0),P1Has the coordinates of (x)1,y1),PtHas the coordinates of (x)t,yt),PtThe coordinate equation of (a) is as follows:
xt=(1-t)x0+tx1
yt=(1-t)y0+ty1
parameterizing t of the equation to obtain:
Figure BDA0003087943560000061
Figure BDA0003087943560000062
and substituting the equations into each other to obtain a linear two-point equation:
Figure BDA0003087943560000063
in the operation process of the linear pixel calculus, P is continuously traversed in the image0And P1And (4) performing pixel integration on the obtained straight line by coordinates, and calculating to obtain an integral pixel density value of the straight line. And then differentiating all the integrated pixel density values to find one or more maximum integrated pixel density differences.
Further, in step S5, the linear pixel calculus operator is defined as:
Figure BDA0003087943560000064
e (x, y) is a binary edge image generated after preprocessing an image to be detected; s is a straight line P0P1The pixel length of (d);
Figure BDA0003087943560000065
is to traverse different P around a straight line length s in an edge image E (x, y)0And P1Coordinates are obtained, integral operation is carried out on the coordinates, and a plurality of integral pixel density values are obtained through calculation;
Figure BDA0003087943560000066
the method is characterized in that integral pixel density values of a plurality of straight lines are differentiated;
Figure BDA0003087943560000067
the method is to find out the maximum integral pixel density difference and then detect one or more straight lines.
Based on the steps S4 and S5 provided in this embodiment, it can be summarized that the straight line detection in this embodiment specifically includes the following steps:
step S10, preprocessing the image to be detected to generate a binary edge image;
step S11, optimizing the traversal range of the parameters;
step S12, traversing P according to a first-order Bezier curve formula0And P1Obtaining integral pixel density values of a plurality of straight lines;
step S13, differentiating the linear integral density values to find out the maximum integral pixel density value;
in step S14, pixel coordinates of one or more straight lines are obtained.
Example two
In this embodiment, referring to fig. 3 and 4, the line is a parabola, and in the step S4, the parabola B is expressed by a second-order bezier curve2
B2(t)=(1-t)2P0+2t(1-t)P1+t2P2,t∈[0,1];
Wherein, P0、P1、P2For known 3 control points, t is a range of [0,1 ]]By a parameter P0、P1、P2T, a parabola can be "drawn". Please refer to fig. 3, line P0P1Point on is A, straight line P1P2Point B, a point P on the straight line ABtThis point is a point generated when t is 0.45. Then, according to the mathematical characteristics of the second-order Bezier curve, with the change of t, the following equation is permanently kept, and then the parabola B is obtained2(t):
Figure BDA0003087943560000071
Setting P0Has the coordinates of (x)0,y0),P1Has the coordinates of (x)1,y1),P2Has the coordinates of (x)2,y2),PtHas the coordinates of (x)t,yt) Then P istThe coordinate equation of (a) is:
xt=(1-t)2x0+2t(1-t)x1+t2x2
yt=(1-t)2y0+2t(1-t)y1+t2y2
during the operation process of the parabolic pixel calculus, P is continuously traversed in the image0、P1、P2And (3) integrating the obtained parabolas to calculate a plurality of integral pixel density values of the parabolas, and then differentiating all the integral pixel density values to find one or more maximum integral pixel density differences.
Further, in step S5, the parabolic pixel calculus operator is defined as:
Figure BDA0003087943560000072
e (x, y) is a binary edge image generated by preprocessing an image to be detected; s is a parabola P0P1P2The pixel length of (d);
Figure BDA0003087943560000081
is to traverse different P around the straight line length s in the edge image E (x, t)0、P1、P2Coordinates, and a plurality of integral pixel density values calculated after integral operation is carried out on the coordinates;
Figure BDA0003087943560000082
the method is characterized in that integral pixel density values of a plurality of parabolas are differentiated;
Figure BDA0003087943560000083
which is to find the maximum integrated pixel density difference and then detect one or more parabolas.
Based on the steps S4 and S5 provided in this embodiment, it can be summarized that the specific steps of the parabola detection in this embodiment are as follows:
step S20, preprocessing the image to be detected to generate a binary edge image;
step S21, optimizing the traversal range of the parameters;
step S22, traversing P according to a second-order Bezier curve formula0、P1、P2Obtaining integral pixel density values of a plurality of parabolas by coordinates of the three points;
step S23, the multiple parabolic integral density values are differentiated to find the maximum integral pixel density value.
EXAMPLE III
In a real scenario, not every curve is a parabola, for which a third order bezier curve can be used to detect such curves. In this embodiment, as shown in fig. 5 and fig. 6, the line is a third-order bezier curve, and in step S4, the third-order bezier curve equation is as follows:
B3(t)=P0(1-t)3+3P1t(1-t)2+3P2t2(1-t)+P3t3,t∈[0,1];
wherein, P0、P1、P2、P3For known 4 control points, t is a range of [0,1 ]]By a parameter P0、P1、P2、P3T, processing based on a third-order Bezier curve equation to obtain a third-order Bezier curve; further, due to P0、P1、P2、P3For known 4 points, t is a range of [0,1 ]]In a ratio of P to P, so that0、P1、P2、P3T, the pixel can be "drawn" based on the third-order bezier curve equation. As shown in fig. 5, a straight line P0P1Point on is A, straight line P1P2Point on is B, straight line P1P2Point C, point D on line AB, point E on line BC, and point P on line DEtThis point is a point generated when t is 0.45.
According to the mathematical characteristics of the third-order Bezier curve, the following equation is permanently kept along with the change of t, and then the corresponding third-order Bezier curve B is obtained3(t):
Figure BDA0003087943560000091
Setting P0Has the coordinates of (x)0,y0),P1Has the coordinates of (x)1,y1),P2Has the coordinates of (x)2,y2),P3Has the coordinates of (x)3,y3),PtHas the coordinates of (x)t,yt) Then P istIs expressed as:
xt=x0(1-t)3+3x1t(1-t)2+3x2t2(1-t)+x3t3
yt=y0(1-t)3+3y1t(1-t)2+3y2t2(1-t)+y3t3
in the operation process of the third-order Bezier curve pixel calculus, P is continuously traversed in the image0、P1、P2、P3And (3) performing integral operation on the obtained curve according to the coordinates of the points, calculating a plurality of integral pixel density values, and then differentiating all the integral pixel density values to find one or more maximum integral pixel density differences.
Further, in step S5, the detection operator of the third-order bezier curve pixel calculus is defined as:
Figure BDA0003087943560000092
e (x, y) refers to a binary edge image generated by preprocessing an image to be detected; s is the third order Bessel curve P0P1P2P3The pixel length of (d);
Figure BDA0003087943560000093
means that in the edge image E (x, y), different P's are traversed around the straight line length s0、P1、P2、P3Performing integral operation on the coordinates, thereby calculating a plurality of integral pixel density values;
Figure BDA0003087943560000094
differentiating the integral pixel density values of a plurality of third-order Bezier curves;
Figure BDA0003087943560000095
the method is characterized in that the maximum integral pixel density difference is found out, and one or more third-order Bezier curves are obtained through detection.
Based on the steps S4 and S5 provided in this embodiment, it can be summarized that the specific steps of the third-order bezier curve detection in this embodiment are as follows:
step S30, preprocessing the image to be detected to generate a binary edge image;
step S31, optimizing the traversal range of the parameters;
step S32, traversing P according to the third-order Bezier curve formula0、P1、P2、P3Obtaining integral pixel density values of a plurality of third-order Bezier curves by coordinates of the four points;
step S33, differentiating the integral density values of the multiple third-order Bezier curves to find out the maximum integral pixel density value;
in step S34, pixel coordinates of one or more third-order bezier curves are obtained.
Example four
The order of the Bezier curve can be extended continuously to form a complex curve in a mode of increasing the fixed point P theoretically. However, from an engineering perspective, the bezier curve of the fourth order and above means the traversal of 5 or more fixed points P, which is a great operation expense, and therefore, the embodiment needs a more efficient method to resolve the complex problem.
In fact, the present invention may use the common practice in the field of image design for reference, i.e. an image designer generally connects multiple segments of third-order bezier curves in sequence to form a more complex smooth curve. In other words, the process of the complex curve pixel calculus can be regarded as a process of processing and then aggregating a plurality of third-order bezier curve pixel calculus.
In practical application, from the perspective of engineering implementation, the algorithm set forth in the present invention needs to continuously traverse a plurality of P-point coordinates in an image. In extreme cases, the present invention needs to traverse all pixel coordinates of the whole photo to accurately detect the target, but then the requirements on computer hardware become very high. Therefore, the invention synchronously provides a parameter traversal range optimization method, which can greatly shorten the operation time of accurately positioning the target.
Regarding the specific implementation principle, in step S3 of the method of the present invention, the process of optimizing the traversal range of the parameter includes:
firstly, carrying out fuzzy positioning on an image to be detected, positioning a fuzzy P point, and then making a reasonable assumption: the real point P of the straight line or the curve is positioned in a certain range around the fuzzy point P; therefore, optimization of algorithm traversal parameters is realized.
Further, in the process of optimizing the parameter traversal range, the coordinates of the P points in the straight line or the curve are roughly positioned by using a contour searching method in the OpenCV software, so that fuzzy P points are found.
Therefore, the traversal range of the P point is defined in advance, and the parameters traversed by the algorithm are optimized. The verification proves that the optimization method can greatly reduce the operation amount of the algorithm disclosed by the invention, thereby improving the overall operation efficiency of the system.
The line detection processing method for resisting the resampling of the mobile phone camera, disclosed by the invention, can effectively realize the accurate detection of a straight line, a parabola, a third-order Bezier curve and a complex curve formed by the third-order Bezier curve based on the embodiment, has strong universality, can be applied to the actual computer vision application in a large scale, is suitable for popularization and application in the field, and has better application prospect.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents or improvements made within the technical scope of the present invention should be included in the scope of the present invention.

Claims (9)

1. A line detection processing method for resisting resampling of a mobile phone camera is characterized by comprising the following steps:
step S1, acquiring an image to be detected;
step S2, preprocessing an image to be detected, converting the image to be detected into a binary edge image to display the characteristic texture of the image to be detected;
step S3, optimizing the parameter traversal range;
step S4, traversing the known coordinates of a plurality of control points by using a corresponding Bezier curve formula to obtain integral pixel density values of a plurality of lines;
step S5, performing differential operation on the integral pixel density values of the lines by using a preset pixel calculus operator, and then finding out the maximum integral pixel density value;
in step S6, pixel coordinates of one or more lines are obtained.
2. The line detection processing method for resisting resampling of a mobile phone camera as claimed in claim 1, wherein the line is a straight line, and in the step S4, the straight line B is expressed by a first-order bezier curve equation1
B1(t)=(1-t)P0+tP1,t∈[0,1];
Wherein, P0And P1For the known 2 control points, t is in the range 0,1]By the parameter P0、P1T, obtaining a pixel straight line based on a first-order Bezier curve equation, and setting P0Has the coordinates of (x)0,y0),P1Coordinates of (2)Is (x)1,y1),PtHas the coordinates of (x)t,yt),PtThe coordinate equation of (a) is as follows:
xt=(1-t)x0+tx1
yt=(1-t)y0+ty1
parameterizing t of the equation to obtain:
Figure FDA0003087943550000021
Figure FDA0003087943550000022
and substituting the equations into each other to obtain a linear two-point equation:
Figure FDA0003087943550000023
in the operation process of the linear pixel calculus, P is continuously traversed in the image0And P1And (4) performing pixel integration on the obtained straight line by coordinates, and calculating to obtain an integral pixel density value of the straight line.
3. The line detection processing method for resisting resampling of a mobile phone camera as claimed in claim 2, wherein in step S5, a straight line pixel calculus operator is defined as:
Figure FDA0003087943550000024
e (x, y) is a binary edge image generated after preprocessing an image to be detected; s is a straight line P0P1The pixel length of (d);
Figure FDA0003087943550000025
is to traverse different P around a straight line length s in an edge image E (x, y)0And P1Coordinates are obtained, integral operation is carried out on the coordinates, and a plurality of integral pixel density values are obtained through calculation;
Figure FDA0003087943550000026
the method is characterized in that integral pixel density values of a plurality of straight lines are differentiated;
Figure FDA0003087943550000027
the method is to find out the maximum integral pixel density difference and then detect one or more straight lines.
4. The line detection processing method for resisting resampling of a mobile phone camera as claimed in claim 1, wherein the line is a parabola, and in the step S4, a parabola B is expressed by a second-order bezier curve2
B2(t)=(1-t)2P0+2t(1-t)P1+t2P2,t∈[0,1];
Wherein, P0、P1、P2For known 3 control points, t is a range of [0,1 ]]By a parameter P0、P1、P2T, according to the mathematical characteristics of the second-order Bezier curve, with the change of t, permanently keeping the following equation, and further obtaining the parabola B2(t):
Figure FDA0003087943550000028
Setting P0Has the coordinates of (x)0,y0),P1Has the coordinates of (x)1,y1),P2Has the coordinates of (x)2,y2),PtHas the coordinates of (x)t,yt) Then P istThe coordinate equation of (a) is:
xt=(1-t)2x0+2t(1-t)x1+t2x2
yt=(1-t)2y0+2t(1-t)y1+t2y2
during the operation process of the parabolic pixel calculus, P is continuously traversed in the image0、P1、P2And (3) integrating the obtained parabolas to calculate a plurality of integral pixel density values of the parabolas, and then differentiating all the integral pixel density values to find one or more maximum integral pixel density differences.
5. The line detection processing method for resisting resampling of a mobile phone camera as claimed in claim 4, wherein in step S5, a parabolic pixel calculus operator is defined as:
Figure FDA0003087943550000031
e (x, y) is a binary edge image generated by preprocessing an image to be detected; s is a parabola P0P1P2The pixel length of (d);
Figure FDA0003087943550000032
is to traverse different P around a straight line length s in an edge image E (x, y)0、P1、P2Coordinates, and a plurality of integral pixel density values calculated after integral operation is carried out on the coordinates;
Figure FDA0003087943550000033
the method is characterized in that integral pixel density values of a plurality of parabolas are differentiated;
Figure FDA0003087943550000034
which is to find the maximum integrated pixel density difference and then detect one or more parabolas.
6. The line detection processing method for resisting resampling of a mobile phone camera as claimed in claim 1, wherein the line is a third-order bezier curve, and in the step S4, the third-order bezier curve equation is as follows:
B3(t)=P0(1-t)3+3P1t(1-t)2+3P2t2(1-t)+P3t3,t∈[0,1];
wherein, P0、P1、P2、P3For known 4 control points, t is a range of [0,1 ]]By a parameter P0、P1、P2、P3And t, processing based on the third-order Bezier curve equation to obtain a third-order Bezier curve, permanently keeping the following equation along with the change of t according to the mathematical characteristic of the third-order Bezier curve, and further obtaining a corresponding third-order Bezier curve B3(t):
Figure FDA0003087943550000041
Setting P0Has the coordinates of (x)0,y0),P1Has the coordinates of (x)1,y1),P2Has the coordinates of (x)2,y2),P3Has the coordinates of (x)3,y3),PtHas the coordinates of (x)t,yt) Then P istIs expressed as:
xt=x0(1-t)3+3x1t(1-t)2+3x2t2(1-t)+x3t3
yt=y0(1-t)3+3y1t(1-t)2+3y2t2(1-t)+y3t3
in the operation process of the third-order Bezier curve pixel calculus, P is continuously traversed in the image0、P1、P2、P3Coordinates of points, pairAnd performing integral operation on the obtained curve to calculate a plurality of integral pixel density values, and then differentiating all the integral pixel density values to find one or more maximum integral pixel density differences.
7. The line detection processing method for resisting resampling of a mobile phone camera as claimed in claim 6, wherein in step S5, a detection operator of a third-order bezier curve pixel calculus is defined as:
Figure FDA0003087943550000042
e (x, y) refers to a binary edge image generated by preprocessing an image to be detected; s is the third order Bessel curve P0P1P2P3The pixel length of (d);
Figure FDA0003087943550000043
means that in the edge image E (x, y), different P's are traversed around the straight line length s0、P1、P2、P3Performing integral operation on the coordinates, thereby calculating a plurality of integral pixel density values;
Figure FDA0003087943550000044
differentiating the integral pixel density values of a plurality of third-order Bezier curves;
Figure FDA0003087943550000045
the method is characterized in that the maximum integral pixel density difference is found out, and one or more third-order Bezier curves are obtained through detection.
8. The line detection processing method for resisting resampling of a mobile phone camera as claimed in claim 1, wherein in the step S3, the process of optimizing the traversal range of the parameter comprises:
firstly, carrying out fuzzy positioning on an image to be detected, positioning a fuzzy P point, and then making a reasonable assumption: the real point P of the straight line or the curve is positioned in a certain range around the fuzzy point P; therefore, optimization of algorithm traversal parameters is realized.
9. The line detection processing method for resisting resampling of a mobile phone camera as claimed in claim 8, wherein in the process of parameter traversal range optimization, a contour search method is used in OpenCV software to roughly locate coordinates of a P point in a straight line or a curve, so as to find a fuzzy P point.
CN202110586918.9A 2021-05-27 2021-05-27 Line detection processing method for resisting resampling of mobile phone camera Active CN113313724B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110586918.9A CN113313724B (en) 2021-05-27 2021-05-27 Line detection processing method for resisting resampling of mobile phone camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110586918.9A CN113313724B (en) 2021-05-27 2021-05-27 Line detection processing method for resisting resampling of mobile phone camera

Publications (2)

Publication Number Publication Date
CN113313724A true CN113313724A (en) 2021-08-27
CN113313724B CN113313724B (en) 2022-04-08

Family

ID=77375794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110586918.9A Active CN113313724B (en) 2021-05-27 2021-05-27 Line detection processing method for resisting resampling of mobile phone camera

Country Status (1)

Country Link
CN (1) CN113313724B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425178A (en) * 2008-11-05 2009-05-06 沈阳工业大学 Method for repairing edge contour image of columnar injection deposition blank
CN102663384A (en) * 2012-03-31 2012-09-12 北京智安邦科技有限公司 Curve identification method based on Bezier control point searching and apparatus thereof
CN102998684A (en) * 2012-11-21 2013-03-27 厦门雅迅网络股份有限公司 Terminal positioning track fitting method based on Bezier curve
CN103489190A (en) * 2013-09-26 2014-01-01 中国科学院深圳先进技术研究院 Method and system for extracting image feature curve
CN103971101A (en) * 2014-05-21 2014-08-06 国家电网公司 Curve identification method based on Bethel control point searching
CN106778774A (en) * 2016-11-25 2017-05-31 福建师范大学 A kind of high-resolution remote sensing image man-made features profile testing method
CN107330906A (en) * 2017-06-28 2017-11-07 江南大学 Improvement thinning algorithm based on curve matching
CN109115127A (en) * 2018-08-24 2019-01-01 合肥工业大学 A kind of sub-pix peak point extraction algorithm based on Bezier
CN111563412A (en) * 2020-03-31 2020-08-21 武汉大学 Rapid lane line detection method based on parameter space voting and Bessel fitting
CN111739006A (en) * 2020-06-22 2020-10-02 深圳企业云科技股份有限公司 Elliptical image detection algorithm and system based on enclosed road integral
CN112291553A (en) * 2020-10-22 2021-01-29 江西欧迈斯微电子有限公司 Image line detection method of camera module

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425178A (en) * 2008-11-05 2009-05-06 沈阳工业大学 Method for repairing edge contour image of columnar injection deposition blank
CN102663384A (en) * 2012-03-31 2012-09-12 北京智安邦科技有限公司 Curve identification method based on Bezier control point searching and apparatus thereof
CN102998684A (en) * 2012-11-21 2013-03-27 厦门雅迅网络股份有限公司 Terminal positioning track fitting method based on Bezier curve
CN103489190A (en) * 2013-09-26 2014-01-01 中国科学院深圳先进技术研究院 Method and system for extracting image feature curve
US20160189005A1 (en) * 2013-09-26 2016-06-30 Shenzhen Institutes Of Advanced Technology Chinese Academy Of Sciences Method and system for extracting image characteristic curve
CN103971101A (en) * 2014-05-21 2014-08-06 国家电网公司 Curve identification method based on Bethel control point searching
CN106778774A (en) * 2016-11-25 2017-05-31 福建师范大学 A kind of high-resolution remote sensing image man-made features profile testing method
CN107330906A (en) * 2017-06-28 2017-11-07 江南大学 Improvement thinning algorithm based on curve matching
CN109115127A (en) * 2018-08-24 2019-01-01 合肥工业大学 A kind of sub-pix peak point extraction algorithm based on Bezier
CN111563412A (en) * 2020-03-31 2020-08-21 武汉大学 Rapid lane line detection method based on parameter space voting and Bessel fitting
CN111739006A (en) * 2020-06-22 2020-10-02 深圳企业云科技股份有限公司 Elliptical image detection algorithm and system based on enclosed road integral
CN112291553A (en) * 2020-10-22 2021-01-29 江西欧迈斯微电子有限公司 Image line detection method of camera module

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HIDDEN AUTHORS: "《Accurate pupil boundary detection using angular integral projection and bezier curves》", 《2018 26TH SIGNAL PROCESSING AND COMMUNICATIONS APPLICATIONS CONFERENCE (SIU)》 *
MD. IBRAHIM KHAN等: "《An efficient algorithm for finding the control point of 3rd order Bezier curve》", 《INTERNATIONAL FORUM ON STRATEGIC TECHNOLOGY 2010》 *
何春等: "《一种基于分数阶次微积分模板的新型边缘检测方法》", 《自动化学报》 *

Also Published As

Publication number Publication date
CN113313724B (en) 2022-04-08

Similar Documents

Publication Publication Date Title
Zheng et al. Single-image vignetting correction
CN109714519B (en) Method and system for automatically adjusting image frame
CN112070818A (en) Robot disordered grabbing method and system based on machine vision and storage medium
CN108470356B (en) Target object rapid ranging method based on binocular vision
CN114494045B (en) Large spur gear geometric parameter measurement system and method based on machine vision
CN104102068B (en) Atomatic focusing method and automatic focusing mechanism
CN109211198B (en) Intelligent target detection and measurement system and method based on trinocular vision
CN111260788B (en) Power distribution cabinet switch state identification method based on binocular vision
CN106203342A (en) Target identification method based on multi-angle local feature coupling
CN105701809B (en) A kind of method for correcting flat field based on line-scan digital camera scanning
CN109035170A (en) Adaptive wide-angle image correction method and device based on single grid chart subsection compression
CN113313724B (en) Line detection processing method for resisting resampling of mobile phone camera
CN109318235B (en) Quick focusing method of robot vision servo system
CN116596987A (en) Workpiece three-dimensional size high-precision measurement method based on binocular vision
CN116958092A (en) Power transmission line sag rapid measurement method based on improved stereo matching algorithm
CN111260561A (en) Rapid multi-graph splicing method for mask defect detection
CN116389902A (en) Liquid lens rapid focusing method and system
CN116245928A (en) Three-dimensional reconstruction method based on binocular stereo matching
CN113610906B (en) Multi-parallax image sequence registration method based on fusion image guidance
US20220076428A1 (en) Product positioning method
CN110956640B (en) Heterogeneous image edge point detection and registration method
CN112700504B (en) Parallax measurement method of multi-view telecentric camera
CN111630569B (en) Binocular matching method, visual imaging device and device with storage function
CN113920065B (en) Imaging quality evaluation method for visual detection system of industrial site
CN112396629A (en) River course inspection tracking method based on infrared and visible light cooperation

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
GR01 Patent grant
GR01 Patent grant