CN108074237B - Image definition detection method and device, storage medium and electronic equipment - Google Patents

Image definition detection method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN108074237B
CN108074237B CN201711466320.6A CN201711466320A CN108074237B CN 108074237 B CN108074237 B CN 108074237B CN 201711466320 A CN201711466320 A CN 201711466320A CN 108074237 B CN108074237 B CN 108074237B
Authority
CN
China
Prior art keywords
target
straight line
coordinates
point
fitting straight
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.)
Expired - Fee Related
Application number
CN201711466320.6A
Other languages
Chinese (zh)
Other versions
CN108074237A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711466320.6A priority Critical patent/CN108074237B/en
Publication of CN108074237A publication Critical patent/CN108074237A/en
Priority to PCT/CN2018/114974 priority patent/WO2019128495A1/en
Application granted granted Critical
Publication of CN108074237B publication Critical patent/CN108074237B/en
Expired - Fee Related 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/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Abstract

The embodiment of the application discloses a method and a device for detecting image definition, a storage medium and electronic equipment, wherein in the method, a checkerboard image is obtained; acquiring coordinates of pixel points on at least three inclined edges around a preset position point in the checkerboard image; performing straight line fitting on the coordinates of the pixel points on each bevel edge to obtain a fitted straight line where the corresponding bevel edge is located; acquiring coordinates of intersection points among the at least three fitting straight lines, and acquiring coordinates of a central point of at least one bevel edge according to the coordinates of the intersection points; and acquiring a spatial frequency response based on the center point coordinate of the oblique edge so as to detect the definition of the checkerboard image according to the spatial frequency response, thereby improving the accuracy of the detection result.

Description

Image definition detection method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of image technologies, and in particular, to a method and an apparatus for detecting image sharpness, a storage medium, and an electronic device.
Background
In image measurement processes and machine vision applications, in order to determine the correlation between the three-dimensional geometric position of a certain point on the surface of an object in space and the corresponding point in the image, it is usually necessary to establish a geometric model of camera imaging, and the process of solving the parameters of these geometric models is called camera calibration. The black and white checkerboard mark plate has the characteristics of simple characteristics, obvious contrast, easy identification and the like, and is widely applied to camera calibration. Image sharpness is one of the indicators that measure the performance of camera imaging systems. In the current method for detecting the definition of an image, a checkerboard image is usually used as a detection draft, then the definition of the detection draft is detected by using a detection method of an inclined edge, the method needs to detect the central point of an inclined edge, and then the definition of the image is detected based on the central point of the inclined edge. However, in the conventional oblique edge detection method, it is difficult to correctly identify the center point of the oblique edge, which causes a large deviation in the detection result of the center point of the oblique edge, and causes a large deviation in the detection result of the sharpness.
Disclosure of Invention
The embodiment of the application provides an image definition detection method and device, a storage medium and electronic equipment, which can improve the accuracy of detection of a central point of a bevel edge, and further improve the accuracy of image definition detection.
The embodiment of the application provides an image definition detection method, which comprises the following steps:
obtaining a checkerboard image;
acquiring coordinates of pixel points on at least three inclined edges around a preset position point in the checkerboard image;
performing straight line fitting on the coordinates of the pixel points on each bevel edge to obtain a fitted straight line where the corresponding bevel edge is located;
acquiring coordinates of intersection points among the at least three fitting straight lines, and acquiring coordinates of a central point of at least one bevel edge according to the coordinates of the intersection points;
and acquiring a spatial frequency response based on the center point coordinate of the oblique edge so as to detect the definition of the checkerboard image according to the spatial frequency response.
The embodiment of the present application further provides an image definition detection device, including:
the first acquisition module is used for acquiring a checkerboard image;
the second acquisition module is used for acquiring the coordinates of pixel points on at least three bevel edges around a preset position point in the checkerboard image;
the straight line fitting module is used for performing straight line fitting on the coordinates of the pixel points on each bevel edge to obtain a fitted straight line where the corresponding bevel edge is located;
the third acquisition module is used for acquiring the coordinates of intersection points among the at least three fitting straight lines and acquiring the coordinates of the center point of at least one bevel edge according to the coordinates of the intersection points;
and the fourth acquisition module is used for acquiring a spatial frequency response based on the center point coordinate of the bevel edge so as to detect the definition of the checkerboard image according to the spatial frequency response.
The embodiment of the present application further provides a storage medium, where a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to perform the steps in the image sharpness detection method.
An embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the memory is used to store instructions and data, and the instructions are suitable for the processor to load so as to execute the steps in the image sharpness detecting method described above.
In the image definition detection method provided by the embodiment of the application, a checkerboard image is obtained first, coordinates of pixel points on at least three bevel edges around a preset position point are obtained in the checkerboard image, then performing straight line fitting on the coordinates of the pixel points on each bevel edge to obtain a fitted straight line where the corresponding bevel edge is located, acquiring the coordinates of intersection points among at least three fitted straight lines, and obtaining the coordinates of the center point of at least one bevel edge according to the coordinates of the intersection points, obtaining the spatial frequency response based on the coordinates of the center point of one bevel edge, by detecting the definition of the checkerboard image according to the spatial frequency response, the scheme can more accurately determine the coordinate of the central point of the bevel edge in a straight line fitting mode, therefore, when the spatial frequency response is obtained based on the coordinates of the central point of the bevel edge to perform the definition detection, the accuracy of the image definition detection can be improved.
Drawings
The technical solution and the advantages of the present invention will be apparent from the following detailed description of the embodiments of the present invention with reference to the accompanying drawings.
Fig. 1 is a scene schematic diagram of an image sharpness detection method according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of an image sharpness detection method according to an embodiment of the present application.
Fig. 3 is a schematic diagram of a checkerboard image provided in an embodiment of the present application.
Fig. 4 is a partially enlarged schematic view of a checkerboard image provided in an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an image sharpness detecting apparatus according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
The embodiment of the application provides an image definition detection method and device, a storage medium and electronic equipment.
The image definition detection device can be integrated on electronic equipment such as a mobile phone, a tablet personal computer and an unmanned aerial vehicle with a photographing function.
As shown in fig. 1, fig. 1 is a scene schematic diagram of an image sharpness detecting method provided in an embodiment of the present application. In the embodiment of the application, black check and white check in the checkerboard image are the check of slope, and the hypotenuse that this application embodiment described refers to the hypotenuse of slope check, through the central point of a hypotenuse that detects the slope check to acquire the spatial frequency response, and then utilize the spatial frequency response that obtains to detect the definition of checkerboard image. As shown in fig. 1, a camera of the electronic device may be used to photograph the checkerboard mark plate to obtain a checkerboard image. Presetting a preset position point in the checkerboard image, for example, the preset position point is a point A, the embodiment of the application carries out straight line fitting on the coordinates of the pixel points on at least three inclined edges around the point A to obtain a fitting straight line where the corresponding inclined edges are located, wherein two intersection points can be determined by the three inclined edges of the inclined grids, so that the center point coordinate of one inclined edge can be obtained by obtaining the intersection points of the three fitting straight lines, and further, the space frequency response is obtained based on the center point coordinate to detect the definition of the checkerboard image. Through the embodiment of the application, the accuracy of the detection of the central point of the bevel edge can be improved, the more accurate position of the central point of the bevel edge can be obtained, and the accuracy of the detection result of the image definition can be improved.
As will be described in detail below.
Referring to fig. 2, the method for detecting image sharpness according to the embodiment of the present application includes the following steps:
201. and acquiring a checkerboard image.
The checkerboard sign board can be photographed by using the camera to obtain a checkerboard image. During the photographing process, the checkerboard mark plate can be rotated by a certain angle, so that the checkerboard grids are inclined grids, the rotation angle can be selected within a range of 2-10 degrees, namely, an included angle between the inclined edge of each grid and the horizontal direction can be 2-10 degrees.
202. And acquiring the coordinates of pixel points on at least three inclined edges around the preset position point in the checkerboard image.
The black square and the white square in the checkerboard image are both inclined grids, and the inclined edge refers to an inclined edge of the inclined grid, for example, the inclined edge may be an inclined edge of the black square or an inclined edge of the white square. The predetermined position points can be arranged in any grid on the checkerboard image according to actual needs, so that the oblique sides around the predetermined position points refer to four oblique sides of the grid where the predetermined position points are located, namely the oblique sides surrounding the predetermined position points. As shown in fig. 3 and 4, the predetermined position point is, for example, a point a, and at least three oblique sides around the point a may be, for example, oblique sides a, b, and c. Therefore, step 202 may be to obtain the coordinates of the pixel points on at least three hypotenuses a, b, and c around the point a.
In this embodiment, step 202 may specifically include: and obtaining coordinates of pixel points on four inclined edges around the preset position point, namely obtaining coordinates of pixel points on four inclined edges a, b, c and d of the lattice where the point A is located. The coordinates of the pixel points on the four oblique sides can be obtained through the identification of the image edges or other methods. For example, in some embodiments, the coordinates of the pixel points on the four oblique sides may be obtained by:
(1) and determining a target area according to the preset position point, and acquiring the brightness average value of the target area.
The target area may be, for example, a circular area with a predetermined position point a as a center and a radius r, where the radius r may be selected according to actual needs, or a rectangular area with the predetermined position point a as a center, which is not limited herein. As shown in fig. 4, the determined target area is, for example, an area within a dotted line frame, i.e., a target area EF. After the target area is determined, the brightness average value of the target area may be obtained according to the brightness values of the pixels in the target area, for example, the brightness average value of the target area may be obtained by calculating the ratio of the sum of the brightness values of the pixels in the target area to the total number of the pixels.
(2) Establishing an xy coordinate system by taking the preset position point A as a dot, and then scanning line pixels in the target area from the preset position point along the positive direction and the negative direction of the y axis until the scanning is satisfied in the positive direction and the negative direction of the x axis (P)(i,j)-P0)(P(i,j+1)-P0)<0 until the target pixel point; and scanning the column pixels in the target area in the positive and negative directions of the x-axis from the predetermined position point until scanning in the positive and negative directions of the y-axis is satisfied (P)(i,j)-P0)(P(i+1,j)-P0)<0 until the target pixel point.
Wherein, P0Representing the mean value of the luminance of the target area, P(i,j)Representing the brightness value, P, of the target pixel(i,j+1)Representing the brightness value, P, of a pixel adjacent to the target pixel(i+1,j)And also the brightness value of a pixel point adjacent to the target pixel point, i represents the ith row in the positive direction or the negative direction of the y axis from the x axis, and j represents the jth column in the positive direction or the negative direction of the x axis from the y axis. For example the brightness value P(i,j)The luminance value of the pixel point with coordinates (i, j) is shown. In the embodiment of the application, the coordinates of the pixel points are valued by taking an xy coordinate system established by taking the preset position point A as a dot as a reference coordinate system, for example, the value of i in the positive direction of the y axis is a positive integer, and the value of i in the negative direction of the y axis is a negative integer; the value of j in the positive direction of the x-axis is a positive integer, and the value of j in the negative direction of the x-axis is a negative integer.
Of course, in other embodiments, the coordinate system of the checkerboard image or other coordinate systems may be used as the reference coordinate system to take the value of the coordinate of the pixel point, and the value of i and j in each direction may be determined to be positive or negative according to the selected reference coordinate system.
Will (P)(i,j)-P0)(P(i,j+1)-P0)<0 is defined as condition one, and (P)(i,j)-P0)(P(i+1,j)-P0)<0 is defined as condition two. In this embodiment, the scanning process of the pixel is a process of determining whether the brightness value of the scanned pixel meets the above condition. For example, in a specific scanning process, starting from the predetermined position point a, the target area may be scanned line by line in the positive direction and the negative direction of the y-axis, and then scanned column by column in the positive direction and the negative direction of the x-axis, or the line scanning and the column scanning may be performed simultaneously. For example, from the predetermined position point a, progressive pixel scanning is performed in the target area in the positive direction of the y-axis. When a row of pixel points are scanned, whether the brightness value of each row of pixel points in the positive direction and the negative direction of the x axis meets a first condition is judged, wherein the brightness value is P(i,j)The pixel point (i, j) is the currently scanned pixel point, namely the target pixel point, and the brightness value is P(i,j+1)The pixel point (i, j +1) of (2) is the next column of pixel points which are adjacent to the current pixel point in the same row, wherein when scanning to a pixel point (i, j) in the positive direction of the x axis meets the condition, the scanning in the positive direction of the x axis is stopped, and when scanning to a pixel point (i, j) in the negative direction of the x axis meets the condition, the scanning in the negative direction of the x axis is stopped. And when one pixel point (i, j) meets the condition one in the positive direction and the negative direction of the x axis, stopping scanning the pixel in the row, and continuing scanning the pixel in the next row along the positive direction of the y axis.
The progressive scanning in the negative direction of the y-axis is similar to the progressive scanning in the positive direction of the y-axis, and is not described in detail here. The progressive scanning can be performed simultaneously in the positive direction and the negative direction of the y axis, or the progressive scanning can be performed in one direction of the y axis first, and then the progressive scanning can be performed in the other direction of the y axis.
In addition, column pixel scanning will also be performed. Specifically, starting from the predetermined position point a, a column-by-column pixel scan may be performed in the target area in the positive direction of the x-axis first. When a row of pixel points are scanned, whether the brightness values of the pixel points in each row along the positive direction and the negative direction of the y axis meet a second condition is judged, wherein the brightness value is P(i,j)The pixel point (i, j) is the currently scanned pixel point, namely the target pixel point, and the brightness value is P(i+1,j)The pixel point (i +1, j) of (a) is the next adjacent row of pixel points in the same column as the current pixel point, wherein when scanning to a pixel point (i, j) in the positive direction of the y axis and meeting the second condition, the scanning in the positive direction of the y axis is stopped, and when scanning to a pixel point (i, j) in the negative direction of the y axis and meeting the second condition, the scanning in the negative direction of the y axis is stopped. And when one pixel point (i, j) meets the second condition in both the positive direction and the negative direction of the y axis, stopping scanning of the pixel in the row, and continuing scanning of the pixel in the next row along the positive direction of the x axis.
The way of scanning column by column along the negative direction of the x-axis is similar to the way of scanning column by column along the positive direction of the x-axis, and is not described in detail here.
(3) According to the scanned target pixel points, determining that the pixel points are respectively positioned at two sides of the x axis and satisfy (P)(i,j)-P0)(P(i+1,j)-P0)<0, and two sets of target pixels respectively located on both sides of the y-axis and satisfying (P)(i,j)-P0)(P(i,j+1)-P0)<Two sets of target pixels of 0.
(4) And further acquiring coordinates of pixel points on four bevel edges around the preset position point according to the acquired coordinates of the four groups of target pixel points.
Two groups of target pixel points which are respectively positioned on two sides of the x axis and meet the second condition are pixel points which are possibly positioned on the inclined edges a and c along the horizontal direction respectively; two groups of target pixel points which are respectively positioned on two sides of the y axis and meet the first condition are pixel points which are possibly positioned on the inclined edges b and d along the vertical direction, so that the pixel points which are possibly positioned on the four inclined edges a, b, c and d can be determined, and the coordinates of the pixel points on each inclined edge are obtained.
203. And performing straight line fitting on the coordinates of the pixel points on each bevel edge to obtain a fitted straight line where the corresponding bevel edge is located.
And respectively performing linear fitting on the four groups of acquired target pixel points. For example, a group of target pixel points which are located on the right side of the y axis (on one side of the positive direction of the x axis) and meet the first condition are used for straight line fitting, a fitting straight line where the bevel edge d is located can be obtained, a group of target pixel points which are located above the x axis (on one side of the positive direction of the y axis) and meet the second condition are used for straight line fitting, a fitting straight line where the bevel edge a is located can be obtained, and by analogy, fitting straight lines where the bevel edges b and c are located can be obtained.
The value range of the brightness value of the pixel point, namely the gray-scale value, is between 0 and 255, the lower the brightness value is, the more black the displayed image tends to be, and the higher the brightness value is, the more white the displayed image tends to be. In the embodiment of the application, the oblique side is a boundary line between the black square and the white square, and the black square shows black, so that the brightness value of each pixel in the black square is low, for example, the brightness value of each pixel may be in a range of 5 to 10, and the white square shows white, so that the brightness value of each pixel in the white square is high, for example, the brightness value may be in a range of 245 to 250. The target area has both black squares and white squares, so the average brightness value of the target area is between the brightness values of the pixels in the black squares and the white squares, for example, 125, that is, the average brightness value of the target area is greater than the brightness value of each pixel in the black squares and less than the brightness value of each pixel in the white squares.
Therefore, the difference between the luminance value and the luminance average value of each pixel in the black square is a negative number, and thus the product between the difference values is a positive number greater than zero. The difference between the luminance value and the average luminance value of each pixel in the white square is a positive number, and thus the product between the differences is also a positive number greater than zero. When the product of the difference between the brightness value and the brightness average value of one pixel point and the difference between the brightness value and the brightness average value of another adjacent pixel point is less than zero, the result is said to be thatIt is obvious that these two pixel points are most likely to be the pixel points located at the junction of the black square and the white square, i.e. one is the pixel point of the black square, and the other is the pixel point in the white square, so that the bevel edge (i.e. the black-white boundary line) is most likely to be located on these two pixel points, thereby determining one of the two pixel points as the pixel point located on the bevel edge. For example, with condition one: (P)(i,j)-P0)(P(i,j+1)-P0)<0. Taking the example of making row pixel rice seedlings in the target area along the positive direction of the y axis, when scanning a pixel point (4,10) in the positive direction of the x axis, judging the brightness value P of the pixel point (4,10)(4,10)And a luminance average value P0And the difference value of (2) and the brightness value P of the pixel points (4,11) in the next column of the same row(4,11)And a luminance average value P0When the product of the difference values is less than zero, the pixel point (4,10) is used as a target pixel point, namely the pixel point on the hypotenuse d on the right side of the y axis.
Therefore, through this embodiment, can relatively accurately find a plurality of pixel points that probably lie in each hypotenuse, and then through carrying out the straight line fitting to each group of pixel points, can obtain the fitting straight line that corresponds the hypotenuse place.
Wherein, can select suitable algorithm to carry out the straight line fitting to each group of pixel according to actual need, in an embodiment, can utilize the least square method to carry out the straight line fitting to the coordinate of the pixel on every hypotenuse.
204. And acquiring coordinates of intersection points among the at least three fitting straight lines, and acquiring coordinates of the central point of the at least one bevel edge according to the coordinates of the intersection points.
In the four oblique sides a, b, c and d around the preset position point A, one oblique side of every three oblique sides is intersected with the other two oblique sides, an equation set is formed by utilizing the fitting straight lines where the three oblique sides are respectively located, and the coordinates of the intersection point between one oblique side and the other two oblique sides, namely the coordinates of the two vertexes of the grid where the preset position point A is located, can be obtained. The line segment between the coordinates of the two intersection points is the length of one bevel edge, and the coordinates of the center point of one bevel edge can be obtained through the two intersection points.
In the present embodiment, the center point coordinates of one oblique side closest to the predetermined position point a are acquired. Wherein, after carrying out straight line fitting to the coordinate of the pixel on each hypotenuse, can also include: and determining a fitting straight line closest to the preset position point to obtain a target fitting straight line. The distance from the preset position point A to each fitting straight line can be obtained according to the obtaining mode of the distance from the point to the straight line in the mathematical principle, so that one fitting straight line closest to the preset position point A is determined, and the target fitting straight line is obtained.
Step 204 may specifically include: acquiring coordinates of an intersection point between the target fitting straight line and the fitting straight line intersected with the target fitting straight line; and acquiring the coordinate of the central point of the bevel edge on the target fitting straight line according to the coordinate of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line. For example, as shown in fig. 4, when it is determined that one fitted straight line closest to the predetermined position point a is the fitted straight line where the hypotenuse a is located, the coordinates of the intersection between the fitted straight line where the hypotenuse a is located and the fitted straight line where the hypotenuse b is located are obtained, and the coordinates of the intersection between the fitted straight line where the hypotenuse a is located and the fitted straight line where the hypotenuse d is located are obtained, so that the coordinates of the center point of the hypotenuse a are obtained from the coordinates of the two intersections.
205. And acquiring a spatial frequency response based on the center point coordinate of one inclined edge so as to detect the definition of the checkerboard image according to the spatial frequency response.
In this embodiment, a Spatial Frequency Response (SFR) is calculated based on the coordinates of the center point of the hypotenuse on the target-fitted straight line. For example, a calculation region for obtaining the spatial frequency response is determined based on the coordinates of the center point of the oblique side on the target fitting straight line, for example, the region may be a calculation region centered on the center point of the oblique side on the target fitting straight line, and then the spatial frequency response is calculated from the calculation region, whereby the spatial frequency response may be used as a judgment basis for the image sharpness.
Of course, in other embodiments, the spatial frequency response may be obtained based on a central point of any one of the four oblique sides, so as to detect the sharpness of the image, which is not particularly limited.
In the embodiment of the application, the coordinates of the pixel points on at least three bevel edges around the preset position point are obtained in the checkerboard image, then the coordinates of the pixel points on each bevel edge are subjected to straight line fitting, so that a fitting straight line where the corresponding bevel edge is located is obtained, the coordinates of intersection points between at least three fitting straight lines are obtained, the coordinate of the central point of at least one bevel edge is obtained according to the coordinates of the intersection points, the spatial frequency response is obtained based on the coordinate of the central point of one bevel edge, the definition of the checkerboard image is detected according to the spatial frequency response, the coordinate of the central point of the bevel edge can be accurately determined through the straight line fitting mode, and therefore when the spatial frequency response is obtained based on the coordinate of the central point of the bevel edge to detect the definition, the accuracy of image definition detection can be improved.
In some embodiments, as shown in fig. 3, there may be more than one predetermined location point in the checkerboard image, for example three predetermined location points A, B and C as shown in fig. 3, and thus, in this embodiment, the method for detecting the image sharpness may be to obtain coordinates of pixel points on at least three oblique sides around each predetermined position point, then performing straight line fitting on the coordinates of the pixel points on each bevel edge to obtain a fitted straight line where the corresponding bevel edge is located, then obtaining the coordinates of intersection points among at least three fitted straight lines corresponding to each preset position, and obtaining the coordinates of the center point of the bevel edge according to the coordinates of the intersection points, therefore, the spatial frequency response corresponding to each preset position point is obtained based on the center point coordinate of one inclined edge corresponding to each preset position point, and the definition of the checkerboard image can be detected according to the plurality of spatial frequency responses. For example, when all the spatial frequency responses satisfy the frequency response requirement, the definition of the checkerboard image is determined to meet the requirement, that is, the definition of the checkerboard image is better, and when one of the spatial frequency responses does not satisfy the frequency response requirement, the definition of the checkerboard image is determined to not meet the requirement, that is, the definition of the checkerboard image is poorer. Therefore, the definition of the image is judged by acquiring a plurality of spatial frequency responses, and the accuracy and the stability of the detection result can be further improved.
Referring to fig. 5, the image sharpness detecting apparatus provided in the embodiment of the present application specifically includes a first obtaining module 501, a second obtaining module 502, a straight line fitting module 503, a third obtaining module 504, and a fourth obtaining module 505.
The first obtaining module 501 is configured to obtain a checkerboard image. The checkerboard sign board can be photographed by using the camera to obtain a checkerboard image. During the photographing process, the checkerboard mark plate can be rotated by a certain angle, so that the checkerboard grids are inclined grids, the rotation angle can be selected within a range of 2-10 degrees, namely, an included angle between the inclined edge of each grid and the horizontal direction can be 2-10 degrees.
The second obtaining module 502 is configured to obtain coordinates of pixel points on at least three oblique sides around the predetermined position point in the checkerboard image.
The black grids and the white grids in the checkerboard image are oblique grids, and the oblique edges refer to oblique edges of the oblique grids. The predetermined position points can be arranged in any grid on the checkerboard image according to actual needs, so that the oblique sides around the predetermined position points refer to four oblique sides of the grid where the predetermined position points are located, namely the oblique sides surrounding the predetermined position points. As shown in fig. 4, the predetermined position point is, for example, a point a, and at least three oblique sides around the point a may be, for example, oblique sides a, b, and c.
The second obtaining module 502 is specifically configured to obtain coordinates of pixel points on four oblique sides around the predetermined position point, that is, coordinates of pixel points on four oblique sides a, b, c, and d of the lattice where the point a is located are obtained. For example, the second obtaining module 502 may be configured to determine a target area according to a predetermined position point, obtain a brightness average value of the target area, establish an xy coordinate system with the predetermined position point a as a dot, and perform line pixel scanning in the target area along a positive direction and a negative direction of the y axis from the predetermined position point until the positive direction and the negative direction of the x axis are scanned to satisfy (P)(i,j)-P0)(P(i,j+1)-P0)<0 until the target pixel point; and scanning the column pixels in the target area in the positive and negative directions of the x-axis from the predetermined position point until scanning in the positive and negative directions of the y-axis is satisfied (P)(i,j)-P0)(P(i+1,j)-P0)<0 until the target pixel point.
Wherein, P0Representing the mean value of the luminance of the target area, P(i,j)Representing the brightness value, P, of the target pixel(i,j+1)And the luminance value of a pixel point adjacent to the target pixel point is represented, P (i +1, j) represents the luminance value of a pixel point adjacent to the target pixel point, i represents the ith row in the positive direction or the negative direction of the y axis from the x axis, and j represents the jth column in the positive direction or the negative direction of the x axis from the y axis. It should be noted that the value of i in the positive direction of the y axis is a positive integer, and the value of i in the negative direction of the y axis is a negative integer; the value of j in the positive direction of the x-axis is a positive integer, and the value of j in the negative direction of the x-axis is a negative integer.
After the target pixel point is scanned, the second obtaining module 502 is further configured to determine, according to the scanned target pixel point, that the two pixels are respectively located on two sides of the x-axis and satisfy (P)(i,j)-P0)(P(i+1,j)-P0)<0, and two sets of target pixels respectively located on both sides of the y-axis and satisfying (P)(i,j)-P0)(P(i,j+1)-P0)<And 0, then obtaining the coordinates of the pixel points on the four bevel edges around the preset position point according to the obtained coordinates of the four groups of target pixel points.
The straight line fitting module 503 is configured to perform straight line fitting on the coordinates of the pixel points on each oblique side to obtain a fitted straight line where the corresponding oblique side is located. And respectively performing linear fitting on the four groups of acquired target pixel points. For example, a group of target pixel points which are located on the right side of the y axis (on one side of the positive direction of the x axis) and meet the first condition are used for straight line fitting, a fitting straight line where the bevel edge d is located can be obtained, a group of target pixel points which are located above the x axis (on one side of the positive direction of the y axis) and meet the second condition are used for straight line fitting, a fitting straight line where the bevel edge a is located can be obtained, and by analogy, fitting straight lines where the bevel edges b and c are located can be obtained.
In some embodiments, the coordinates of the pixel points on each hypotenuse may be line-fitted using least squares.
The third obtaining module 504 is configured to obtain coordinates of an intersection point between the at least three fitting straight lines, and obtain coordinates of a center point of the at least one oblique side according to the coordinates of the intersection point. In the four oblique sides a, b, c and d around the preset position point A, one oblique side of every three oblique sides is intersected with the other two oblique sides, an equation set is formed by utilizing the fitting straight lines where the three oblique sides are respectively located, and the coordinates of the intersection point between one oblique side and the other two oblique sides, namely the coordinates of the two vertexes of the grid where the preset position point A is located, can be obtained. The line segment between the coordinates of the two intersection points is the length of one bevel edge, and the coordinates of the center point of one bevel edge can be obtained through the two intersection points.
In the present embodiment, the center point coordinates of one oblique side closest to the predetermined position point a are acquired. The method further comprises a determining module 506, wherein the determining module 506 is configured to determine a fitted straight line closest to the predetermined position point, so as to obtain a target fitted straight line. The distance from the preset position point A to each fitting straight line can be obtained according to the obtaining mode of the distance from the point to the straight line in the mathematical principle, so that one fitting straight line closest to the preset position point A is determined, and the target fitting straight line is obtained.
The third obtaining module 504 may be specifically configured to obtain coordinates of an intersection point between the target fitted straight line and the fitted straight line intersecting with the target fitted straight line; and acquiring the coordinate of the central point of the bevel edge on the target fitting straight line according to the coordinate of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line. For example, as shown in fig. 4, when it is determined that one fitted straight line closest to the predetermined position point a is the fitted straight line where the hypotenuse a is located, the coordinates of the intersection between the fitted straight line where the hypotenuse a is located and the fitted straight line where the hypotenuse b is located are obtained, and the coordinates of the intersection between the fitted straight line where the hypotenuse a is located and the fitted straight line where the hypotenuse d is located are obtained, so that the coordinates of the center point of the hypotenuse a are obtained from the coordinates of the two intersections.
The fourth obtaining module 505 is configured to obtain a spatial frequency response based on the center point coordinate of a bevel edge, so as to detect the sharpness of the checkerboard image according to the spatial frequency response.
In this embodiment, the fourth obtaining module 505 is configured to obtain a Spatial Frequency Response (SFR) based on the coordinates of the center point of the hypotenuse on the target fitting straight line. For example, an acquisition region for acquiring a spatial frequency response, such as an acquisition region centered on the center point of the hypotenuse on the target fitting straight line, is determined based on the coordinates of the center point of the hypotenuse on the target fitting straight line, and then the spatial frequency response is acquired according to the acquisition region, whereby the spatial frequency response can be used as a judgment basis for the image clarity.
In the embodiment of the application, the coordinates of the pixel points on at least three bevel edges around the preset position point are obtained in the checkerboard image, then the coordinates of the pixel points on each bevel edge are subjected to straight line fitting, so that a fitting straight line where the corresponding bevel edge is located is obtained, the coordinates of intersection points between at least three fitting straight lines are obtained, the coordinate of the central point of at least one bevel edge is obtained according to the coordinates of the intersection points, the spatial frequency response is obtained based on the coordinate of the central point of one bevel edge, the definition of the checkerboard image is detected according to the spatial frequency response, the coordinate of the central point of the bevel edge can be accurately determined through the straight line fitting mode, and therefore when the spatial frequency response is obtained based on the coordinate of the central point of the bevel edge to detect the definition, the accuracy of image definition detection can be improved.
In some embodiments, the predetermined position points in the checkerboard image may be multiple, and therefore, in this embodiment, the second obtaining module may obtain coordinates of pixel points on at least three oblique sides around each predetermined position point, the straight line fitting module performs straight line fitting on the coordinates of the pixel points on each oblique side to obtain a fitting straight line where the corresponding oblique side is located, the third obtaining module is configured to obtain coordinates of an intersection point between the at least three fitting straight lines corresponding to each predetermined position point, and obtain coordinates of a center point of the oblique side according to the coordinates of the intersection point, and the fourth obtaining module is configured to obtain a spatial frequency response corresponding to each predetermined position point based on the coordinates of the center point of one oblique side corresponding to each predetermined position point, so as to detect the definition of the checkerboard image according to the multiple spatial frequency responses. For example, when all the spatial frequency responses satisfy the frequency response requirement, the definition of the checkerboard image is determined to meet the requirement, that is, the definition of the checkerboard image is better, and when one of the spatial frequency responses does not satisfy the frequency response requirement, the definition of the checkerboard image is determined to not meet the requirement, that is, the definition of the checkerboard image is poorer. Therefore, the definition of the image is judged by acquiring a plurality of spatial frequency responses, and the accuracy and the stability of the detection result can be further improved.
The embodiment of the present application provides a storage medium, which stores a plurality of instructions, where the instructions can be loaded by a processor to perform the steps in any one of the image sharpness detection methods provided in the embodiments of the present application.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in an acquisition machine-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
An embodiment of the present application further provides an electronic device, including a memory and a processor, where the memory is used to store instructions and data, and the instructions are suitable for being loaded by the processor to perform any of the steps in the image sharpness detection method provided in the embodiment of the present application
For example, the electronic device may be a tablet computer or a smart phone. Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The electronic device 600 may include a display unit 601, a memory 602, a processor 603, an image capture unit 604, and the like. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 6 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The display unit 601 may be used to display image information and the like, such as a display screen.
The memory 602 may be used to store applications and data. The memory 602 stores applications containing executable code. The application programs may constitute various functional modules. The processor 603 executes various functional applications and data processing by running an application program stored in the memory 602.
The processor 603 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 602 and calling data stored in the memory 602, thereby integrally monitoring the electronic device.
The camera unit 604 may be used to take pictures, such as a camera or the like.
In the present embodiment, the electronic device further comprises one or more programs, wherein the one or more programs are stored in the memory 602 and configured to be executed by the one or more processors 603, the one or more programs including instructions for:
obtaining a checkerboard image; acquiring coordinates of pixel points on at least three inclined edges around a preset position point in the checkerboard image; performing straight line fitting on the coordinates of the pixel points on each bevel edge to obtain a fitted straight line where the corresponding bevel edge is located; acquiring coordinates of intersection points among the at least three fitting straight lines, and acquiring coordinates of a central point of at least one bevel edge according to the coordinates of the intersection points; and acquiring a spatial frequency response based on the center point coordinate of one inclined edge so as to detect the definition of the checkerboard image according to the spatial frequency response.
The coordinate of the pixel points on the four bevel edges around the preset position point can be obtained, straight line fitting is carried out on the coordinate of the pixel points on each bevel edge, after the fitting straight line where the corresponding bevel edge is located is obtained, the fitting straight line closest to the preset position point is determined, the target fitting straight line is obtained, therefore, the coordinate of the center point of the bevel edge on the target fitting straight line is obtained by obtaining the coordinate of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line, and further the space frequency response is obtained based on the coordinate of the center point of the bevel edge on the target fitting straight line.
The coordinates of the pixel points on the four oblique edges around the preset position point can be obtained according to the following modes: determining a target area according to the preset position point, and acquiring a brightness average value of the target area; establishing x y coordinate system with the predetermined position points as dots, scanning line pixels in the target area along positive and negative directions of y-axis from the predetermined position points until positive and negative directions of x-axis are scanned to satisfy (P)(i,j)-P0)(P(i,j+1)-P0)<0 until the target pixel point; and scanning the column pixels in the target area in the positive and negative directions of the x-axis from the predetermined position point until scanning in the positive and negative directions of the y-axis is satisfied (P)(i,j)-P0)(P(i+1,j)-P0)<0 to the target pixel point, wherein P0Representing the mean value of the luminance of the target area, P(i,j)Representing the brightness value, P, of the target pixel(i,j+1)Expressing the brightness value of a pixel point adjacent to the target pixel point, P (i +1, j) expressing the brightness value of a pixel point adjacent to the target pixel point, i expressing the ith row in the positive direction or the negative direction of the y axis from the x axis, and j expressing the jth column in the positive direction or the negative direction of the x axis from the y axis; according to the scanned target pixel points, determining that the pixel points are respectively positioned at two sides of the x axis and satisfy (P)(i,j)-P0)(P(i+1,j)-P0)<0, and two sets of target pixels respectively located on both sides of the y-axis and satisfying (P)(i,j)-P0)(P(i,j+1)-P0)<Two sets of target pixel points of 0; and acquiring coordinates of the four groups of target pixel points, and further acquiring coordinates of pixel points on four bevel edges around the preset position point.
Wherein, the least square method can be utilized to carry out straight line fitting on the coordinates of the pixel points on each bevel edge.
The preset position points in the checkerboard image can be multiple, the coordinates of pixel points on at least three inclined edges around each preset position point are obtained, the coordinate of the center point of one inclined edge corresponding to each preset position point is further determined, and therefore the spatial frequency response corresponding to each preset position point is obtained based on the coordinate of the center point of one inclined edge corresponding to each preset position point, and the definition of the checkerboard image is detected according to the obtained multiple spatial frequency responses.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Therefore, in the electronic device in the embodiment of the application, the coordinates of the pixel points on at least three bevel edges around the preset position point are obtained in the checkerboard image, then the coordinates of the pixel points on each bevel edge are subjected to straight line fitting to obtain the fitting straight line where the corresponding bevel edge is located, the coordinates of the intersection points between the at least three fitting straight lines are obtained, the coordinate of the center point of at least one bevel edge is obtained according to the coordinates of the intersection points, the spatial frequency response is obtained based on the coordinate of the center point of one bevel edge, the definition of the checkerboard image is detected according to the spatial frequency response, and therefore the coordinate of the center point of the bevel edge can be accurately determined in a straight line fitting mode, and the accuracy of image definition detection can be improved when the spatial frequency response is obtained based on the coordinate of the center point of the bevel edge to detect the definition.
Further, as shown in fig. 7, the electronic device according to the embodiment of the present application may further include an input unit 605, an output unit 606, a speaker 607, a power supply 608, and the like.
The input unit 605 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate a keyboard, mouse, joystick, optical, or trackball signal input related to user setting and function control.
The output unit 606 may be used to display information input by or provided to the user and various graphical user interfaces of the mobile terminal, which may be made up of graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
It should be noted that, for the image sharpness detection method described in the embodiment of the present application, a person skilled in the art may understand that all or part of the process for implementing the image sharpness detection method described in the embodiment of the present application may be completed by controlling related hardware through an obtaining machine program, where the obtaining machine program may be stored in a storage medium readable by an obtaining machine, such as a memory, and executed by at least one processor, and the process of the embodiment of the method for adjusting a picture may be included in the execution process. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the image sharpness detecting apparatus in the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented as a software functional module and sold or used as a stand-alone product, may also be stored in a storage medium readable by an acquisition machine, such as a read-only memory, a magnetic or optical disk, or the like.
The image definition detection method, the image definition detection device, the storage medium and the electronic device provided by the embodiments of the present application are described in detail above, a specific example is applied in the present application to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. An image sharpness detection method is characterized by comprising the following steps:
step a, obtaining a checkerboard image;
b, acquiring coordinates of pixel points on at least three inclined edges around a preset position point in the checkerboard image, wherein a target area is determined according to the preset position point, the brightness average value of the target area is acquired, the pixel points of the target area are scanned, the brightness value of the pixel points of the target area is acquired, a plurality of target pixel points meeting preset conditions are determined according to the average brightness value and the brightness value, and the coordinates of the target pixel points are acquired, wherein the coordinates of the target pixel points are the coordinates of the pixel points on the inclined edges;
c, performing straight line fitting on the coordinates of the pixel points on each bevel edge to obtain a fitting straight line where the corresponding bevel edge is located, and determining a fitting straight line closest to the preset position point to obtain a target fitting straight line;
d, calculating the coordinates of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line, and calculating the coordinates of the central point of the bevel edge on the target fitting straight line according to the coordinates of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line;
and e, calculating a spatial frequency response based on the coordinates of the central point of the target fitting straight line so as to detect the definition of the checkerboard image according to the spatial frequency response.
2. The method of claim 1, wherein obtaining coordinates of pixel points on at least three hypotenuses around the predetermined location point comprises:
acquiring coordinates of pixel points on four bevel edges around a preset position point;
after the coordinate to the pixel on every hypotenuse carries out straight line fitting to obtain the fitting straight line that corresponds the hypotenuse place, still include: determining a fitting straight line closest to the preset position point to obtain a target fitting straight line;
the calculating the coordinates of the intersection points among the at least three fitting straight lines and the coordinates of the center point of the at least one bevel edge according to the coordinates of the intersection points comprises: calculating the coordinates of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line; calculating the coordinate of the center point of the bevel edge on the target fitting straight line according to the coordinate of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line;
calculating a spatial frequency response based on the coordinates of the center point of the one oblique side, including: and calculating the spatial frequency response based on the coordinates of the center point of the hypotenuse on the target fitting straight line.
3. The method of claim 2, wherein the obtaining coordinates of pixel points on four hypotenuses around the predetermined location point comprises:
determining a target area according to the preset position point, and acquiring a brightness average value of the target area;
establishing x y coordinate system with the preset position points as dots, and scanning line pixels in the target area from the preset position points along the positive direction and the negative direction of the y axis until the positive direction and the negative direction of the x axis are scanned to satisfy (P)(i,j)-P0)(P(i,j+1)-P0)<0 until the target pixel point; and
scanning the column pixels in the target area in the positive and negative directions of the x-axis from the predetermined position point until scanning in the positive and negative directions of the y-axis is satisfied (P)(i,j)-P0)(P(i+1,j)-P0)<0 to the target pixel point, wherein P0Representing the mean value of the luminance of the target area, P(i,j)Representing the brightness value, P, of the target pixel(i,j+1)The luminance value of a pixel point adjacent to the target pixel point is represented, i represents the ith row in the positive direction or the negative direction of the y axis from the x axis, and j represents the jth column in the positive direction or the negative direction of the x axis from the y axis;
based on scanned target imagePrime points respectively located on both sides of the x-axis and satisfying (P)(i,j)-P0)(P(i+1,j)-P0)<0, and two sets of target pixels respectively located on both sides of the y-axis and satisfying (P)(i,j)-P0)(P(i,j+1)-P0)<Two sets of target pixel points of 0;
and acquiring coordinates of the four groups of target pixel points, and further acquiring coordinates of pixel points on four bevel edges around the preset position point.
4. The method according to any one of claims 1 to 3, wherein the straight line fitting of the coordinates of the pixel points on each oblique side comprises:
and performing straight line fitting on the coordinates of the pixel points on each bevel edge by using a least square method.
5. The method according to claim 1, wherein there are a plurality of predetermined position points in said checkerboard image, said method further comprising:
and e, repeating the steps b to e until the spatial frequency response corresponding to each preset position point is obtained through calculation, and detecting the definition of the checkerboard image according to the plurality of spatial frequency responses obtained through calculation.
6. An image sharpness detection apparatus, characterized by comprising:
the first acquisition module is used for acquiring a checkerboard image;
a second obtaining module, configured to obtain coordinates of pixel points on at least three oblique edges around a predetermined position point in the checkerboard image, where a target area is determined according to the predetermined position point, a luminance average value of the target area is obtained, the pixel points of the target area are scanned, a pixel point luminance value of the target area is obtained, a plurality of target pixel points meeting a preset condition are determined according to the average luminance value and the luminance value, and coordinates of the plurality of target pixel points are obtained, where the target pixel point coordinates are pixel point coordinates on the oblique edges;
the straight line fitting module is used for performing straight line fitting on the coordinates of the pixel points on each bevel edge to obtain a fitting straight line where the corresponding bevel edge is located, and determining a fitting straight line closest to the preset position point to obtain a target fitting straight line;
the first calculation module is used for calculating the coordinates of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line and calculating the coordinates of the central point of the inclined edge on the target fitting straight line according to the coordinates of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line;
and the second calculation module is used for calculating a spatial frequency response based on the central point coordinate of the target fitting straight line so as to detect the definition of the checkerboard image according to the spatial frequency response.
7. The apparatus of claim 6, further comprising a determination module;
the first acquisition module is specifically used for acquiring coordinates of pixel points on four bevel edges around the preset position point;
the determining module is used for determining a fitting straight line closest to the preset position point to obtain a target fitting straight line;
the first calculation module is specifically used for calculating coordinates of an intersection point between the target fitting straight line and two fitting straight lines intersected with the target fitting straight line; calculating the coordinate of the center point of the bevel edge on the target fitting straight line according to the coordinate of the intersection point between the target fitting straight line and the two fitting straight lines intersected with the target fitting straight line;
the second calculation module is specifically configured to calculate a spatial frequency response based on the coordinates of the center point of the hypotenuse on the target-fitted straight line.
8. The apparatus of claim 7, wherein the first obtaining module is specifically configured to:
determining a target area according to the preset position point, and acquiring a brightness average value of the target area;
establishing x y coordinate system with the preset position points as dots, and scanning line pixels in the target area from the preset position points along the positive direction and the negative direction of the y axis until the positive direction and the negative direction of the x axis are scanned to satisfy (P)(i,j)-P0)(P(i,j+1)-P0)<0 until the target pixel point; and
scanning the column pixels in the target area in the positive and negative directions of the x-axis from the predetermined position point until scanning in the positive and negative directions of the y-axis is satisfied (P)(i,j)-P0)(P(i+1,j)-P0)<0 to the target pixel point, wherein P0Representing the mean value of the luminance of the target area, P(i,j)Representing the brightness value, P, of the target pixel(i,j+1)The luminance value of a pixel point adjacent to the target pixel point is represented, i represents the ith row in the positive direction or the negative direction of the y axis from the x axis, and j represents the jth column in the positive direction or the negative direction of the x axis from the y axis;
according to the scanned target pixel points, determining that the pixel points are respectively positioned at two sides of the x axis and satisfy (P)(i,j)-P0)(P(i+1,j)-P0)<0, and two sets of target pixels respectively located on both sides of the y-axis and satisfying (P)(i,j)-P0)(P(i,j+1)-P0)<Two sets of target pixel points of 0;
and acquiring coordinates of the four groups of target pixel points, and further acquiring coordinates of pixel points on four bevel edges around the preset position point.
9. The apparatus according to any one of claims 6-8, wherein the line fitting module is configured to perform line fitting on the coordinates of the pixel points on each of the oblique sides by using a least square method.
10. The apparatus according to claim 6, wherein there are a plurality of predetermined positions in said checkerboard image, said apparatus further comprising a repeat execution module;
the repeated execution module is used for controlling the second acquisition module, the straight line fitting module, the first calculation module and the second calculation module to repeatedly execute corresponding steps until a spatial frequency response corresponding to each preset position point is obtained, so that the definition of the checkerboard image is detected according to a plurality of spatial frequency responses obtained through calculation.
11. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the method of image sharpness detection according to any one of claims 1 to 5.
12. An electronic device comprising a memory and a processor, wherein the memory is configured to store instructions and data, and the instructions are adapted to be loaded by the processor to perform the steps of the image sharpness detection method according to any one of claims 1 to 5.
CN201711466320.6A 2017-12-28 2017-12-28 Image definition detection method and device, storage medium and electronic equipment Expired - Fee Related CN108074237B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711466320.6A CN108074237B (en) 2017-12-28 2017-12-28 Image definition detection method and device, storage medium and electronic equipment
PCT/CN2018/114974 WO2019128495A1 (en) 2017-12-28 2018-11-12 Method and apparatus for detecting image resolution, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711466320.6A CN108074237B (en) 2017-12-28 2017-12-28 Image definition detection method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108074237A CN108074237A (en) 2018-05-25
CN108074237B true CN108074237B (en) 2020-08-14

Family

ID=62156017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711466320.6A Expired - Fee Related CN108074237B (en) 2017-12-28 2017-12-28 Image definition detection method and device, storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN108074237B (en)
WO (1) WO2019128495A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108074237B (en) * 2017-12-28 2020-08-14 Oppo广东移动通信有限公司 Image definition detection method and device, storage medium and electronic equipment
CN110035279B (en) * 2019-04-08 2020-11-10 信利光电股份有限公司 Method and device for searching SFR test area in checkerboard test pattern
CN110276744B (en) * 2019-05-15 2021-10-26 北京航空航天大学 Image splicing quality evaluation method and device
CN110827289B (en) * 2019-10-08 2022-06-14 歌尔光学科技有限公司 Method and device for extracting target image in projector definition test
CN110827288B (en) * 2019-10-08 2022-08-12 歌尔光学科技有限公司 Method and device for extracting target image in projector definition test
CN113873223B (en) * 2021-09-03 2023-07-21 大连中科创达软件有限公司 Method, device, equipment and storage medium for determining definition of camera

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104240227A (en) * 2013-06-24 2014-12-24 富泰华工业(深圳)有限公司 Image analysis system and method
CN106127775A (en) * 2016-06-28 2016-11-16 乐视控股(北京)有限公司 Measurement for Digital Image Definition and device
CN106600653A (en) * 2016-12-30 2017-04-26 亿嘉和科技股份有限公司 Calibration method for optical center of zooming camera
CN107493469A (en) * 2017-08-10 2017-12-19 歌尔科技有限公司 A kind of method and device of the area-of-interest of determination SFR test cards

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105809686B (en) * 2016-03-08 2019-02-19 上海敏达网络科技有限公司 The method of image definition detection is realized in computer system
CN108074237B (en) * 2017-12-28 2020-08-14 Oppo广东移动通信有限公司 Image definition detection method and device, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104240227A (en) * 2013-06-24 2014-12-24 富泰华工业(深圳)有限公司 Image analysis system and method
CN106127775A (en) * 2016-06-28 2016-11-16 乐视控股(北京)有限公司 Measurement for Digital Image Definition and device
CN106600653A (en) * 2016-12-30 2017-04-26 亿嘉和科技股份有限公司 Calibration method for optical center of zooming camera
CN107493469A (en) * 2017-08-10 2017-12-19 歌尔科技有限公司 A kind of method and device of the area-of-interest of determination SFR test cards

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Real-time object detection using segmented and grayscale images;J.Fasola 等;《Proceedings 2006 IEEE International Conference on Robotics and Automation, 2006. ICRA 2006.》;IEEE;20060519;第4088-4093页 *

Also Published As

Publication number Publication date
WO2019128495A1 (en) 2019-07-04
CN108074237A (en) 2018-05-25

Similar Documents

Publication Publication Date Title
CN108074237B (en) Image definition detection method and device, storage medium and electronic equipment
CN108986152B (en) Foreign matter detection method and device based on difference image
JP5773436B2 (en) Information terminal equipment
JP2007129709A (en) Method for calibrating imaging device, method for calibrating imaging system including arrangement of imaging devices, and imaging system
US20110235898A1 (en) Matching process in three-dimensional registration and computer-readable storage medium storing a program thereof
CN106062824A (en) Edge detection device, edge detection method, and program
CN110473216A (en) The detection method and device of object in a kind of image
CN110458857B (en) Central symmetry primitive detection method and device, electronic equipment and readable storage medium
US9319666B1 (en) Detecting control points for camera calibration
WO2024055531A1 (en) Illuminometer value identification method, electronic device, and storage medium
JP2009146150A (en) Method and device for detecting feature position
JP2009302731A (en) Image processing apparatus, image processing program, image processing method, and electronic device
CN107330905B (en) Image processing method, device and storage medium
CN112308933B (en) Method and device for calibrating camera internal reference and computer storage medium
CN113128499B (en) Vibration testing method for visual imaging device, computer device and storage medium
CN111028264B (en) Rotation robust three-dimensional object detection optimization method and device
CN115731256A (en) Vertex coordinate detection method, device, equipment and storage medium
US20200167005A1 (en) Recognition device and recognition method
WO2020107196A1 (en) Photographing quality evaluation method and apparatus for photographing apparatus, and terminal device
CN115147413B (en) Ghost image detection method, device, equipment and readable storage medium
CN110211534B (en) Image display method, image display device, controller and storage medium
CN111091513B (en) Image processing method, device, computer readable storage medium and electronic equipment
US20240037976A1 (en) Information processing device, information processing method, and computer-readable recording medium
CN114119609B (en) Method, device and equipment for detecting image stain concentration and storage medium
US10388031B2 (en) Method and system for estimating epipolar geometry

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200814