Image quality automatic detection method, device and storage medium based on image processing

By automatically identifying and sorting test image cards taken by the shooting device based on image processing, the problem of time-consuming and labor-consuming manual classification is solved, and efficient and automatic image sample classification is achieved.

CN116612331BActive Publication Date: 2025-03-28GUANGDONG HONGQIN COMM TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310699575.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2025-03-28
Estimated Expiration
2043-06-13

AI Technical Summary

Technical Problem

In the prior art, manual classification method is used to classify the test image cards taken by the shooting device, which leads to time-consuming and labor-intensive and inefficient.

Method used

Using an image processing method, the test image card type taken by the digital image sample is automatically identified through the image feeding algorithm, and automatically classified according to the type, instead of manual classification.

Benefits of technology

It realizes efficient and high-quality automatic classification of digital image samples, saves labor costs and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116612331B_ABST
    Figure CN116612331B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and discloses an automatic image quality detection method, device and storage medium based on image processing; the automatic image quality detection method comprises: obtaining multiple digital image samples obtained by shooting different test charts by a shooting device; automatically identifying the type of the test chart shot by each digital image sample, and automatically classifying the multiple digital image samples according to the test chart type to obtain at least two groups of image sample sets; analyzing and testing each group of image sample sets according to the corresponding image quality test method to obtain image quality test results. In an embodiment of the present invention, an image feeding algorithm can be used to automatically identify the type of the test chart shot by the digital image sample, and then the digital image sample is automatically classified and processed according to the test chart type. In the entire classification process, efficient and high-quality classification can be achieved without manual intervention, which greatly saves labor costs and improves work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an automatic picture quality detection method, device and storage medium based on image processing. Background Art

[0002] Image quality is one of the important indicators for evaluating the optical performance of a camera. In the evaluation of the shooting quality of a camera, in addition to the subjective perception of the human eye, objective evaluation indicators such as color accuracy, color saturation, clarity, and signal-to-noise ratio are often used to quantitatively analyze the quality of the pictures taken by the camera. To this end, the evaluation of the evaluation indicators of the camera requires the use of test charts.

[0003] Generally, the method and steps for quantitatively analyzing the shooting quality of the shooting device through the test chart are:

[0004] First, a photographing device is used to photograph multiple different types of test charts (such as grayscale charts, 24-color charts, etc.) one by one. Each type of test chart often photographs multiple digital image samples.

[0005] Then, all the digital image samples taken are manually classified according to the type of test chart taken;

[0006] Then, each group of classified digital image samples is sent to the corresponding test module of the test tool to complete various test analyses.

[0007] During this analysis process, since the classification is done manually and the number of images that need to be classified each time is often as high as hundreds, the classification work is time-consuming and labor-intensive. Summary of the invention

[0008] The purpose of the present invention is to provide a method, device and storage medium for automatic detection of picture quality based on image processing, so as to overcome the time-consuming and labor-intensive defects of manual classification in the prior art.

[0009] To achieve this object, the present invention adopts the following technical solutions:

[0010] An automatic picture quality detection method based on image processing, comprising:

[0011] Acquire multiple digital image samples obtained by photographing different test charts by a photographing device;

[0012] Automatically identifying the type of the test chart that each digital image sample is photographed by, and automatically classifying the plurality of digital image samples according to the test chart type to obtain at least two groups of image sample sets;

[0013] Each group of image sample sets is analyzed and tested according to the corresponding image quality test method to obtain the image quality test results.

[0014] Optionally, the test chart is specifically a grayscale card, a 24-color card, a resolution card, a star chart card or a black dot chart card.

[0015] Optionally, in the step of automatically identifying the type of the test card photographed by each digital image sample, a method for determining whether the type of the test card photographed by the current digital image sample is a grayscale card includes:

[0016] Through image morphological operations, each image contour is extracted from the current digital image sample;

[0017] Selecting a small rectangular pattern located in the central area from each of the image contours, and continuously horizontally shifting the small rectangular pattern from its current position to the left and right sides for multiple times, so as to draw a plurality of small rectangular patterns that are adjacent to each other in sequence in the current digital image sample, and the number of the small rectangular patterns is greater than the number M of grayscales of the grayscale card;

[0018] Select the total area covered by the small rectangular pattern with the smallest grayscale value and the M-1 consecutive small rectangular patterns on its left as the grayscale area to be measured;

[0019] According to the actual grayscale information of the grayscale area to be tested of the current digital image sample and the reference grayscale information of the standard grayscale card, it is determined whether the type of the test image card photographed by the current digital image sample is a grayscale card.

[0020] Optionally, after determining the grayscale area to be tested and before determining whether the type of the test image card captured by the current digital image sample is a grayscale card, the method further includes:

[0021] After the grayscale area to be measured is clustered with adjacent areas according to the grayscale value approximation, it is preliminarily cut into a plurality of rectangular blocks arranged horizontally;

[0022] If the number of rectangular blocks in the grayscale area to be measured is less than the grayscale number M of the grayscale card, the rectangular blocks whose width is greater than the preset width threshold are segmented until the number of rectangular blocks in the grayscale area to be measured is equal to the grayscale number M of the grayscale card.

[0023] Optionally, judging whether the type of the test card captured by the current digital image sample is a grayscale card according to the actual grayscale information of the grayscale area to be tested of the current digital image sample and the reference grayscale information of the standard grayscale card specifically includes:

[0024] Obtaining grayscale values ​​of the left rectangular block and the right rectangular block of the grayscale area to be measured;

[0025] It is determined whether the grayscale value of the left rectangular block is greater than the grayscale value of the right rectangular block and whether the difference satisfies a preset grayscale difference threshold. If so, it is determined that the test card type captured by the current digital image sample is a grayscale card.

[0026] Optionally, in the step of automatically identifying the type of the test card photographed by each digital image sample, a method for determining whether the type of the test card photographed by the current digital image sample is a 24-color card includes:

[0027] After converting the current digital image sample into the HSV color gamut, a target color block is extracted from the current digital image sample through a morphological operation, wherein the color gamut of the target color block is the same as the color gamut of the specified color block in the standard 24-color card;

[0028] According to the arrangement of the target color block and the other 23 color blocks in the standard 24-color card, and the area and coordinate position of the target color block in the current digital image sample, the coordinate positions of the other 23 color blocks in the current digital image sample are calculated;

[0029] The color gamut of the 24 color blocks at each coordinate position in the current digital image sample is extracted. If 18 color gamuts and 6 grayscales are satisfied, it is determined that the test chart type captured by the current digital image sample is a 24-color chart.

[0030] Optionally, the target color block is specifically a green color block.

[0031] Optionally, calculating the coordinate positions of other 23 color blocks in the current digital image sample includes:

[0032] First, the coordinate position of the white color block in the current digital image sample is calculated according to the relative position of the green color block in the standard 24-color card and the white color block at the corner position, as well as the area and coordinate position of the green color block in the current digital image sample;

[0033] Then, the white color block in the current digital image sample is displaced from its current coordinate position to obtain the coordinate positions of other color blocks in the current digital image sample.

[0034] Optionally, in the step of automatically identifying the type of the test card photographed by each digital image sample, a method for determining whether the type of the test card photographed by the current digital image sample is a resolution card includes:

[0035] Through image morphological operations, each image contour is extracted from the current digital image sample;

[0036] Selecting a reference image from each of the image contours, determining a shooting angle of the current digital image sample based on the design position of the reference image in the standard resolution card and taking the reference pattern as a base point, and dividing the current digital image sample into a left area, a middle area, and a right area according to the shooting angle;

[0037] Through image morphological operations, at least one test pattern is extracted from the left area, the middle area and the right area of ​​the current digital image sample respectively, and according to the number of test patterns extracted from each area, it is determined whether the type of the test chart captured by the current digital image sample is a resolution card.

[0038] Optionally, the test pattern includes a resolution test pattern and a spatial response frequency test pattern;

[0039] The step of judging whether the type of the test card photographed by the current digital image sample is a resolution card according to the number of test patterns extracted from each area includes:

[0040] Determine whether there are two resolution test patterns extracted from the left area and the right area, and whether there are two resolution test patterns and two spatial response frequency test patterns extracted from the middle area. If so, determine that the test card type captured by the current digital image sample is a resolution card.

[0041] Optionally, in the step of automatically identifying the type of the test card photographed by each digital image sample, a method for determining whether the type of the test card photographed by the current digital image sample is a star-shaped card includes:

[0042] By performing image morphological operations, it is determined whether the current digital image sample includes a circular pattern, and if so, the circular pattern is cut out from the current digital image sample;

[0043] Binarizing the circular pattern to obtain a binary image;

[0044] According to the black and white ratio in the binary image, it is determined whether the test chart type captured by the current digital image sample is a star chart.

[0045] Optionally, judging whether the type of the test card photographed by the current digital image sample is a star-shaped card according to the black-and-white ratio in the binary image includes:

[0046] Divide the binary image into 4x4 regions, and calculate the black and white ratio of each region;

[0047] It is determined whether the black and white ratios of the areas other than the central area meet the preset ratio range. If so, it is determined that the test chart type captured by the current digital image sample is a star chart.

[0048] Optionally, in the step of automatically identifying the type of the test card photographed by each digital image sample, a method for determining whether the type of the test card photographed by the current digital image sample is a black dot card includes:

[0049] Process the current digital image sample through threshold and morphological operations;

[0050] Counting the number of white contours in the current digital image sample;

[0051] It is determined whether the number of white outlines meets a preset number threshold, and if so, it is determined that the test card type captured by the current digital image sample is a black dot card.

[0052] An automatic image quality detection device based on image processing, used to implement the automatic image quality detection method based on image processing described above, comprising:

[0053] An image sample acquisition module is used to acquire multiple digital image samples obtained by a shooting device shooting different test charts;

[0054] A sample automatic classification module, used to automatically identify the type of test card taken by each digital image sample, and automatically classify the multiple digital image samples according to the test card type to obtain at least two groups of image sample sets;

[0055] The quality analysis module is used to analyze and test each group of image sample sets according to their corresponding image quality test methods to obtain image quality test results.

[0056] A storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the steps in any one of the above-mentioned methods for automatically detecting picture quality based on image processing.

[0057] Compared with the prior art, the present invention has the following beneficial effects:

[0058] In an embodiment of the present invention, an image feeding algorithm can be used to automatically identify the type of test card captured by a digital image sample, and then the digital image sample is automatically classified according to the test card type. No human intervention is required in the entire classification process, and efficient and high-quality classification can be achieved, which greatly saves labor costs and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 A flow chart of a method for automatically detecting picture quality based on image processing provided in an embodiment of the present invention.

[0061] Figure 2 A flow chart of a method for determining whether the type of a test card captured by a current digital image sample is a grayscale card provided by an embodiment of the present invention.

[0062] Figure 3 This is an example diagram of a method for determining a 20-level grayscale card provided by an embodiment of the present invention.

[0063] Figure 4 A flow chart of a method for determining whether the type of the test chart captured by the current digital image sample is a 24-color chart provided by an embodiment of the present invention.

[0064] Figure 5 This is an example diagram of a determination method for a 24-color card provided in an embodiment of the present invention.

[0065] Figure 6 A flow chart of a method for determining whether the type of the test chart captured by the current digital image sample is a resolution chart provided by an embodiment of the present invention.

[0066] Figure 7 This is an example diagram of a determination method for a resolution card provided in an embodiment of the present invention.

[0067] Figure 8 A flow chart of a method for determining whether the type of a test chart captured by a current digital image sample is a star chart provided by an embodiment of the present invention.

[0068] Fig. 9 This is an example diagram of a determination method for a star chart card provided in an embodiment of the present invention.

[0069] Fig.10 A flow chart of a method for determining whether the type of a test chart captured by a current digital image sample is a star chart provided by an embodiment of the present invention.

[0070] Fig.11 This is an example diagram of a determination method for a star chart card provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0071] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in combination with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0072] In order to overcome the time-consuming and labor-intensive defects of the manual classification method in the existing image quality detection process, please refer to Figure 1 The embodiment of the present invention provides a method for automatically detecting picture quality based on image processing, comprising:

[0073] Step S1, obtaining a plurality of digital image samples obtained by photographing different test charts by a photographing device.

[0074] Step S2: automatically identifying the type of the test card taken by each digital image sample, and automatically classifying the multiple digital image samples according to the test card type to obtain at least two groups of image sample sets.

[0075] Step S3: Analyze and test each group of image sample sets according to their corresponding image quality test methods to obtain image quality test results.

[0076] In an embodiment of the present invention, an image feeding algorithm can be used to automatically identify the type of test card captured by a digital image sample, and then the digital image sample is automatically classified according to the test card type. No human intervention is required in the entire classification process, and efficient and high-quality classification can be achieved, which greatly saves labor costs and improves work efficiency.

[0077] It should be noted that in order to ensure the comprehensiveness of image quality testing, the test items in the image quality standards often include: resolution, color reproduction, white balance, grayscale, signal-to-noise ratio, brightness uniformity, distortion, frame rate, image plane color uniformity, field of view and / or texture.

[0078] As a testing tool for the above-mentioned specific indicators of the shooting device, the test chart is an essential tool for daily use and regular maintenance of the shooting device. In order to standardize the specific parameter indicators of the camera, the test chart can be used for testing. For different test items, the selected test charts are also different to achieve different test functions. Optionally, in an embodiment of the present invention, the test chart is specifically a grayscale card, a 24-color card, a resolution card, a star chart or a black dot chart.

[0079] Among them, the main function of the grayscale card is to test parameters such as noise, dynamic range, contrast, exposure accuracy, lens glare, etc. Generally, there are 5-level grayscale cards, 7-level grayscale cards, 9-level grayscale cards, 11-level grayscale cards, 13-level grayscale cards, 20-level grayscale cards, etc., which are a series of grayscale combinations arranged in sequence. For example, a 20-level grayscale card consists of 20 grayscales with different tones from white to black.

[0080] The 24-color card can be used to test color reproduction error, color saturation, signal-to-noise ratio, automatic white balance, exposure error and other indicators. The standard 24-color card is composed of 6×4 blocks of different colors, and the size of each block is 40mm×40mm. The colors of the 24 blocks in this color card are carefully selected and cover a very wide range. Each block can represent a special color in nature, such as skin color, leaf color and sky blue. These blocks not only have the same color as their analogs of the same color, but also have the same way of reflecting light in the visible spectrum. Because of these unique properties, it can make color matching have outstanding performance under any light source and in any color reproduction process.

[0081] The main functions of the resolution card are: detecting the visual resolution, limiting resolution, spatial frequency, aliasing ratio determination, etc. of the camera. In this embodiment, the standard resolution card complies with the ISO 12233 standard (resolution measurement of electronic still images of digital cameras), and accurate evaluation of standard cameras requires SFR measurement and calculation.

[0082] The main function of the star chart card is to test or adjust the lens focal length, focus, check the focus of the lens, etc.

[0083] The following will describe the determination methods of various test chart types in step S2 respectively. It can be understood that it is possible to determine whether the digital image sample is a grayscale card, a 24-color card, a resolution card, a star chart card or a black dot chart card in sequence according to any preset determination order, until the determination procedure is terminated after the type of the test chart card photographed by the digital image sample is determined. The embodiment of the present invention does not specifically limit this determination order.

[0084] See also Figure 2 In the above step S2, the method for determining whether the test card type captured by the current digital image sample is a grayscale card includes:

[0085] Step S101: extracting each image contour in the current digital image sample through image morphological operation.

[0086] Step S102: Select a small rectangular pattern located in the center area from each image outline.

[0087] Step S103, the small rectangular pattern is horizontally displaced from its current position to the left and right sides for multiple times, and the displacement of each displacement is the horizontal width of the small rectangular pattern, so as to draw a plurality of small rectangular patterns adjacent to each other in the current digital image sample, and the number of small rectangular patterns is greater than the grayscale number M of the grayscale card.

[0088] Taking the standard grayscale card as a 20-level grayscale card as an example, the total number of small rectangular patterns drawn may be 22.

[0089] Step S104 , selecting the total area covered by the small rectangular pattern with the smallest grayscale value and M-1 consecutive small rectangular patterns on its left side as the grayscale area to be measured.

[0090] Step S105 : judging whether the test card type captured by the current digital image sample is a grayscale card according to the actual grayscale information of the grayscale area to be tested of the current digital image sample and the reference grayscale information of the standard grayscale card.

[0091] The embodiment of the present invention first selects a small rectangular pattern located in the central area from the first digital image sample, and then obtains multiple small rectangular patterns by shifting the small rectangular pattern to its left and right sides for multiple times. Since the number of these small rectangular patterns exceeds the number of grayscales of the grayscale card, the area covered by these small rectangular patterns will be slightly larger than the actual grayscale area; then, within the larger area covered by these small rectangular patterns, the small rectangular pattern with the minimum grayscale value and the area covered by M-1 consecutive small rectangular patterns on its left are selected as the grayscale area to be tested, thereby realizing automatic selection and identification of the grayscale area to be tested, which can replace the traditional manual classification method and can effectively improve the classification efficiency.

[0092] In order to ensure that the grayscale blocks with unequal areas can be accurately selected from the digital image samples obtained by shooting the grayscale card at an inclined shooting angle in a non-standard test environment, in the embodiment of the present invention, after determining the grayscale area to be tested and before determining whether the type of the test chart shot by the current digital image sample is a grayscale card, the following is further included:

[0093] The grayscale area to be measured is initially cut into a plurality of horizontally arranged rectangular blocks after adjacent areas are clustered according to the grayscale value approximation;

[0094] If the number of rectangular blocks in the grayscale area to be measured is less than the grayscale number M of the grayscale card, the rectangular blocks whose width is greater than the preset width threshold are segmented until the number of rectangular blocks in the grayscale area to be measured is equal to the grayscale number M of the grayscale card.

[0095] This method of first clustering the grayscale area to be tested according to the grayscale value approximation, cropping it according to the clustering result, and then dividing the cropped larger rectangular blocks according to the width can accurately divide the grayscale area to be tested to make it closer to the division method of the standard grayscale card, laying the foundation for the subsequent grayscale value comparison step and improving the accuracy of the judgment result.

[0096] For example, Figure 3 As shown, Figure 3 (1) and Figure 3 (2) Two digital image samples of a 20-level grayscale card were obtained by shooting in a laboratory test environment with good environmental configuration and in an office test environment with poor environmental configuration. The image effect shot in the laboratory test environment is better than that shot in the office test environment, which is more conducive to subsequent accurate classification and analysis; Figure 3 (3) Yes Figure 3 (1) shows the digital image sample taken in the laboratory test environment after contour extraction. Figure 3 (4) Yes Figure 3 (2) shows the digital image sample taken in an office test environment after contour extraction. It can be seen that due to the strict limitations of basic morphological operations such as thresholds, the contours of some grayscale blocks may not be accurately extracted; Figure 3 (5) and Figure 3 (6), respectively Figure 3 (3) / Figure 3 (4) A small rectangular pattern that can be accurately identified and is located in the center area is selected, and the image obtained by shifting the small rectangular pattern left and right to select the grayscale area to be measured. It can be seen that the selected grayscale area to be measured is relatively close to the actual grayscale area; Figure 3 (7) and Figure 3 (8), respectively Figure 3 (5) / Figure 3 The image after the grayscale area to be tested in (6) is divided into multiple rectangular blocks. At this time, the actual grayscale information of each rectangular block can be used as a basis for judging whether the test chart type captured by the current digital image sample is a grayscale card.

[0097] In step S101, due to the strict limitations of basic morphological operations such as thresholds, it may not be possible to accurately extract the contours of the entire image, resulting in the missing contours of some images (such as some grayscale blocks that may exist). Therefore, in step S102, only the small rectangular pattern located in the center area that can be accurately identified is selected (because its contour is close to the contour of the grayscale block, it can be preliminarily assumed to be a grayscale block, and then this grayscale block is used as a reference to distinguish the entire grayscale area). Then, by moving the small rectangular pattern left and right, the grayscale area to be tested can be selected on the basis of making up for the missing image, and then by comparing the actual grayscale information of the grayscale area to be tested with the reference grayscale information of the standard grayscale card, it can be accurately determined whether the test card type captured by the current digital image sample is a grayscale card. Figure 3 (7) and Figure 3 (8) It can be seen that, whether it is a laboratory test environment that meets higher requirements or an office test environment where the image is prone to tilt, overexposure or blur due to poor environment, the above method can accurately identify whether the test card type captured by the current digital image sample is a grayscale card.

[0098] Further, judging whether the test card type captured by the current digital image sample is a grayscale card according to the actual grayscale information of the grayscale area to be tested of the current digital image sample and the reference grayscale information of the standard grayscale card, specifically includes:

[0099] Obtain the grayscale values ​​of the left and right rectangular blocks of the grayscale area to be measured;

[0100] It is determined whether the grayscale value of the left rectangular block is greater than the grayscale value of the right rectangular block and whether the difference satisfies a preset grayscale difference threshold. If so, it is determined that the test card type captured by the current digital image sample is a grayscale card.

[0101] See also Figure 4 In the above step S2, the method for determining whether the test chart type captured by the current digital image sample is a 24-color chart includes:

[0102] Step S201: After converting the current digital image sample into the HSV color gamut, a target color block is extracted from the current digital image sample through morphological operations, and the color gamut of the target color block is the same as the color gamut of the specified color block in the standard 24-color card.

[0103] The designated color block may be any color block in the standard 24 color cards, but in order to reduce the difficulty of recognition and improve the recognition accuracy, the designated color block is preferably a green color block that is easy to identify.

[0104] Step S202: Calculate the coordinates of the other 23 color blocks in the current digital image sample according to the arrangement of the target color block and the other 23 color blocks in the standard 24-color card and the area and coordinates of the target color block in the current digital image sample.

[0105] In this step, the arrangement of color blocks in the standard 24-color card is used as a reference to accurately calculate the theoretical coordinate positions of other color blocks in the current digital image sample.

[0106] Step S203: extract the color gamut of the color blocks at the 24 coordinate positions in the current digital image sample. If 18 color gamuts and 6 grayscales are satisfied, it is determined that the test chart type captured by the current digital image sample is a 24-color chart.

[0107] For example, Figure 5 As shown, Figure 5 (1) and Figure 5 (2) Two digital image samples of 24 color charts taken in a laboratory test environment with good environmental configuration and an office test environment with poor environmental configuration; Figure 5 (3) Yes Figure 5 (1) shows the digital image sample taken in the laboratory test environment after contour extraction. Figure 5 (4) Yes Figure 5 (2) shows the digital image sample taken in an office test environment after contour extraction. It can be seen that due to the strict limitations of basic morphological operations such as thresholds, only the contours of some color blocks, such as the green block, may be extracted; Figure 5 (5) and Figure 5 (6) are based on Figure 5 (3) / Figure 5 The green block selected in (4) calculates the coordinate positions of other blocks and then draws the image of the corresponding contour. It can be seen that the above calculation method can effectively extract the coordinate positions of each block regardless of the test environment, laying a foundation for the accurate judgment of step S203.

[0108] In the above-mentioned 24-color card judgment method, the more obviously identified target color block is used as the base point, and the color block arrangement method in the standard 24-color card is referred to to divide the corresponding area in the current digital image sample into 24 color blocks. By analyzing the color gamut / grayscale of each divided color block, it is possible to quickly and accurately identify whether the test card type captured by the current digital image sample is a 24-color card.

[0109] Furthermore, in step S202, the coordinate positions of the other 23 color blocks in the current digital image sample are calculated, which may specifically include: firstly, according to the relative position of the green color block in the standard 24-color card and the white color block at the corner position, and the area and coordinate position of the green color block in the current digital image sample, the coordinate position of the white color block in the current digital image sample is calculated; and then, the white color block in the current digital image sample is displaced from its current coordinate position to obtain the coordinate positions of the other color blocks in the current digital image sample. This method of first determining the coordinate position of the white color block at the corner position according to the green color block, and then calculating the coordinate positions of the other color blocks according to the area and coordinate position of the white color block can reduce the calculation complexity and reduce the amount of calculation.

[0110] See also Figure 6 In the above step S2, the method for determining whether the test chart type captured by the current digital image sample is a resolution chart includes:

[0111] Step S301: extracting each image contour in the current digital image sample through image morphological operation.

[0112] Step S302, select a reference image from each image contour, determine the shooting angle of the current digital image sample based on the design position of the reference image in the standard resolution card and the reference pattern as a base point, and divide the current digital image sample into a left area, a middle area and a right area according to the shooting angle.

[0113] It should be noted that the current digital image sample may be an image obtained by shooting the resolution card from three shooting angles: left, center, and right. The actual distribution positions of each test pattern in the current digital image sample will be different at different shooting angles. Therefore, in order to ensure that the subsequent test pattern can be accurately extracted, it is necessary to analyze the shooting angle of the current digital image sample based on the reference pattern in advance. The reference pattern is preferably a pattern that is easy to identify and located in a relatively middle area.

[0114] Step S303: extract at least one test pattern from the left area, the middle area and the right area of ​​the current digital image sample respectively through image morphological operation, and determine whether the test chart type captured by the current digital image sample is a resolution chart according to the number of test patterns extracted from each area.

[0115] The test pattern may specifically include a resolution test pattern and a spatial response frequency test pattern. Based on this, in step S303, judging whether the test chart type captured by the current digital image sample is a resolution chart according to the number of test patterns extracted from each area may specifically include:

[0116] Determine whether there are two resolution test patterns extracted from the left area and the right area, and whether there are two resolution test patterns and two spatial response frequency test patterns extracted from the middle area. If so, determine that the test card type photographed by the current digital image sample is a resolution card, otherwise it is a non-resolution card or the shooting angle does not meet the requirements.

[0117] For example, Figure 7 As shown, Figure 7 (1) and Figure 7 (2) Two digital image samples of the resolution card were taken in a laboratory test environment with good environmental configuration and an office test environment with poor environmental configuration; Figure 7 (3) and Figure 7 (4) are the images of digital image samples taken under two test environments after contour extraction; Figure 7 (5) and Figure 7 (6) are two resolution test patterns extracted from the middle area of ​​digital image samples taken under laboratory test environment and office test environment respectively; Figure 7 (5) and Figure 7 (6) are two resolution test patterns extracted from the middle area of ​​digital image samples taken under laboratory test environment and office test environment respectively; Figure 7 (7) and Figure 7 (8) are two spatial response frequency test patterns extracted from the middle area of ​​digital image samples taken under laboratory test environment and office test environment respectively; Figure 7 (9) and Figure 7 (10) are two resolving power test patterns extracted from the left and right areas of the digital image sample, respectively.

[0118] See also Figure 8 In the above step S2, the method for determining whether the test chart type captured by the current digital image sample is a star chart includes:

[0119] Step S401: determine whether the current digital image sample includes a circular pattern through image morphological operations, and if so, cut out the circular pattern from the current digital image sample.

[0120] Step S402: binarize the circular pattern to obtain a binary image.

[0121] Step S403: judging whether the test chart type captured by the current digital image sample is a star chart according to the black and white ratio in the binary image.

[0122] For example, Fig. 9 As shown, Fig. 9(1) and Fig. 9 (2) Digital image samples obtained by shooting star charts at shooting distances of 200 cm and 60 cm respectively; Fig. 9 (3) and Fig. 9 (4) Fig. 9 (1) and Fig. 9 (2) The digital image sample shown is the image after cropping and binarization processing.

[0123] Among them, in step S403, judging whether the type of the test card photographed by the current digital image sample is a star-shaped card according to the black-and-white ratio in the binary image, further includes: dividing the binary image into 4x4 areas, and calculating the black-and-white ratio of each area respectively; judging whether the black-and-white ratio of other areas except the central area meets the preset ratio range (for example, the ratio is close to 50%), and if so, judging that the type of the test card photographed by the current digital image sample is a star-shaped card.

[0124] In this way, by dividing the circular binary image into multiple small areas and analyzing the black and white ratio of each small area one by one, the accuracy of the judgment result can be effectively guaranteed.

[0125] See also Fig.10 In the above step S2, the method for determining whether the test chart type captured by the current digital image sample is a black dot chart includes:

[0126] Step S501: Process the current digital image sample through threshold and morphological operations.

[0127] Step S502: Count the number of white contours in the current digital image sample.

[0128] Step S503: determine whether the number of white outlines meets a preset number threshold, and if so, determine that the test chart type captured by the current digital image sample is a black dot chart.

[0129] For example, Fig.11 As shown, Fig.11 (1) is a digital image sample obtained by shooting a black dot chart. Fig.11 (2) Fig.11 The processed image of the digital image sample shown in (1) can simply and accurately identify whether the test chart type photographed by the current digital image sample is a black dot chart based on the number of white contours therein.

[0130] In summary, the embodiments of the present invention can realize automatic classification of digital image samples according to the types of test charts they are photographed, replacing the manual classification method, greatly improving work efficiency and reducing labor costs.

[0131] Based on the same inventive concept, an embodiment of the present invention further provides an automatic image quality detection device based on image processing, which is used to implement the above-mentioned automatic image quality detection method based on image processing, including:

[0132] An image sample acquisition module is used to acquire multiple digital image samples obtained by a shooting device shooting different test charts;

[0133] The sample automatic classification module is used to automatically identify the type of the test card taken by each digital image sample, and automatically classify the multiple digital image samples according to the test card type to obtain at least two groups of image sample sets;

[0134] The quality analysis module is used to analyze and test each group of image sample sets according to their corresponding image quality test methods to obtain image quality test results.

[0135] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0136] To this end, an embodiment of the present invention further provides a storage medium, in which a plurality of instructions are stored. The instructions can be loaded by a processor to execute the steps in any one of the automatic image quality detection methods based on image processing provided by the embodiments of the present invention.

[0137] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0138] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. 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 invention.

Claims

1. A method for automatic detection of picture quality based on image processing, characterized in that: include: Acquire multiple digital image samples obtained by photographing different test charts by a photographing device; Automatically identifying the type of the test chart that each digital image sample is photographed by, and automatically classifying the plurality of digital image samples according to the test chart type to obtain at least two groups of image sample sets; Analyze and test each group of image sample sets according to their corresponding image quality test methods to obtain image quality test results; The test chart is specifically a grayscale chart, a 24-color chart, a resolution chart, a star chart or a black dot chart; In the step of automatically identifying the type of the test card photographed by each digital image sample, the method of determining whether the type of the test card photographed by the current digital image sample is a resolution card includes: Through image morphological operations, each image contour is extracted from the current digital image sample; Selecting a reference image from each of the image contours, determining the shooting angle of the current digital image sample based on the design position of the reference image in the standard resolution card and taking the reference image as a base point, and dividing the current digital image sample into a left area, a middle area, and a right area according to the shooting angle; Through image morphological operations, at least one test pattern is extracted from the left area, the middle area and the right area of ​​the current digital image sample respectively, and according to the number of test patterns extracted from each area, it is determined whether the type of the test chart captured by the current digital image sample is a resolution card.

2. The automatic image quality detection method based on image processing according to claim 1 is characterized in that: In the step of automatically identifying the type of the test card photographed by each digital image sample, a method for determining whether the type of the test card photographed by the current digital image sample is a grayscale card includes: Through image morphological operations, each image contour is extracted from the current digital image sample; Selecting a small rectangular pattern located in the central area from each of the image contours, and continuously horizontally shifting the small rectangular pattern from its current position to the left and right sides for multiple times, so as to draw a plurality of small rectangular patterns that are adjacent to each other in sequence in the current digital image sample, and the number of the small rectangular patterns is greater than the number M of grayscales of the grayscale card; Select the total area covered by the small rectangular pattern with the smallest grayscale value and the M-1 consecutive small rectangular patterns on its left as the grayscale area to be measured; According to the actual grayscale information of the grayscale area to be tested of the current digital image sample and the reference grayscale information of the standard grayscale card, it is determined whether the type of the test image card photographed by the current digital image sample is a grayscale card.

3. The automatic image quality detection method based on image processing according to claim 2 is characterized in that: After determining the grayscale area to be tested and before determining whether the type of the test image card photographed by the current digital image sample is a grayscale card, the method further includes: After the grayscale area to be measured is clustered with adjacent areas according to the grayscale value approximation, it is preliminarily cut into a plurality of rectangular blocks arranged horizontally; If the number of rectangular blocks in the grayscale area to be tested is less than the grayscale number M of the grayscale card, the rectangular blocks whose width is greater than the preset width threshold are segmented until the number of rectangular blocks in the grayscale area to be tested is equal to the grayscale number M of the grayscale card.

4. The automatic image quality detection method based on image processing according to claim 3 is characterized in that: The step of determining whether the test card type captured by the current digital image sample is a grayscale card according to the actual grayscale information of the grayscale area to be tested of the current digital image sample and the reference grayscale information of the standard grayscale card specifically includes: Obtaining grayscale values ​​of the left rectangular block and the right rectangular block of the grayscale area to be measured; It is determined whether the grayscale value of the left rectangular block is greater than the grayscale value of the right rectangular block and whether the difference satisfies a preset grayscale difference threshold. If so, it is determined that the test card type captured by the current digital image sample is a grayscale card.

5. The automatic image quality detection method based on image processing according to claim 1 is characterized in that: In the step of automatically identifying the type of the test card photographed by each digital image sample, the method of determining whether the type of the test card photographed by the current digital image sample is a 24-color card includes: After converting the current digital image sample into the HSV color gamut, a target color block is extracted from the current digital image sample through a morphological operation, wherein the color gamut of the target color block is the same as the color gamut of the specified color block in the standard 24-color card; According to the arrangement of the target color block and the other 23 color blocks in the standard 24-color card, and the area and coordinate position of the target color block in the current digital image sample, the coordinate positions of the other 23 color blocks in the current digital image sample are calculated; The color gamut of the 24 color blocks at each coordinate position in the current digital image sample is extracted. If 18 color gamuts and 6 grayscales are satisfied, it is determined that the test chart type captured by the current digital image sample is a 24-color chart.

6. The automatic image quality detection method based on image processing according to claim 5 is characterized in that: The target color block is specifically a green color block.

7. The automatic image quality detection method based on image processing according to claim 6 is characterized in that: The calculating of the coordinate positions of the other 23 color blocks in the current digital image sample includes: First, the coordinate position of the white color block in the current digital image sample is calculated according to the relative position of the green color block in the standard 24-color card and the white color block at the corner position, as well as the area and coordinate position of the green color block in the current digital image sample; Then, the white color block in the current digital image sample is displaced from its current coordinate position to obtain the coordinate positions of other color blocks in the current digital image sample.

8. The automatic image quality detection method based on image processing according to claim 1 is characterized in that: The test patterns include a resolution test pattern and a spatial response frequency test pattern; The step of judging whether the type of the test card photographed by the current digital image sample is a resolution card according to the number of test patterns extracted from each area includes: Determine whether there are two resolution test patterns extracted from the left area and the right area, and whether there are two resolution test patterns and two spatial response frequency test patterns extracted from the middle area. If so, determine that the test card type captured by the current digital image sample is a resolution card.

9. The automatic image quality detection method based on image processing according to claim 1 is characterized in that: In the step of automatically identifying the type of the test card photographed by each digital image sample, the method of determining whether the type of the test card photographed by the current digital image sample is a star-shaped card includes: By performing image morphological operations, it is determined whether the current digital image sample includes a circular pattern, and if so, the circular pattern is cut out from the current digital image sample; Binarizing the circular pattern to obtain a binary image; According to the black and white ratio in the binary image, it is determined whether the test chart type captured by the current digital image sample is a star chart.

10. The automatic image quality detection method based on image processing according to claim 9 is characterized in that: The step of judging whether the test chart type captured by the current digital image sample is a star chart type according to the black and white ratio in the binary image includes: Divide the binary image into 4x4 regions, and calculate the black and white ratio of each region; It is determined whether the black and white ratios of the areas other than the central area meet the preset ratio range. If so, it is determined that the test chart type captured by the current digital image sample is a star chart.

11. The automatic image quality detection method based on image processing according to claim 1, characterized in that: In the step of automatically identifying the type of the test card photographed by each digital image sample, a method for determining whether the type of the test card photographed by the current digital image sample is a black dot card includes: Process the current digital image sample through threshold and morphological operations; Counting the number of white contours in the current digital image sample; It is determined whether the number of white outlines meets a preset number threshold, and if so, it is determined that the test card type captured by the current digital image sample is a black dot card.

12. An automatic image quality detection device based on image processing, used to implement the automatic image quality detection method based on image processing according to any one of claims 1 to 11, characterized in that: include: An image sample acquisition module is used to acquire multiple digital image samples obtained by a shooting device shooting different test charts; A sample automatic classification module, used to automatically identify the type of test card taken by each digital image sample, and automatically classify the multiple digital image samples according to the test card type to obtain at least two groups of image sample sets; The quality analysis module is used to analyze and test each group of image sample sets according to the corresponding image quality test method to obtain the image quality test result; The test chart is specifically a grayscale chart, a 24-color chart, a resolution chart, a star chart or a black dot chart; In the step of automatically identifying the type of the test card photographed by each digital image sample, the method of determining whether the type of the test card photographed by the current digital image sample is a resolution card includes: Through image morphological operations, each image contour is extracted from the current digital image sample; Selecting a reference image from each of the image contours, determining the shooting angle of the current digital image sample based on the design position of the reference image in the standard resolution card and taking the reference image as a base point, and dividing the current digital image sample into a left area, a middle area, and a right area according to the shooting angle; Through image morphological operations, at least one test pattern is extracted from the left area, the middle area and the right area of ​​the current digital image sample respectively, and according to the number of test patterns extracted from each area, it is determined whether the type of the test chart captured by the current digital image sample is a resolution card.

13. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the automatic image quality detection method based on image processing as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Photographing quality evaluation method and apparatus for photographing apparatus, and terminal device

    CN111226437A