Imaging clarity detection method and related equipment
By calculating the spatial frequency response value and combining the preset detection direction and sector-shaped area interception operation, the problem that traditional detection methods cannot fully reflect the performance of the camera module is solved, and more accurate imaging clarity detection is achieved.
Patent Information
- Application Number
- CN202411888576.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-04
AI Technical Summary
Traditional imaging clarity detection methods cannot fully reflect the performance of the camera module under different working conditions, and cannot accurately capture the true clarity of the image in complex backgrounds or changing environments.
By calculating the spatial frequency response value, combined with the preset detection direction and sector-shaped area interception operation, the imaging clarity and resolution capabilities of the camera module are accurately quantified.
It improves the comprehensiveness, accuracy and efficiency of detection, and can more accurately reflect the imaging clarity of the camera module, especially the resolution differences in different directions.
Smart Images

Figure CN119766991A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and more specifically, to an imaging clarity detection method and related equipment. Background Art
[0002] With the rapid development of digital image processing technology, the performance evaluation of imaging equipment has become increasingly important, especially in high-demand application scenarios such as smartphones, surveillance equipment and drones. Image clarity is one of the key indicators for evaluating the performance of camera modules, which directly affects the quality of the image and the subsequent processing effect. Traditional imaging clarity detection methods usually rely on simple image analysis technology and may not be able to fully reflect the performance of camera modules under different working conditions.
[0003] At present, the detection of imaging clarity mostly relies on fixed standard test patterns, such as checkerboard or stripe patterns; however, these methods have limitations and often cannot accurately capture the true clarity of images in complex backgrounds or changing environments. In addition, traditional methods usually ignore the impact of external factors such as angle and lighting on imaging effects when processing images, resulting in insufficient reliability of detection results. In this case, the clarity assessment based on simple image features cannot provide sufficient details, affecting design optimization and performance improvement. In other words, there is a technical problem in the relevant technology that the selection and analysis methods of the detection area lack specificity and it is difficult to meet the strict requirements for imaging quality in practical applications. Summary of the invention
[0004] A series of simplified concepts are introduced in the invention summary of this application, which will be further described in detail in the detailed description. The invention summary of this application does not mean to attempt to define the key features and essential technical features of the technical solution claimed for protection, nor does it mean to attempt to determine the scope of protection of the technical solution claimed for protection.
[0005] The imaging clarity detection method and related device provided in the present application can accurately quantify the imaging clarity and resolution capability of the camera module by calculating the spatial frequency response value in combination with the preset detection direction and fan-shaped area interception operation, thereby improving the comprehensiveness, accuracy and efficiency of the detection.
[0006] In a first aspect, the present application provides an imaging clarity detection method, comprising: imaging a dot test target plate through a camera module to be tested to obtain a target image to be tested; performing a fan-shaped area interception operation on the dot to be tested in the target image to be tested based on a preset detection direction to obtain a dot fan-shaped area; calculating a spatial frequency response value based on the dot fan-shaped area to obtain a basic spatial frequency response value of the dot to be tested in the preset detection direction; determining a target spatial frequency response value of the target image to be tested based on the basic spatial frequency response value; and determining the imaging clarity of the camera module to be tested based on the target spatial frequency response value.
[0007] In a feasible implementation, the fan-shaped area interception operation is performed on the circle dot to be measured in the target image to be measured based on a preset detection direction to obtain the circle dot fan-shaped area, including: taking the center of the circle dot to be measured as the corner point of the rectangle, and taking the preset detection direction as the diagonal direction of the rectangle to construct a detection rectangular area; performing fan-shaped interception on the detection rectangular area to obtain the circle dot fan-shaped area, wherein the arc spacing of the circle dot fan-shaped area is equal to the radius length of the circle dot to be measured, and the middle arc of the circle dot fan-shaped area coincides with the outer circular edge of the circle dot to be measured.
[0008] In a feasible implementation, the detection rectangular area is constructed with the center of the circle to be measured as the corner point of the rectangle and the preset detection direction as the diagonal direction of the rectangle, including: constructing an isosceles triangle area with the center of the circle to be measured as the vertex, the preset detection direction as the axis of symmetry, and the diameter of the circle to be measured as the isosceles side length; constructing a detection rectangular area with the center of the circle to be measured as the corner point of the rectangle and the two bottom corner points of the isosceles triangle area as contact points on the opposite sides of the rectangle, wherein the opposite sides of the rectangle are two sides of the detection rectangle that are not in contact with the corner points of the target rectangle.
[0009] In a feasible implementation, the calculation of the spatial frequency response value based on the dot fan-shaped area to obtain the basic spatial frequency response value of the dot to be measured in the preset detection direction includes: fitting an edge spread function curve based on the middle arc of the dot fan-shaped area; differentiating and convolving the edge spread function curve to obtain a line spread function curve; and performing Fourier transform on the line spread function curve to obtain the basic spatial frequency response value of the dot to be measured in the preset detection direction.
[0010] In a feasible implementation, the edge extension function curve is fitted based on the middle arc of the dot fan-shaped area, including: taking the symmetry axis of the dot fan-shaped area as the horizontal axis, taking the long arc direction of the dot fan-shaped area as the positive direction of the horizontal axis, and taking the center of the circle to be measured as the coordinate origin, to construct a detection rectangular coordinate system; based on the position of the middle arc in the detection rectangular coordinate system, a target quadratic curve is fitted; based on the target quadratic curve, the dot fan-shaped area is super-sampled to obtain an edge extension function curve.
[0011] In a feasible implementation, before performing a fan-shaped area interception operation on the dots to be tested in the target image to be tested based on a preset detection direction, the method further includes: determining a point at a preset proportional position of a line connecting the intersection of diagonal lines in the target image to be tested and a corner point of the image as a field of view point; and determining N foreground dots in the target image to be tested that are closer to the field of view point as the dots to be tested, wherein N is a positive integer greater than or equal to 2.
[0012] In a feasible implementation, after determining the N foreground dots that are closer to the field of view point in the target image to be tested as the dots to be tested, the method further includes: when the field of view point coincides with the intersection of the diagonal lines, determining the orthogonal direction as the preset detection direction of the dots to be tested in the target dot group; when the field of view point does not coincide with the intersection of the diagonal lines, determining the preset detection direction of the dots to be tested according to the relative position of the center of the dots to be tested in the target dot group and the intersection of the diagonal lines.
[0013] In a second aspect, the present application also provides an imaging clarity detection device, comprising: a module imaging unit, used to image a dot test target plate through a camera module to be tested to obtain a target image to be tested; an area capture unit, used to perform a fan-shaped area capture operation on the dot to be tested in the target image to be tested based on a preset detection direction to obtain a dot fan-shaped area; a response value calculation unit, used to calculate a spatial frequency response value based on the dot fan-shaped area to obtain a basic spatial frequency response value of the dot to be tested in the preset detection direction; the response value calculation unit is also used to determine a target spatial frequency response value of the target image to be tested based on the basic spatial frequency response value; a clarity determination unit, used to determine the imaging clarity of the camera module to be tested based on the target spatial frequency response value.
[0014] In a third aspect, the present application further provides an electronic device, comprising: a memory and a processor, wherein the processor is configured to implement the steps of the imaging clarity detection method described in the first aspect when executing a computer program stored in the memory.
[0015] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the imaging clarity detection method described in the first aspect.
[0016] In a fifth aspect, the present application also provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implements the imaging clarity detection method provided in the embodiment of the present application.
[0017] In summary, this application characterizes the imaging ability of the image at different frequencies in a quantitative form by calculating the spatial frequency response value of the dot to be tested in the target image, which can more accurately reflect the imaging clarity of the camera module, especially the description of detail resolution; and introduces the concept of preset detection direction, which can detect the resolution difference of the image in different directions in a targeted manner to ensure a comprehensive evaluation of the camera performance; adopting the fan-shaped area interception operation and focusing on the specific area of the dot test target plate can effectively eliminate the interference of the overall image non-uniformity (such as edge distortion or uneven illumination), thereby improving the accuracy and robustness of the clarity detection, making the evaluation of the imaging clarity more accurate; by extracting the basic spatial frequency response value and integrating it into the target spatial frequency response value, the step-by-step layered calculation process can improve the detection efficiency. In summary, the imaging clarity detection method provided by this application accurately quantifies the imaging clarity and resolution of the camera module by calculating the spatial frequency response value combined with the preset detection direction and the fan-shaped area interception operation, thereby improving the comprehensiveness, accuracy and efficiency of the detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present specification. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0019] Figure 1 A schematic diagram of a flow chart of an imaging clarity detection method provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of a sample target image to be tested provided in an embodiment of the present application;
[0021] Figure 3 A sample schematic diagram of the position of the isosceles triangle area corresponding to the circle to be tested provided in the embodiment of the present application;
[0022] Figure 4 A sample schematic diagram of the position of the detection rectangular area corresponding to the circle to be detected provided in the embodiment of the present application;
[0023] Figure 5 A sample schematic diagram of a detection rectangular area corresponding to a circle to be detected provided in an embodiment of the present application;
[0024] Figure 6 A sample schematic diagram of a dot fan-shaped area provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of an edge spread function curve provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of a line spread function curve provided in an embodiment of the present application;
[0027] Fig. 9 A schematic diagram of a basic spatial frequency response value provided in an embodiment of the present application;
[0028] Fig.10 A schematic diagram of the position of a dot sector area in a detection rectangular coordinate system provided in an embodiment of the present application;
[0029] Fig.11 A schematic diagram of all the dots to be tested in the target image to be tested provided in an embodiment of the present application;
[0030] Fig.12 A schematic diagram of a point to be tested and a preset detection direction provided in an embodiment of the present application;
[0031] Fig.13 A schematic diagram of the structure of an imaging clarity detection device provided in an embodiment of the present application;
[0032] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "is" and "has" and any variations thereof involved in the present application are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] The term "module" or "unit" in this application refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. In the following description, it is related to "some embodiments", which describes a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0036] See also Figure 1 , Figure 1 1 is a flow chart of an imaging clarity detection method provided in an embodiment of the present application. The method may specifically include the following steps 101 to 105:
[0037] Step 101, imaging a dot test target plate through a camera module to obtain a target image to be tested;
[0038] Specifically, the camera module to be tested refers to a camera component that needs to be tested for imaging clarity, which usually includes a lens, an image sensor, a signal processing circuit, etc., and is the core part of the camera system; the dot test target is a target used for imaging clarity testing in the embodiment of the present application, on which a regular dot pattern is printed. These dots usually have precise size, shape and arrangement, and are used to evaluate the performance of the imaging system, such as resolution, contrast and clarity; the target image to be tested refers to an image obtained by imaging the dot test target through the camera module to be tested. This image contains the dot pattern of the dot test target and will be used for subsequent analysis and processing to evaluate the imaging clarity of the camera module; Figure 2 A sample of the target image to be tested is shown.
[0039] Through the implementation of step 101, it is ensured that high-quality image data is obtained, which provides a necessary basis for subsequent analysis and ensures the accuracy of the detection results.
[0040] Step 102, performing a sector-shaped region interception operation on the circular dot to be tested in the target image to be tested based on a preset detection direction to obtain a circular dot sector-shaped region;
[0041] Specifically, the preset detection direction refers to a specific direction pre-defined in the imaging clarity detection method for analyzing the image, which direction can be horizontal, vertical, or any angle between these two extremes; the dot to be tested refers to one or more dots selected as analysis objects in the target image to be tested, which come from the dot test target plate and have clear edges and recognizable shapes in the image; the dot fan-shaped area refers to a fan-shaped area cut out from the dot to be tested, which is centered on the dot to be tested and expands along the preset detection direction to form a fan. The dot fan-shaped area contains part or all of the outline of the dot and the image information around it, and is the basis for calculating the spatial frequency response value; the fan-shaped area interception operation refers to an image processing step performed on the dot to be tested in the target image to be tested, that is, a fan-shaped area is intercepted according to the preset detection direction.
[0042] By implementing step 102, it is possible to focus on the most important area in the image and reduce the interference of irrelevant information, thereby improving the efficiency and accuracy of subsequent analysis.
[0043] Step 103, calculating the spatial frequency response value based on the dot fan-shaped area to obtain the basic spatial frequency response value of the dot to be tested in a preset detection direction;
[0044] Specifically, the spatial frequency response (Spatial Frequency Response, SFR) is an indicator to measure the responsiveness of an imaging system at different spatial frequencies (i.e., the density of details in the image); the spatial frequency response value can reflect the ability of the camera module under test to capture image details, that is, to what extent the camera module under test can clearly present image details of different frequencies; the basic spatial frequency response value is the most direct quantification of the imaging performance of the test point in a specific direction.
[0045] By implementing step 103, the frequency response is accurately calculated, which helps to identify the performance characteristics of the imaging system and provides a quantitative basis for the evaluation of image clarity.
[0046] Step 104, determining a target spatial frequency response value of the target image to be tested according to the basic spatial frequency response value;
[0047] Specifically, based on the basic spatial frequency response values in different detection directions, the overall spatial frequency response value of the target image can be calculated through weighted averaging or other combination methods. The overall spatial frequency response value can comprehensively reflect the imaging performance of the camera in all directions, and thus serve as the core indicator of the overall image quality.
[0048] For example, a comprehensive target spatial frequency response value can be calculated by integrating the basic spatial frequency response values of each circle to be tested in the image to be tested in the horizontal and vertical directions, thereby comprehensively evaluating the camera's ability to capture details in multiple directions.
[0049] By implementing step 104, local features can be linked to overall image quality, ensuring a comprehensive evaluation of image clarity, thereby providing a reference for subsequent improvements.
[0050] Step 105, determining the imaging clarity of the camera module to be tested according to the target spatial frequency response value;
[0051] Specifically, by comparing and analyzing the target spatial frequency response value with the preset clarity standard, the imaging clarity level of the camera module to be tested can be obtained; based on the level of imaging clarity, it can be determined whether the camera module to be tested meets the expected imaging requirements, and basic data can be provided for subsequent optimization design.
[0052] Through the implementation of step 105, the evaluated imaging clarity can directly reflect the performance of the camera module, providing a scientific basis for subsequent optimization and adjustment, thereby improving the actual application effect of the imaging device.
[0053] In summary, this application characterizes the imaging ability of the image at different frequencies in a quantitative form by calculating the spatial frequency response value of the dot to be tested in the target image, which can more accurately reflect the imaging clarity of the camera module, especially the description of detail resolution; and introduces the concept of preset detection direction, which can detect the resolution difference of the image in different directions in a targeted manner to ensure a comprehensive evaluation of the camera performance; adopting the fan-shaped area interception operation and focusing on the specific area of the dot test target plate can effectively eliminate the interference of the overall image non-uniformity (such as edge distortion or uneven illumination), thereby improving the accuracy and robustness of the clarity detection, making the evaluation of the imaging clarity more accurate; by extracting the basic spatial frequency response value and integrating it into the target spatial frequency response value, the step-by-step layered calculation process can improve the detection efficiency. In summary, the imaging clarity detection method provided by this application accurately quantifies the imaging clarity and resolution of the camera module by calculating the spatial frequency response value combined with the preset detection direction and the fan-shaped area interception operation, thereby improving the comprehensiveness, accuracy and efficiency of the detection.
[0054] In some embodiments, the aforementioned step 102 may include: constructing a detection rectangular area with the center of the circle to be measured as the corner point of the rectangle and the preset detection direction as the diagonal direction of the rectangle; performing a sector-shaped interception on the detection rectangular area to obtain a circle dot sector-shaped area, wherein the arc spacing of the circle dot sector-shaped area is equal to the radius length of the circle to be measured, and the middle arc of the circle dot sector-shaped area coincides with the outer circular edge of the circle to be measured.
[0055] Specifically, the rectangular corner point is one of the four corners of the detection rectangular area, the diagonal direction of the rectangle is the straight line direction from the above-mentioned rectangular corner point of the detection rectangular area through the center of the rectangle to the other end corner point, and the detection rectangular area refers to a rectangular area constructed for analysis purposes in imaging clarity detection. The arc spacing refers to the distance from the center of the circle to the edge of the sector in the dot sector area, the middle arc refers to the arc in the central part of the dot sector area, and the outer circle edge refers to the edge of the dot to be tested. In the embodiment of the present application, the central arc of the dot sector area extends just along the edge of the dot, ensuring that the sector area covers the entire width of the dot.
[0056] Through the implementation of the above-mentioned embodiments, the center of the circle to be measured is used as the corner point of the rectangle, and the preset detection direction is used as the diagonal direction of the rectangle, ensuring that the detection rectangular area can accurately cover the circle to be measured, so that the subsequent fan-shaped interception is more scientific and reasonable, and the accuracy of the detection area is improved; after the detection rectangular area is fan-shaped intercepted, the arc spacing of the obtained circle dot fan-shaped area is equal to the radius length of the circle to be measured, ensuring the standardization and consistency of the intercepted area, and helping to eliminate the measurement error caused by inconsistent fan-shaped area size; by ensuring that the middle arc of the circle dot fan-shaped area coincides with the outer circular edge of the circle to be measured, clearer edge information can be provided.
[0057] In some embodiments, the aforementioned construction of a detection rectangular area with the center of the circle to be measured as the corner point of the rectangle and the preset detection direction as the diagonal direction of the rectangle can include: constructing a detection isosceles triangle area with the center of the circle to be measured as the vertex, the preset detection direction as the axis of symmetry, and the diameter of the circle to be measured as the isosceles side length; constructing a detection rectangular area with the center of the circle to be measured as the corner point of the rectangle and the two bottom corner points of the detection isosceles triangle area as contact points on the opposite sides of the rectangle, wherein the opposite sides of the rectangle are two sides of the detection rectangle that are not in contact with the corner points of the target rectangle.
[0058] Specifically, the detection isosceles triangle area refers to an isosceles triangle area constructed during the imaging clarity detection process, which is used to assist in determining the detection rectangular area; the center of the circle to be tested is used as the vertex of the isosceles triangle, and the preset detection direction is used as the symmetry axis of the isosceles triangle, that is, the base of the isosceles triangle will be perpendicular to the preset detection direction, and the diameter of the circle to be tested is used as the length of the two isosceles sides of the isosceles triangle. The detection rectangular area refers to a rectangular area constructed on the basis of the isosceles triangle, which is used to finally perform a fan-shaped interception operation to analyze the imaging clarity; the center of the circle to be tested is used as a corner point of the detection rectangular area, and the two corner points of the base of the isosceles triangle are used as contact points on the opposite sides of the detection rectangular area. The opposite sides of the rectangle are the two sides of the detection rectangular area that are not in contact with the corner point of the rectangle (i.e., the center of the circle).
[0059] For example, Figure 3The directions of the four red line segments starting from the center of a circle to be tested are the preset detection directions. Figure 3 The direction of the blue line in the middle shows the direction of the geometric line between the center of the circle to be tested and the intersection of the diagonal lines of the target image to be tested (i.e., the center point of the image), reflecting the relative positions of the two in the image space. Figure 3 The gray isosceles triangle area shown in the figure is the detection isosceles triangle area corresponding to a preset detection direction, and the vertex angle of the detection isosceles triangle area is 45 degrees; Figure 4 The rectangular area with white frame lines shown in the figure is the detection rectangular area; Figure 5 A captured image of the detection rectangular area is shown; Figure 6 Shown with Figure 5 The detection rectangular area shown corresponds to the dot fan-shaped area, where R represents the radius length of the dot to be detected.
[0060] Through the implementation of the above embodiments, an isosceles triangle area with the center of the circle to be tested as the vertex is constructed. Combined with the preset detection direction as the axis of symmetry, the shape and size of the detection area can be flexibly adjusted to adapt to different dot sizes and image features, thereby improving the adaptability of detection. When constructing a detection rectangular area, the bottom corner points of the isosceles triangle are used as contact points, which effectively utilizes the space of the isosceles triangle area and avoids waste of resources due to unreasonable area design.
[0061] In some embodiments, the aforementioned step 103 may include: fitting an edge spread function curve based on the middle arc of the dot fan-shaped area; performing differentiation and convolution processing on the edge spread function curve to obtain a line spread function curve; performing Fourier transform on the line spread function curve to obtain the basic spatial frequency response value of the dot to be tested in a preset detection direction.
[0062] Specifically, the edge spread function (ESF) is a function that describes the response of the camera module to the edge in the image, showing how an ideal edge in the image is extended during the actual imaging process. The line spread function (LSF) is the derivative of the edge spread function, which describes the response of the camera module to an infinitely thin line and reflects the point spread characteristics of the camera module in the spatial domain. The basic spatial frequency response value is a quantitative indicator obtained by analyzing the imaging characteristics of the circle to be tested in the preset detection direction. This value is obtained by Fourier transforming the line spread function curve.
[0063] For example, Figure 7The figure shows the edge spread function (ESF) curve obtained by fitting based on the middle arc of the dot fan-shaped area, wherein the x-axis represents the distance from the point to the edge in the fan-shaped area, and the y-axis represents the corresponding ESF value; Figure 8 The line spread function (LSF) curve obtained by differentiating and convolving the edge spread function curve is shown, wherein the x-axis represents the distance from the point to the edge in the fan-shaped area, and the y-axis represents the corresponding LSF value; Fig. 9 The figure shows the basic spatial frequency response value of the circle to be tested in the preset detection direction obtained after Fourier transform of the line spread function curve, wherein the x-axis represents the spatial frequency and the y-axis represents the response intensity.
[0064] Through the implementation of the above-mentioned embodiment, the edge expansion function curve is fitted based on the middle arc of the dot fan-shaped area, which can more accurately capture the edge features of the dot to be tested, provide high-quality basic data for subsequent frequency response calculations, and help improve the reliability of the final analysis results; the comprehensive use of fitting, differentiation, convolution and Fourier transform steps makes the calculation process of the basic spatial frequency response value more accurate, which can effectively reduce the errors introduced by noise or other interference, and improve the overall detection accuracy of imaging clarity.
[0065] In some embodiments, the aforementioned fitting of the edge extension function curve based on the middle arc of the dot fan-shaped area may include: taking the symmetry axis of the dot fan-shaped area as the horizontal axis, taking the long arc direction of the dot fan-shaped area as the positive direction of the horizontal axis, and taking the center of the circle to be measured as the coordinate origin, to construct a detection rectangular coordinate system; based on the position of the middle arc in the detection rectangular coordinate system, fitting a target quadratic curve; and supersampling the dot fan-shaped area based on the target quadratic curve to obtain the edge extension function curve.
[0066] Specifically, the detection rectangular coordinate system is a coordinate system used to analyze and describe the characteristics of the dot fan-shaped area. In this coordinate system, the symmetry axis of the dot fan-shaped area is used as the horizontal axis, and this symmetry axis is consistent with the preset detection direction. The long arc direction of the dot fan-shaped area is used as the positive direction of the horizontal axis, and the center of the circle to be measured is used as the coordinate origin. The target quadratic curve refers to a curve obtained by fitting the position information of the middle arc of the dot fan-shaped area in the detection rectangular coordinate system. The edge extension function curve is obtained by oversampling the target quadratic curve, which describes the intensity distribution of an ideal edge in the image during the actual imaging process. Oversampling refers to measuring more sampling points in a smaller spatial range to improve the accuracy of the curve.
[0067] For example, Fig.10 The position of the dot fan-shaped area in the detection rectangular coordinate system is shown.
[0068] Through the implementation of the above embodiments, a detection rectangular coordinate system is established with the symmetry axis of the dot fan-shaped area as the horizontal axis, the long arc direction as the positive direction, and the center of the circle as the coordinate origin, which optimizes the fitting process of the edge extension function curve. It can not only accurately capture the shape and characteristics of the middle arc and improve the accuracy of fitting, but also enhance the data resolution through oversampling of the target quadratic curve, making the description of the edge features more detailed.
[0069] In some embodiments, before the aforementioned fan-shaped area interception operation is performed on the dots to be tested in the target image to be tested based on a preset detection direction, the method may further include: determining the points at a preset proportional position of the lines connecting the intersection of the diagonal lines in the target image to be tested and the corner points of the image as the field of view points; determining N foreground dots in the target image to be tested that are closer to the field of view points as the dots to be tested, where N is a positive integer greater than or equal to 2.
[0070] Specifically, the preset proportional position refers to a specific position determined according to a certain ratio on the line between the diagonal intersection point (i.e., the center point of the image) and the image corner point (one of the four corners of the image) in the target image to be tested. This ratio is set in advance and is used to locate the field of view point along the diagonal direction from the center point of the image. This ratio can be 0%, 25%, 50%, 0.8 or 2 / 3, etc. The field of view point refers to a point determined at a preset proportional position on the line connecting the diagonal intersection point and the image corner point in the target image to be tested. The circular point to be tested refers to a specific number of foreground circular points that are closer to the field of view point in the target image to be tested. These circular points will be selected as objects for the fan-shaped area interception operation and subsequent imaging clarity analysis; N is a positive integer greater than or equal to 2, indicating the number of circular points to be tested that are determined as the field of view point in the target image to be tested. If N=4, then the four circular points closest to the field of view point can be selected as the circular points to be tested.
[0071] For example, Fig.11 The dots with yellow center and green outer circle are all the dots to be tested in the target image to be tested, and the purple dots are all the field of view points in the target image to be tested.
[0072] Through the implementation of the above-mentioned embodiment, the field of view point and N foreground dots close to the field of view point are determined before the fan-shaped area interception operation, thereby enhancing the accuracy of selecting the dots to be tested; the field of view point is set to a point at a preset proportional position of the intersection of the diagonal lines and the line connecting the image corner points, thereby ensuring that the selected dots can represent the most relevant feature areas in the image, thereby improving the effectiveness and reliability of subsequent imaging clarity detection, providing a more accurate basis for imaging clarity detection, and enabling imaging analysis to better reflect the actual image quality.
[0073] In some embodiments, after determining the N foreground dots that are closer to the field of view point in the aforementioned target image to be tested as the dots to be tested, the method may also include: when the field of view point coincides with the intersection of the diagonals, determining the orthogonal direction as the preset detection direction of the dots to be tested in the target dot group; when the field of view point does not coincide with the intersection of the diagonals, determining the preset detection direction of the dots to be tested according to the relative position of the center of the dots to be tested in the target dot group and the intersection of the diagonals.
[0074] Specifically, if the field of view point and the diagonal intersection point coincide, then the preset detection direction of the corresponding point to be measured is at least one default orthogonal direction. For example, the horizontal left or vertical upward direction can be selected as the preset detection direction. When the field of view point and the diagonal intersection point do not coincide, the preset detection direction will be dynamically determined according to the positional relationship of the points, and multiple directions perpendicular or parallel to the relative position are selected based on the relative position of the center of the point to be measured and the diagonal intersection point. For example, if the center of the point to be measured is located 45 degrees to the upper left of the diagonal intersection point, the preset detection direction can be set to 45 degrees to the upper left, 45 degrees to the lower left, 45 degrees to the upper right, and 45 degrees to the lower right, so that the preset detection direction of the point to be measured can be closely corresponding to the image structure, thereby improving the effectiveness and accuracy of the detection.
[0075] The identifiers of the four preset detection directions of each circle can be: outer_tan (outer tangential), inner_tan (inner tangential), cw_sag (clockwise sagittal), ccw_sag (counter-clockwise sagittal), such as Fig.12 As shown in the figure, each field of view point corresponds to four test points, which are numbered 1, 2, 3, and 4. The basic spatial frequency response values of the test point numbered 1 in the four preset detection directions are 143, 323, 53, and 233, respectively. Finally, the comprehensive SFR value of the corresponding direction needs to be calculated according to the distance weight. Taking the 0.8 upper left field of view point (LT, Left Top) as an example, the position of this field of view point is as follows: Fig.12 In the purple mark, the distances from the view point to the centers of the four test points are d1, d2, d3, and d4 respectively. The basic spatial frequency response values of the four test points in the outer_tan direction are sfr1, sfr2, sfr3, and sfr4 respectively. The calculation formula for the comprehensive spatial frequency response value of the view point in the outer_tan direction is:
[0076] 0.8_LT_outer_tan_SFR=d1 / (d1+d2+d3+d4)×sfr1+d2 / (d1+d2+d3+d4)×sfr2+d3 / (d1+d2+d3+d4)×sfr3+d4 / (d1+d2+d3+d4)×sfr4
[0077] Wherein, 0.8_LT_outer_tan_SFR represents the comprehensive spatial frequency response value in the outer_tan (outer tangent) direction of the field of view point at the 0.8 position of the upper left (Left Top, LT). According to this formula, the spatial frequency response values of all field of view points in all preset detection directions are calculated, and then the target spatial frequency response value of the target image to be tested can be calculated.
[0078] Through the implementation of the above embodiments, the preset detection direction of the circle to be measured is determined according to the relative position of the field of view point and the intersection of the diagonals, thereby further improving the accuracy of imaging clarity detection; when the field of view point coincides with the intersection of the diagonals, the orthogonal direction is clarified to ensure the consistency of detection; and when the two do not coincide, the detection direction is flexibly adjusted according to the relative position of the center of the circle and the intersection, so that the method can adapt to different image layouts and features, thereby ensuring the reliability and accuracy of the final detection results.
[0079] Furthermore, as an implementation of the aforementioned method embodiment, the present application also provides an imaging clarity detection device for implementing the aforementioned method embodiment. The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, the present imaging clarity detection device embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in the present application embodiment can correspond to and implement all the contents of the aforementioned method embodiment. Fig.13 As shown, the imaging clarity detection device 20 includes: a module imaging unit 201, a region interception unit 202, a response value calculation unit 203, a response value calculation unit 204 and a clarity determination unit 205, wherein the module imaging unit 201 is used to image the dot test target plate through the camera module to be tested to obtain the target image to be tested; the region interception unit 202 is used to perform a fan-shaped region interception operation on the dot to be tested in the target image to be tested based on a preset detection direction to obtain the dot fan-shaped region; the response value calculation unit 203 is used to calculate the spatial frequency response value based on the dot fan-shaped region to obtain the basic spatial frequency response value of the dot to be tested in the preset detection direction; the response value calculation unit 203 is also used to determine the target spatial frequency response value of the target image to be tested according to the basic spatial frequency response value; the clarity determination unit 204 is used to determine the imaging clarity of the camera module to be tested according to the target spatial frequency response value.
[0080] In some embodiments, the area interception unit 202 is also used to construct a detection rectangular area with the center of the circle to be measured as the corner point of the rectangle and the preset detection direction as the diagonal direction of the rectangle; the detection rectangular area is sector-intercepted to obtain a circle fan-shaped area, wherein the arc spacing of the circle fan-shaped area is equal to the radius length of the circle to be measured, and the middle arc of the circle fan-shaped area coincides with the outer circular edge of the circle to be measured.
[0081] In some embodiments, the area capture unit 202 is also used to construct an isosceles triangle area for detection with the center of the circle to be measured as the vertex, the preset detection direction as the axis of symmetry, and the diameter of the circle to be measured as the isosceles side length; and to construct a detection rectangular area with the center of the circle to be measured as the corner point of the rectangle and the two bottom corner points of the isosceles triangle area for detection as the contact points on the opposite sides of the rectangle, wherein the opposite sides of the rectangle are the two sides in the detection rectangle that do not touch the corner points of the target rectangle.
[0082] In some embodiments, the response value calculation unit 203 is also used to fit an edge spread function curve based on the middle arc of the dot fan-shaped area; perform differentiation and convolution processing on the edge spread function curve to obtain a line spread function curve; perform Fourier transform on the line spread function curve to obtain the basic spatial frequency response value of the dot to be tested in a preset detection direction.
[0083] In some embodiments, the response value calculation unit 203 is also used to construct a detection rectangular coordinate system with the symmetry axis of the dot fan-shaped area as the horizontal axis, the long arc direction of the dot fan-shaped area as the positive direction of the horizontal axis, and the center of the circle to be measured as the coordinate origin; based on the position of the middle arc in the detection rectangular coordinate system, a target quadratic curve is fitted; based on the target quadratic curve, the dot fan-shaped area is super-sampled to obtain an edge extension function curve.
[0084] In some embodiments, the area capture unit 202 is also used to determine the point at a preset proportional position of the line connecting the intersection of the diagonal lines in the target image to be tested and the image corner point as the field of view point; and determine N foreground dots in the target image to be tested that are closer to the field of view point as the points to be tested, where N is a positive integer greater than or equal to 2.
[0085] In some embodiments, the area capture unit 202 is also used to determine the orthogonal direction as the preset detection direction of the point to be measured in the target point group when the field of view point coincides with the intersection of the diagonal lines; when the field of view point does not coincide with the intersection of the diagonal lines, the preset detection direction of the point to be measured is determined according to the relative position of the center of the point to be measured in the target point group and the intersection of the diagonal lines.
[0086] The present application also provides a computer-readable storage medium, which stores computer-executable instructions or computer programs. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute any step of the imaging clarity detection method provided in the present application.
[0087] In some embodiments, the computer-readable storage medium may be a memory such as RAM, read-only memory (ROM), flash memory, magnetic surface memory, optical disk, or compact disc read-only memory (CD-ROM); or it may be various devices including one or any combination of the above memories.
[0088] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0089] In some embodiments, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0090] In some embodiments, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0091] like Fig.14 As shown, the present application also provides an electronic device 30, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor, and when the processor 320 executes the computer program 311, any step of the above-mentioned imaging clarity detection method is implemented.
[0092] The present application also provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer program or the computer executable instruction from the computer-readable storage medium, and the processor executes the computer program or the computer executable instruction, so that the electronic device performs any step of the imaging clarity detection method described above in the present application.
[0093] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting imaging clarity, characterized in that: include: The dot test target plate is imaged by the camera module to obtain the target image to be tested; Performing a sector-shaped area interception operation on the circular dot to be tested in the target image to be tested based on a preset detection direction to obtain a circular dot sector-shaped area; Calculating the spatial frequency response value based on the dot fan-shaped area to obtain the basic spatial frequency response value of the dot to be tested in the preset detection direction; Determining a target spatial frequency response value of the target image to be tested according to the basic spatial frequency response value; The imaging clarity of the camera module to be tested is determined according to the target spatial frequency response value.
2. The method according to claim 1, characterized in that: The step of performing a sector-shaped region interception operation on the circular dot to be tested in the target image to be tested based on a preset detection direction to obtain a circular dot sector-shaped region includes: The detection rectangular area is constructed by taking the center of the circle to be detected as the corner point of the rectangle and the preset detection direction as the diagonal direction of the rectangle; The detection rectangular area is sector-cut to obtain the dot sector area, wherein the arc spacing of the dot sector area is equal to the radius length of the dot to be measured, and the middle arc of the dot sector area coincides with the outer circular edge of the dot to be measured.
3. The method according to claim 2, characterized in that The method of constructing a detection rectangular area with the center of the circle to be detected as the corner point of the rectangle and the preset detection direction as the diagonal direction of the rectangle includes: An isosceles triangle detection area is constructed with the center of the circle to be detected as the vertex, the preset detection direction as the axis of symmetry, and the diameter of the circle to be detected as the isosceles side length; The detection rectangular area is constructed by taking the center of the circle to be detected as the corner point of the rectangle and the two bottom corner points of the detection isosceles triangle area as the contact points on the opposite sides of the rectangle, wherein the opposite sides of the rectangle are the two sides in the detection rectangle that are not in contact with the corner point of the target rectangle.
4. The method according to claim 1, characterized in that The calculation of the spatial frequency response value based on the dot fan-shaped area to obtain the basic spatial frequency response value of the dot to be tested in the preset detection direction includes: Based on the middle arc of the dot fan-shaped area, an edge spread function curve is obtained by fitting; Performing differentiation and convolution processing on the edge spread function curve to obtain a line spread function curve; The line spread function curve is subjected to Fourier transformation to obtain a basic spatial frequency response value of the circle point to be measured in the preset detection direction.
5. The method according to claim 4, characterized in that The step of fitting an edge expansion function curve based on the middle arc of the dot fan-shaped area includes: The symmetry axis of the dot fan-shaped area is used as the horizontal axis, the long arc direction of the dot fan-shaped area is used as the positive direction of the horizontal axis, and the center of the dot to be measured is used as the coordinate origin to construct a detection rectangular coordinate system; Based on the position of the middle arc in the detection rectangular coordinate system, fitting a target quadratic curve; The dot fan-shaped area is super-sampled based on the target quadratic curve to obtain an edge spread function curve.
6. The method according to any one of claims 1 to 5, characterized in that: Before performing a sector-shaped area interception operation on the circular point to be tested in the target image to be tested based on a preset detection direction, the method further includes: Determine a point at a preset proportional position of a line connecting a diagonal intersection point and an image corner point in the target image to be tested as a field of view point; N foreground dots that are closer to the field of view point in the target image to be tested are determined as the dots to be tested, where N is a positive integer greater than or equal to 2.
7. The method according to claim 6, characterized in that After determining N foreground dots that are closer to the field of view point in the target image to be tested as the dots to be tested, the method further includes: When the field of view point coincides with the intersection of the diagonal lines, the orthogonal direction is determined as a preset detection direction of the circle point to be detected in the target circle point group; When the field of view point does not coincide with the diagonal intersection point, the preset detection direction of the circle point to be measured is determined according to the relative position of the center of the circle point to be measured in the target circle point group and the diagonal intersection point.
8. An imaging clarity detection device, characterized in that: include: The module imaging unit is used to image the dot test target plate through the camera module to obtain the target image to be tested; A region interception unit, configured to perform a sector-shaped region interception operation on the circular dot to be tested in the target image to be tested based on a preset detection direction, so as to obtain a circular dot sector-shaped region; A response value calculation unit, configured to calculate a spatial frequency response value based on the dot fan-shaped area to obtain a basic spatial frequency response value of the dot to be tested in the preset detection direction; The response value calculation unit is further used to determine the target spatial frequency response value of the target image to be tested according to the basic spatial frequency response value; The clarity determination unit is used to determine the imaging clarity of the camera module to be tested according to the target spatial frequency response value.
9. An electronic device, comprising: A memory and a processor, wherein the processor is used to implement the imaging clarity detection method according to any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the imaging clarity detection method according to any one of claims 1 to 7 is implemented.