Image testing method, device, computer equipment and computer-readable storage medium

By acquiring images and evaluating the imaging effect of the camera using area identification and pixel value calculation, the existing problem of strong subjectivity of manual evaluation is solved and accurate imaging effect evaluation is achieved.

CN114374760BActive Publication Date: 2025-07-08HUIZHOU TCL MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210072766.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2025-07-08
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

The existing methods of manually judging the imaging effect of mobile phone cameras are highly subjective and cannot accurately reflect the real imaging effect.

Method used

通过摄像头采集待测图像,利用区域标识进行区域提取,确定目标图像块,并根据像素点的像素值计算测试参数,评估摄像头的成像效果。

Benefits of technology

The objective and accurate evaluation of the camera imaging effect is achieved, subjective judgment is avoided, and an objective test result is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114374760B_ABST
    Figure CN114374760B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides an image testing method, device, computer device, and computer-readable storage medium. In the embodiment of the present application, a to-be-tested image is collected through a camera, and the to-be-tested image includes a region identifier; region extraction is performed on the to-be-tested image according to the region identifier to obtain a target image block; test parameters for the camera are determined according to pixel values of pixel points in the target image block; a test result of the imaging effect of the camera is determined according to the test parameters; since the embodiment of the present application can determine the test parameters for the camera according to the pixel values of pixel points in the target image block, and determine the test result of the imaging effect of the camera according to the test parameters, subjective judgment can be avoided in this way, and thus the imaging effect of the camera can be accurately reflected through the test result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular, to an image testing method, apparatus, computer device, and computer-readable storage medium. Background Art

[0002] With the development of technology, people have higher and higher requirements for mobile phones. For example, there are higher and higher requirements for the mobile phone camera. People's requirements for the mobile phone camera are reflected in the imaging effect.

[0003] Currently, people test the imaging effect of the mobile phone camera. At present, for the imaging effect test of the mobile phone camera, generally, manual judgment is used to judge the images captured by the mobile phone camera. The imaging effect evaluated by this manual judgment method is relatively subjective and cannot accurately reflect the imaging effect of the mobile phone camera. Summary of the Invention

[0004] The embodiments of this application provide an image testing method, apparatus, computer device, and computer-readable storage medium, which can accurately reflect the imaging effect of the camera.

[0005] An image testing method includes:

[0006] Collecting a to-be-tested image through a camera, where the to-be-tested image includes a region identifier;

[0007] Performing region extraction on the to-be-tested image according to the region identifier to obtain a target image block;

[0008] Determining a test parameter for the camera according to the pixel values of the pixel points in the target image block;

[0009] Determining a test result of the imaging effect of the camera according to the test parameter.

[0010] Correspondingly, the embodiments of this application provide an image testing apparatus, including:

[0011] A collecting unit, which can be used to collect a to-be-tested image through a camera, where the to-be-tested image includes a region identifier;

[0012] An extraction unit, which can be used to perform region extraction on the to-be-tested image according to the region identifier to obtain a target image block;

[0013] A first determination unit, which can be used to determine a test parameter for the camera according to the pixel values of the pixel points in the target image block;

[0014] A second determination unit, which can be used to determine a test result of the imaging effect of the camera according to the test parameter.

[0015] In some embodiments, the extraction unit is specifically configured to obtain a template image, match the template image with the image to be tested, and obtain the position of the area identifier in the image to be tested; perform area extraction according to the position of the area identifier to obtain a target image block.

[0016] In some embodiments, the area identifier includes a plurality of area identifiers; the extraction unit is specifically configured to compare the positions of adjacent area identifiers among the plurality of area identifiers; if there is a deviation value between the positions of adjacent area identifiers that is less than a preset threshold, determine the adjacent area identifiers as target area identifiers; perform area extraction according to the positions of the target area identifiers to obtain a target image block.

[0017] In some embodiments, the first determination unit is specifically configured to perform area division on the target image block according to the pixel values of the pixel points in the target image block to obtain candidate areas of the target image block; screen out target areas from the candidate areas according to the pixel values of the pixel points in the candidate areas; determine test parameters for the camera according to the pixel values of the pixel points in the target areas.

[0018] In some embodiments, the first determination unit is specifically configured to calculate a target brightness value in the target area according to the pixel values of the pixel points in the target area; use the target brightness value as a test parameter for the imaging effect of the camera.

[0019] In some embodiments, the second determination unit is specifically configured to obtain the pixel values of the pixel points in the preset image block corresponding to the target area according to the pixel values of the pixel points in the target area; calculate a reference brightness value in the preset image block according to the pixel values of the pixel points in the preset image block; determine a test result for the imaging effect of the camera according to the difference value between the reference brightness value and the target brightness value.

[0020] In some embodiments, the first determination unit is specifically configured to calculate a candidate brightness value for each pixel point in the target image block according to the pixel values of the pixel points in the target image block; screen out the maximum candidate brightness value and the minimum candidate brightness value from the candidate brightness values; determine the sharpness value of the target image block according to the maximum candidate brightness value and the minimum candidate brightness value; use the sharpness value of the target image block as a test parameter for the imaging effect of the camera.

[0021] In addition, an embodiment of the present application further provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is configured to run the computer program in the memory to execute any one of the image test methods provided by the embodiments of the present application.

[0022] In addition, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which is adapted to be loaded by a processor to execute any one of the image testing methods provided by the embodiments of the present application.

[0023] In an embodiment of the present application, a to-be-tested image is collected by a camera, and the to-be-tested image includes a region identifier; region extraction is performed on the to-be-tested image according to the region identifier to obtain a target image block; test parameters for the camera are determined according to the pixel values of the pixel points in the target image block; a test result of the imaging effect of the camera is determined according to the test parameters; since the embodiment of the present application can determine the test parameters for the camera according to the pixel values of the pixel points in the target image block and determine the test result of the imaging effect of the camera according to the test parameters, subjective judgment can be avoided in this way, and thus the imaging effect of the camera can be accurately reflected by the test result. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application, and those skilled in the art can obtain other drawings without creative efforts based on these drawings.

[0025] Figure 1 It is a schematic diagram of the scenario of the image testing method provided by the embodiment of the present application;

[0026] Figure 2 It is a schematic flowchart of the image testing method provided by the embodiment of the present application;

[0027] Figure 3 It is a schematic diagram of the test chart provided by the embodiment of the present application;

[0028] Figure 4 It is a first schematic diagram of the coordinates of the region identifier provided by the embodiment of the present application;

[0029] Figure 5 It is a second schematic diagram of the coordinates of the region identifier provided by the embodiment of the present application;

[0030] Figure 6 It is a schematic diagram of the first target image block and the second target image block provided by the embodiment of the present application;

[0031] Figure 7 It is a schematic diagram of the preset image provided by the embodiment of the present application;

[0032] Figure 8 It is a schematic structural diagram of the image testing device provided by the embodiment of the present application;

[0033] Figure 9It is a schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners

[0034] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0035] An embodiment of the present application provides an image testing method, apparatus, computer device, and computer-readable storage medium. Among them, the image testing apparatus can be integrated in the computer device, and the computer device can be a server or a terminal device, etc.

[0036] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and the present application does not make any restrictions here.

[0037] For example, referring to Figure 1 , taking the image testing apparatus integrated in the computer device as an example, the computer device can collect a to-be-tested image through a camera. The to-be-tested image includes a region identifier; perform region extraction on the to-be-tested image according to the region identifier to obtain a target image block; determine test parameters for the camera according to the pixel values of the pixel points in the target image block; and determine a test result of the imaging effect of the camera according to the test parameters.

[0038] Among them, the to-be-tested image can be an image collected by the camera when shooting a test chart.

[0039] The test chart can be a pre-set chart. The test chart can include a color area, a texture area, and a noise area. The color area is used to test the color restoration ability of the camera. The color area includes pencils of various colors, chalks of various colors, pigments, and a dedicated 24-color chart. The texture area is used to test the texture performance and clarity after the camera imaging. The texture area includes paintbrushes, wooden tools, metals, and measuring plates. The noise area is used to test the noise situation after the camera imaging. The noise area includes black foam boards, wooden writing brushes, leopard-print pictures, and sandpapers.

[0040] Among them, the area identifier can be represented by a pattern, can be represented by a color, or can be represented by a combination of a pattern and a color.

[0041] Among them, the test parameter can be clarity or sharpness.

[0042] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.

[0043] This embodiment will be described from the perspective of an image testing device, which can be specifically integrated in a computer device. The computer device can be a server or a terminal device, etc.; among them, the terminal can include a tablet computer, a notebook computer, a personal computer (PC), a wearable device, a virtual reality device, or other intelligent devices that can obtain data.

[0044] As Figure 2 shown, the specific process of this image testing method is as follows:

[0045] S101. Collect a to-be-tested image through a camera. The to-be-tested image includes an area identifier.

[0046] Among them, the to-be-tested image can be an image collected by the camera by photographing a test chart.

[0047] The test chart can be a pre-set chart, as Figure 3 shown. The test chart can include a color area, a texture area, and a noise area. The color area is used to test the color restoration ability of the camera. The color area can include pencils of various colors, chalks of various colors, pigments, and a dedicated 24-color chart. The texture area is used to test the texture performance and clarity after the camera imaging. The texture area can include paintbrushes, wooden tools, metals, and a measuring plate. The noise area is used to test the noise condition after the camera imaging. The noise area can include a black foam board, a wooden writing brush, a leopard print picture, and sandpaper.

[0048] Among them, the area identifier can be represented by a pattern, can be represented by a color, or can be represented by a combination of a pattern and a color.

[0049] The computer device in the embodiment of the present application can collect a to-be-tested image through the camera in response to a trigger operation on the computer device.

[0050] S102. Perform area extraction on the to-be-tested image according to the area identifier to obtain a target image block.

[0051] Among them, there are various ways for the embodiment of the present application to perform area extraction on the to-be-tested image according to the area identifier to obtain a target image block. See the following for details:

[0052] For example, the area identifier can be circular or polygonal. The computer device detects the area identifier, and when the area identifier is detected, it determines the area enclosed by the area identifier as the target image block.

[0053] For example, the computer device can obtain a template image, match the template image with the image to be measured, and obtain the position of the area identifier in the image to be measured; perform area extraction based on the position of the area identifier to obtain the target image block.

[0054] Among them, the template image in the embodiments of the present application can be an image identical to the area identifier. According to the template image in the embodiments of the present application, a search is performed in the image to be measured to match the template image with the image to be measured, and the position of the area identifier in the image to be measured is obtained. As Figure 3 shown, the area identifier is an image composed of black and white as shown in Figure 3 . The position of the area identifier in the embodiments of the present application can be represented by coordinates. As Figure 4 shown, the coordinates extracted in the embodiments of the present application can include a(200, 200), b(500, 195), c(200, 62), d(500, 60); as Figure 5 shown, the coordinates extracted in the embodiments of the present application can also include e(100, 90), f(301, 89), g(100, 30), h(299, 28).

[0055] In the embodiments of the present application, the open source OpenCV-Python library can be used to find the position of the area identifier in the image to be measured by using the matchTemplate function.

[0056] Among them, the area identifier in the embodiments of the present application can include multiple area identifiers. Based on this, the method for performing area extraction according to the position of the area identifier to obtain the target image block in the embodiments of the present application can be as follows:

[0057] In some embodiments, the computer device can compare the positions of adjacent area identifiers among the multiple area identifiers; if the deviation value between the positions of adjacent area identifiers is less than a preset threshold, it determines the adjacent area identifiers as the target area identifiers; perform area extraction according to the positions of the target area identifiers to obtain the target image block.

[0058] Among them, the preset threshold can be set to 10%. For example, the deviation value between the coordinates of adjacent area identifiers is less than 10% in the x-axis direction of the coordinate axis, and / or the deviation value between the coordinates of adjacent area identifiers is less than 10% in the y-axis direction of the coordinate axis.

[0059] Based on the above, the embodiments of the present application can extract target image blocks from the image to be measured. The target image blocks in the embodiments of the present application can include a first target image block and a second target image block.

[0060] Among them, the first target image block can be an image block of a 24-color chart, and the second target image block can be an image block of a gray withered leaf.

[0061] As Figure 6 shown, the first target image block is shown in region B in the figure, and the second target image block is shown in region A in the figure.

[0062] S103. Determine test parameters for the camera according to the pixel values of the pixel points in the target image block.

[0063] Among them, the test parameters can be clarity or sharpness.

[0064] Among them, there are various ways for the embodiments of the present application to determine the test parameters for the camera according to the pixel values of the pixel points in the target image block, as detailed below:

[0065] For example, the computer device can divide the target image block according to the pixel values of the pixel points in the target image block to obtain candidate regions of the target image block; screen out target regions from the candidate regions according to the pixel values of the pixel points in the candidate regions; and determine the test parameters for the camera according to the pixel values of the pixel points in the target regions.

[0066] Among them, the way for the embodiments of the present application to divide the target image block according to the pixel values of the pixel points in the target image block to obtain candidate regions of the target image block can be: when the pixel values of the pixel points in the target image block meet the preset pixel value threshold, the pixel points corresponding to the pixel values that meet the preset pixel threshold are used as target pixel points; when the number of target pixel points existing in the preset region where the target pixel points are located is greater than or equal to the quantity threshold, the preset region is used as a candidate region.

[0067] There can be multiple preset pixel value thresholds, so that the target image block can be divided into multiple candidate regions according to the preset pixel value thresholds.

[0068] The preset regions can be divided according to the number of pixel points. In the embodiments of the present application, the target image block can be divided into multiple preset regions according to the preset number of pixel points in advance.

[0069] Among them, the method for screening out the target area from the candidate area according to the pixel values of the pixel points in the candidate area in the embodiments of the present application may be: the embodiments of the present application may calculate the average pixel value of all the pixel points in the candidate area; when the average pixel value is greater than or equal to the preset average value, the candidate area corresponding to the average pixel value greater than or equal to the preset average value is used as the target area.

[0070] Among them, the method for determining the test parameters for the camera according to the pixel values of the pixel points in the target area in the embodiments of the present application may be: the computer device calculates the target brightness value in the target area according to the pixel values of the pixel points in the target area; and uses the target brightness value as the test parameter for the imaging effect of the camera.

[0071] When the image to be measured is an RGB - format image, the embodiments of the present application may use formula (1) to calculate the brightness value of the pixel point. Formula (1) is as follows:

[0072] Formula (1)

[0073] Among them, R refers to the R value of the R channel of the image to be measured, G refers to the G value of the G channel of the image to be measured, B refers to the B value of the B channel of the image to be measured, and Y refers to the brightness value of the pixel point.

[0074] The embodiments of the present application may calculate the average brightness value of the target area according to the brightness value of each pixel point in the target area; and use the average brightness value as the target brightness value in the target area.

[0075] Among them, the embodiments of the present application may also use the brightness value of any one pixel point in the target area as the target brightness value in the target area.

[0076] For example, the computer device may calculate the candidate brightness value of each pixel point in the target image block according to the pixel values of the pixel points in the target image block; screen out the maximum candidate brightness value and the minimum candidate brightness value from the candidate brightness values; determine the sharpness value of the target image block according to the maximum candidate brightness value and the minimum candidate brightness value; and use the sharpness value of the target image block as the test parameter for the imaging effect of the camera.

[0077] Among them, the embodiments of the present application may calculate the candidate brightness value of each pixel point in the target pixel block according to formula (1).

[0078] Among them, the embodiments of the present application may calculate the sharpness value, which can be obtained by calculating the MTF using the maximum candidate brightness value and the minimum candidate brightness value. See the following:

[0079] Formula (2)

[0080] Among them, Acutance represents the sharpness value; represents the texture sharpness of the luminance signal of the image to be measured, which can be calculated by formula (3). represents the texture sharpness of the target luminance signal of the target image block, which can be calculated by formula (7).

[0081] Formula (3)

[0082] wherein, refers to the modulation transfer function. In the embodiments of the present application, it can be calculated by formula (4); represents the capabilities defined by the computer device, which can be calculated by formula (5); represents the contrast sensitivity function, which can be calculated by formula (6); represents the cut-off spatial frequency. In the embodiments of the present application, it can take .

[0083] Formula (4)

[0084] wherein, represents the maximum candidate luminance value, represents the minimum candidate luminance value.

[0085] Formula (5)

[0086] wherein, represents the display observation coefficient when the image to be measured is 100% displayed at 100 ppi (pixel density) on the computer device. In the embodiments of the present application, take ; refers to the spatial frequency, and the unit of

[0087] Formula (6)

[0088] wherein, , , can all be constants, = 1, = 0.2, = 0.8, represents the spatial frequency.

[0089] Formula (7)

[0090] By calculating using the above formula, the present application embodiment can obtain the sharpness value of the target image block.

[0091] S104. Determine the test result of the imaging effect of the camera according to the test parameters.

[0092] Among them, when the test parameter is the target brightness value, the manner in which the computer device determines the test result of the imaging effect of the camera according to the test parameter can be as follows:

[0093] For example, the computer device obtains the pixel values of the pixels in the preset image block corresponding to the target area according to the pixel values of the pixels in the target area; calculates the reference brightness value in the preset image block according to the pixel values of the pixels in the preset image block; and determines the test result for the imaging effect of the camera according to the difference value between the reference brightness value and the target brightness value.

[0094] Among them, in the present application embodiment, the preset image block corresponding to the target area is obtained according to the pixel values of the pixels in the target area. The preset image block is an area in the preset image, and the preset image is a standard 24-color chart. When the standard 24-color chart is made, the values of the R channel, G channel, and B channel are measured in the laboratory. The preset image is as Figure 7 shown. The areas of different colors respectively represent different preset image blocks, and the preset image blocks are sequentially marked with the R value of the R channel, the G value of the G channel, and the B value of the B channel.

[0095] The present application embodiment can compare the pixel value of the preset image block with the average value of the pixel values of all the pixels in the target area. If the difference value between the pixel value of the preset image block and the average value of the pixel values of all the pixels in the target area is within the preset range, it is determined that the preset image block is the preset image block corresponding to the target area. The pixel value of the preset image block may refer to the average pixel value of all the pixels in the preset image block.

[0096] For example, in the present application embodiment, the target area may be the area in the first image block in Figure 6 , and the preset image block is the F area in Figure 7 .

[0097] The present application embodiment can calculate the reference brightness value of the B area through formula (1).

[0098] In the present application embodiment, when the test parameter is the target brightness value, the test parameter characterizes the exposure degree of the camera imaging.

[0099] In the present application embodiment, the smaller the difference value between the reference brightness value and the target brightness value, the more accurate the test result is, that is, the smaller the exposure deviation of the imaging effect of the camera is.

[0100] When the test parameter is the sharpness value, the sharpness value characterizes the clarity of the camera imaging. The smaller the difference between the sharpness value and the numerical value 1, and when the sharpness value is less than 1, it indicates that the test result is clearer, that is, it indicates that the clarity of the imaging effect of the camera is better. When the sharpness value is greater than 1, it indicates that there is an oversharpening situation in the camera imaging.

[0101] In the embodiment of the present application, a to-be-tested image is collected by a camera, and the to-be-tested image includes a region identifier; the to-be-tested image is subjected to region extraction according to the region identifier to obtain a target image block; a test parameter for the camera is determined according to the pixel values of the pixel points in the target image block; a test result of the imaging effect of the camera is determined according to the test parameter; since the embodiment of the present application can determine the test parameter for the camera according to the pixel values of the pixel points in the target image block, and determine the test result of the imaging effect of the camera according to the test parameter, it can avoid subjective judgment, and thus can accurately reflect the imaging effect of the camera through the test result.

[0102] In addition, in the embodiment of the present application, the test result of the imaging effect of the camera can also be obtained by manually observing the to-be-tested image in a computer device.

[0103] To better implement the above method, the embodiment of the present application also provides an image test device, which can be integrated in a computer device, such as a server or a terminal, etc. The terminal can include a tablet computer, a notebook computer, and / or a personal computer, etc.

[0104] For example, as Figure 8 shown, the image test device may include a collection unit 301, an extraction unit 302, a first determination unit 303, and a second determination unit 304, as follows:

[0105] Collection unit 301;

[0106] The collection unit 301 can be used to collect a to-be-tested image through a camera, and the to-be-tested image includes a region identifier.

[0107] Extraction unit 302;

[0108] The extraction unit 302 can be used to perform region extraction on the to-be-tested image according to the region identifier to obtain a target image block.

[0109] In some embodiments, the extraction unit 302 can specifically be used to obtain a template image, match the template image with the to-be-tested image to obtain the position of the region identifier in the to-be-tested image; perform region extraction according to the position of the region identifier to obtain a target image block.

[0110] In some embodiments, the area identifier includes multiple area identifiers; the extraction unit 302 can be specifically configured to compare the positions of adjacent area identifiers among the multiple area identifiers; if there is a deviation value between the positions of adjacent area identifiers that is less than a preset threshold, determine the adjacent area identifiers as target area identifiers; and perform area extraction according to the positions where the target area identifiers are located to obtain target image blocks.

[0111] The first determination unit 303;

[0112] The first determination unit 303 can be used to determine test parameters for the camera according to the pixel values of the pixel points in the target image block.

[0113] In some embodiments, the first determination unit 303 can be specifically configured to perform area division on the target image block according to the pixel values of the pixel points in the target image block to obtain candidate areas of the target image block; screen out target areas from the candidate areas according to the pixel values of the pixel points in the candidate areas; and determine test parameters for the camera according to the pixel values of the pixel points in the target areas.

[0114] In some embodiments, the first determination unit 303 can be specifically configured to calculate a target brightness value in the target area according to the pixel values of the pixel points in the target area; and use the target brightness value as a test parameter for the imaging effect of the camera.

[0115] In some embodiments, the first determination unit 303 can be specifically configured to calculate a candidate brightness value for each pixel point in the target image block according to the pixel values of the pixel points in the target image block; screen out the maximum candidate brightness value and the minimum candidate brightness value from the candidate brightness values; determine the sharpness value of the target image block according to the maximum candidate brightness value and the minimum candidate brightness value; and use the sharpness value of the target image block as a test parameter for the imaging effect of the camera.

[0116] The second determination unit 304;

[0117] The second determination unit 304 can be used to determine a test result for the imaging effect of the camera according to the test parameters.

[0118] In some embodiments, the second determination unit 304 can be specifically configured to obtain the pixel values of the pixel points in a preset image block corresponding to the target area according to the pixel values of the pixel points in the target area; calculate a reference brightness value in the preset image block according to the pixel values of the pixel points in the preset image block; and determine a test result for the imaging effect of the camera according to the difference value between the reference brightness value and the target brightness value.

[0119] As can be seen from the above, the acquisition unit 301 of the embodiment of the present application can be used to collect a to-be-tested image through a camera, and the to-be-tested image includes a region identifier; the extraction unit 302 can be used to perform region extraction on the to-be-tested image according to the region identifier to obtain a target image block; the first determination unit 303 can be used to determine a test parameter for the camera according to the pixel values of the pixel points in the target image block; the second determination unit 304 can be used to determine a test result of the imaging effect of the camera according to the test parameter; since the embodiment of the present application can determine the test parameter for the camera according to the pixel values of the pixel points in the target image block and determine the test result of the imaging effect of the camera according to the test parameter, subjective judgment can be avoided, and thus the imaging effect of the camera can be accurately reflected by the test result.

[0120] The embodiment of the present application also provides a computer device, as Figure 9 shown, which shows a schematic structural diagram of the computer device involved in the embodiment of the present application. Specifically:

[0121] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art can understand that Figure 9 the structural diagram of the computer device shown in

[0122] does not constitute a limitation on the computer device, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Among them:

[0123] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, computer programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the computer device. In addition, the memory 402 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 402 can also include a memory controller to provide the processor 401 with access to the memory 402.

[0124] The computer device further includes a power supply 403 for powering each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0125] The computer device may further include an input unit 404, which can be used to receive input digital or character information for communication, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0126] Although not shown, the computer device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 401 in the computer device will load the executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 will run the computer programs stored in the memory 402 to realize various functions as follows:

[0127] Collect a to-be-tested image through a camera, where the to-be-tested image includes a region identifier; extract a region from the to-be-tested image according to the region identifier to obtain a target image block; determine test parameters for the camera according to the pixel values of the pixel points in the target image block; determine a test result of the imaging effect of the camera according to the test parameters.

[0128] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.

[0129] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a computer program or by controlling related hardware through a computer program. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0130] For this reason, an embodiment of the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute any one of the image testing methods provided by the embodiments of the present application.

[0131] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated here.

[0132] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

[0133] Since the instructions stored in the computer-readable storage medium can execute the steps in any one of the image testing methods provided by the embodiments of the present application, the beneficial effects achievable by any one of the image testing methods provided by the embodiments of the present application can be achieved. For details, reference may be made to the previous embodiments and will not be elaborated here.

[0134] Among them, according to one aspect of the present application, there is provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various alternative implementations provided in the above embodiments.

[0135] The above provides a detailed introduction to an image testing method, device, computer device, and computer-readable storage medium provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, based on the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. An image testing method, characterized in that, Including: Collecting a to-be-tested image through a camera, where the to-be-tested image includes area identifiers, and the area identifiers include multiple area identifiers; Obtaining a template image, and matching the template image with the to-be-tested image to obtain the positions of the area identifiers in the to-be-tested image; Comparing the positions of adjacent area identifiers among the multiple area identifiers; If there is a deviation value between the positions of adjacent area identifiers that is less than a preset threshold, determining the adjacent area identifiers as target area identifiers; Performing area extraction according to the positions of the target area identifiers to obtain target image blocks; Calculating a candidate brightness value for each pixel point in the target image block according to the pixel values of the pixel points in the target image block; Screening out the maximum candidate brightness value and the minimum candidate brightness value from the candidate brightness values; Determining the sharpness value of the target image block according to the maximum candidate brightness value and the minimum candidate brightness value; Taking the sharpness value of the target image block as a test parameter for the imaging effect of the camera; The sharpness value is calculated by the following formula: ; Among them, Acutance represents the sharpness value; represents the texture sharpness of the luminance signal of the image to be measured, represents the texture sharpness of the target luminance signal of the target image block; Among them, , ; refers to the modulation transfer function, represents the capabilities defined by the computer device, represents the contrast sensitivity function, represents the cut-off spatial frequency; Expressed as: ; Among them, represents the maximum candidate luminance value, represents the minimum candidate luminance value; Expressed as: ; Among them, represents the display observation coefficient when the computer device displays the image to be measured at 100% with a pixel density of 100 ppi (pixels per inch), taking , refers to the spatial frequency, with the unit of cycles / degree; Expressed as: ; Among them, , , can all be constants, = 1, = 0.2, = 0.8, represents the spatial frequency; Determining the test result of the imaging effect of the camera according to the test parameter; 2. The image testing method according to claim 1, wherein The determining the test parameter for the camera according to the pixel values of the pixel points in the target image block includes: Performing area division on the target image block according to the pixel values of the pixel points in the target image block to obtain candidate areas of the target image block; Screening out target areas from the candidate areas according to the pixel values of the pixel points in the candidate areas; Determining the test parameter for the camera according to the pixel values of the pixel points in the target areas; 3. The image testing method according to claim 2, wherein The determining the test parameter for the camera according to the pixel values of the pixel points in the target areas includes: Calculating a target brightness value in the target areas according to the pixel values of the pixel points in the target areas; Taking the target brightness value as a test parameter for the imaging effect of the camera; 4. The image testing method according to claim 3, wherein The determining the test result of the imaging effect of the camera according to the test parameter includes: Obtaining the pixel values of the pixel points in the preset image block corresponding to the target areas according to the pixel values of the pixel points in the target areas; Calculating a reference brightness value in the preset image block according to the pixel values of the pixel points in the preset image block; Determining the test result of the imaging effect of the camera according to the difference value between the reference brightness value and the target brightness value; 5. An image testing device, characterized in that, Including: An acquisition unit for collecting a to-be-tested image through a camera, where the to-be-tested image includes area identifiers, and the area identifiers include multiple area identifiers; An extraction unit for obtaining a template image, and matching the template image with the to-be-tested image to obtain the positions of the area identifiers in the to-be-tested image; Comparing the positions of adjacent area identifiers among the multiple area identifiers; if there is a deviation value between the positions of adjacent area identifiers that is less than a preset threshold, determining the adjacent area identifiers as target area identifiers; performing area extraction according to the positions of the target area identifiers to obtain target image blocks; A first determination unit, configured to calculate a candidate brightness value for each pixel point in a target image block according to the pixel values of the pixel points in the target image block; screen out a maximum candidate brightness value and a minimum candidate brightness value from the candidate brightness values; determine a sharpness value of the target image block according to the maximum candidate brightness value and the minimum candidate brightness value; and use the sharpness value of the target image block as a test parameter for the imaging effect of the camera. The sharpness value is calculated by the following formula: ; Among them, Acutance represents the sharpness value; represents the texture sharpness of the luminance signal of the image to be measured, represents the texture sharpness of the target luminance signal of the target image block; Among them, , ; refers to the modulation transfer function, represents the capabilities defined by the computer device, represents the contrast sensitivity function, represents the cut-off spatial frequency; Expressed as: ; Among them, represents the maximum candidate luminance value, represents the minimum candidate luminance value; Expressed as: ; Among them, represents the display observation coefficient when the computer device displays the image to be measured at 100% with a pixel density of 100 ppi (pixels per inch), taking , refers to the spatial frequency, whose unit is cycles / degree; Expressed as: ; Among them, , , can all be constants, = 1, = 0.2, = 0.8, represents the spatial frequency; A second determination unit, configured to determine a test result of the imaging effect of the camera according to the test parameter.

6. A computer device, characterized in that, It includes a memory and a processor; the memory stores a computer program, and the processor is configured to run the computer program in the memory to execute the image test method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the image test method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Camera detection method and device, storage medium and electronic device

    CN110493595A