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

By acquiring multiple correct images to determine standard similarity values ​​and tolerance values, and setting thresholds to compare the images under test, the problem of low comparison accuracy in image variation scenarios is solved, achieving higher image testing accuracy and anomaly detection.

CN115294053BActive Publication Date: 2026-06-26DIGITAL ZHEJIANG TECH OPERATION CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DIGITAL ZHEJIANG TECH OPERATION CO LTD
Filing Date
2022-08-02
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing automated image testing methods cannot accurately determine image consistency when images change, resulting in low comparison accuracy and errors.

Method used

By acquiring multiple correct images of the same scene, standard similarity values ​​and tolerance values ​​are determined, a first threshold is set, and the image to be tested is compared with the benchmark image to determine whether its similarity value meets the requirements. Furthermore, images that do not meet the requirements are compared with the abnormal image library, and abnormal results are output or added to the abnormal image library.

Benefits of technology

It improves the contrast accuracy in scenarios with image changes, reduces errors caused by image changes within a reasonable range, and ensures the accuracy of the contrast results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294053B_ABST
    Figure CN115294053B_ABST
Patent Text Reader

Abstract

The application provides an image testing method and device, electronic equipment and computer readable storage medium, the method comprises the following steps: acquiring multiple correct images under the same scene; determining a standard similarity value and a fault tolerance value based on the multiple correct images, and determining a first threshold value based on the standard similarity value and the fault tolerance value; acquiring a to-be-tested image; comparing the to-be-tested image with a reference image to obtain a similarity value of the to-be-tested image; comparing the similarity value of the to-be-tested image with the first threshold value to determine whether the to-be-tested image meets the requirements; the application improves the accuracy of the comparison result by setting the fault tolerance value for the scene where the image changes, and reduces the errors caused by the changes of the image within a reasonable range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically, to an image testing method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] Software information systems are developing rapidly, with increasing integration and complexity. For software testers, this necessitates a large amount of repetitive verification work to ensure the accuracy of these integrated systems. This leads to the need for a new automated image processing framework to acquire images and compare them against each other to determine if they meet requirements, thus achieving the goal of verifying the normality of the acquired images.

[0003] Existing technical solutions have implemented a basic process for automating image comparison. They can achieve good results in consistency verification for scenarios where images do not change. However, they cannot determine image consistency in scenarios where data changes frequently or images change. In reality, images will change to some extent in most scenarios. For changed images, the accuracy of existing technologies will have a large deviation, resulting in low comparison precision and errors. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide an image testing method, apparatus, electronic device and computer-readable storage medium that improves the accuracy of comparison results of changing images in the same scene.

[0005] In a first aspect, embodiments of the present invention provide an image testing method, the method comprising: acquiring multiple correct images in the same scene; determining a standard similarity value and a tolerance value based on the multiple correct images, and determining a first threshold based on the standard similarity value and the tolerance value; acquiring an image to be tested; comparing the image to be tested with a reference image to obtain a similarity value of the image to be tested; and comparing the similarity value of the image to be tested with the first threshold to determine whether the image to be tested meets the requirements.

[0006] In a preferred embodiment of the present invention, the steps of determining a standard similarity value and a tolerance value based on multiple correct images include: determining a reference image from multiple correct images; comparing the multiple correct images with the reference image to obtain multiple similar values; taking the largest value among the multiple similar values ​​as the standard similar value; taking the smallest value among the multiple similar values ​​as the lowest similar value, and determining a tolerance value based on the lowest similar value.

[0007] In a preferred embodiment of the present invention, after the step of acquiring the image to be tested, the method further includes: performing size adjustment processing and normalization processing on the image to be tested.

[0008] In a preferred embodiment of the present invention, an abnormal image library is pre-established, which includes multiple abnormal images; after the step of comparing the similarity value of the image to be tested with a first threshold to determine whether the image to be tested meets the requirements, the method further includes: comparing the image that does not meet the requirements with the abnormal images in the abnormal image library to determine whether there is an image in the abnormal image library that is the same as the image that does not meet the requirements.

[0009] In a preferred embodiment of the present invention, the step of comparing the non-compliant image with abnormal images in the abnormal image library to determine whether there is an image identical to the non-compliant image in the abnormal image library includes: establishing an identification list based on the abnormal image, the identification list including keywords of the abnormal image; establishing a list to be identified based on the non-compliant image, the list to be identified including keywords of the non-compliant image; comparing the keywords of the list to be identified with the keywords of the identification list to determine whether there is an image identical to the non-compliant image in the abnormal image library; and if so, outputting an abnormal result.

[0010] In a preferred embodiment of the present invention, the step of determining whether there is an image identical to the non-compliant image in the abnormal image library includes: if the keywords of the identification list include the keywords of the identification list, determining that there is an image identical to the non-compliant image in the abnormal image library; if at least one keyword in the identification list does not belong to the keywords of the identification list, determining that there is no image identical to the non-compliant image in the abnormal image library.

[0011] In a preferred embodiment of the present invention, the method further includes: if the image does not exist, adding the non-compliant image to the abnormal image library.

[0012] Secondly, embodiments of the present invention also provide an image testing device, the device comprising: a first image acquisition module for acquiring multiple correct images of the same scene; a benchmark value determination module for determining a standard similarity value and a tolerance value based on the multiple correct images, and determining a first threshold value based on the standard similarity value and the tolerance value; a second image acquisition module for acquiring an image to be tested; a similarity value determination module for comparing the image to be tested with a benchmark image to obtain a similarity value of the image to be tested; and an image determination module for comparing the similarity value of the image to be tested with the first threshold value to determine whether the image to be tested meets the requirements.

[0013] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above-described image testing method.

[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the above-described image testing method.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] This application provides an image testing method, apparatus, electronic device, and computer storage medium. The method includes: acquiring multiple correct images of the same scene; determining a standard similarity value and a tolerance value based on the multiple correct images, and determining a first threshold based on the standard similarity value and the tolerance value; acquiring a test image; comparing the test image with a reference image to obtain a similarity value of the test image; comparing the similarity value of the test image with the first threshold to determine whether the test image meets the requirements. This invention addresses scenarios where images change by setting a tolerance value, thereby improving the accuracy of the comparison results and reducing errors caused by changes in images within a reasonable range.

[0017] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.

[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart of an image testing method provided by an embodiment of the present invention is shown;

[0021] Figure 2 A flowchart of another image testing method provided by an embodiment of the present invention is shown;

[0022] Figure 3 A schematic diagram of some common abnormal images provided in the embodiments of the present invention is shown;

[0023] Figure 4 A schematic diagram of an image testing device provided in an embodiment of the present invention is shown;

[0024] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is shown. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0026] Currently, software information systems are developing rapidly, and the level of system integration and complexity are increasing. For software testing personnel, this requires a large amount of repetitive verification work to ensure the accuracy of these integrated systems.

[0027] Existing automated image testing methods perform well for consistency checks in scenarios where images remain unchanged. However, they fail to achieve accurate image comparisons in situations where data frequently changes and images exhibit significant variations. In practical applications, images in most scenarios undergo some degree of change, and the accuracy of judgments is particularly prone to significant deviations in scenarios with substantial image variations. This can lead to comparison failures or misjudgments due to insufficient contrast, resulting in omissions and errors. Therefore, current methods that rely solely on image comparison to arrive at a final conclusion are inaccurate and unsuitable for current development.

[0028] Based on this, embodiments of the present invention provide an image testing method, apparatus, electronic device, and computer-readable storage medium, which are described below through embodiments.

[0029] Example 1

[0030] This invention provides an image testing method, see [link to relevant documentation]. Figure 1 The flowchart shown in this embodiment of the invention provides an image testing method, which includes the following steps:

[0031] Step S102: Obtain multiple correct images from the same scene;

[0032] Specifically, the system operation process usually includes multiple scenarios, i.e. multiple display interfaces. In order to test whether the interface display in the same scenario has changed, it is necessary to select multiple correct images in the same scenario first. During the operation of the system, abnormal states may occur, such as network outages or system request timeouts. The so-called correct images are the images remaining after excluding the images collected when the system is operating under abnormal states.

[0033] Furthermore, the correctly acquired images are resized and normalized to unify them under a single standard, reducing errors caused by size issues and facilitating subsequent processing.

[0034] Step S104: Determine the standard similarity value and the fault tolerance value based on multiple correct images, and determine the first threshold based on the standard similarity value and the fault tolerance value;

[0035] Specifically, one image is selected from multiple correct images as the baseline image. The remaining correct images are compared with the baseline image to obtain multiple similarity values. There are many image comparison algorithms, such as the three-histogram algorithm, perceptual hashing algorithm, and mean algorithm. Based on the above multiple similarity values, the standard similarity value S0 and the fault tolerance value E0 are determined, and the first threshold S is further determined.

[0036] Specifically, the system collects images of the main interface during operation. After removing images with obvious anomalies, N+1 correct images are obtained. One of these is used as the baseline image. The remaining N images are then compared with the baseline image to obtain N similarity values ​​R1 to R2. n , R1~R n Sort the data, take the smallest similarity value as the lowest similarity value R0, and take (1-R0) as the tolerance value E0. Then sort the data from R1 to R... n The largest similarity value is taken as the standard similarity value S0. Furthermore, the first threshold S = (S0 - E0) can be determined.

[0037] Step S106: Obtain the image to be tested;

[0038] Specifically, in actual comparisons, the image to be tested is acquired from the same scene as the reference image. In this case, there is no need to consider whether the scene is in an abnormal state when it is acquired; the image can be acquired directly.

[0039] Step S108: Compare the image to be tested with the reference image to obtain the similarity value of the image to be tested;

[0040] Specifically, the image to be tested is compared with a reference image. There are many algorithms for image comparison, but in principle, they should be consistent with the algorithm used to calculate S0. The similarity value R between the image to be tested and the reference image is determined using the aforementioned algorithm. a .

[0041] Step S110, compare the similarity value of the image to be tested with the first threshold to determine whether the image to be tested meets the requirements;

[0042] Specifically, compare R a with the first threshold S to determine whether the image to be tested meets the requirements; if R a > S, it indicates that the image to be tested meets the requirements; if R a < S, it indicates that the image to be tested does not meet the requirements.

[0043] The embodiments of the present invention bring the following beneficial effects:

[0044] This application provides an image testing method, which includes: obtaining multiple correct images in the same scene; determining a standard similarity value and a fault tolerance value based on the multiple correct images, and determining a first threshold based on the standard similarity value and the fault tolerance value; obtaining an image to be tested; comparing the image to be tested with a reference image to obtain the similarity value of the image to be tested; comparing the similarity value of the image to be tested with the first threshold to determine whether the image to be tested meets the requirements; for the scenario where the image changes, the present invention improves the accuracy of the comparison result by setting the fault tolerance value, and reduces the errors caused by the image changing within a reasonable range.

[0045] Embodiment 2

[0046] The embodiment of the present invention provides an image testing method, which is implemented on the basis of the above embodiment. The algorithm used for image comparison is the same as that in the above embodiment and will not be elaborated here. Refer to Figure 2 [[ID=२४]]the flowchart of another image testing method provided by the embodiment of the present invention shown in

[0047] Step S202, obtain multiple correct images in the same scene;

[0048] Specifically, the system operation includes multiple scenes. Multiple correct images are determined based on the multiple scenes. Exemplarily, correct images of M scenes are obtained under the same system. Here, the correct images have the same meaning as above and the processing process is also the same, so it will not be elaborated here.

[0049] Step S204, determine a standard similarity value and a fault tolerance value based on the multiple correct images, and determine a first threshold based on the standard similarity value and the fault tolerance value;

[0050] Specifically, the method for determining the first threshold for a single scene can be implemented by the following steps:

[0051] A1, determine the reference image from the multiple correct images;

[0052] A2, compare the multiple correct images with the reference image to obtain multiple similarity values;

[0053] A3, take the largest value among the multiple similarity values ​​as the standard similarity value;

[0054] A4, take the smallest value among the multiple similarity values ​​as the lowest similarity value;

[0055] A5, determine the fault tolerance value based on the lowest similarity value.

[0056] Specifically, images are collected from M scenes in the system. After removing images with obvious anomalies, N+1 correct images are obtained for each scene. For any given scene, one of these images is used as the baseline image, and the remaining N images are compared with the baseline image to obtain N similarity values ​​R1 to R2. n , R1~R n Sort the samples and take the smallest similarity value R. 0i Where i represents any number from 1 to M, corresponding to M scenarios, which is equivalent to obtaining M R... 0i , will R 0i Arrange the data, take the minimum value as the lowest similarity value R0, and take (1-R0) as the tolerance value E0. Then, group M into R1~R0. n The largest similarity value is taken as the standard similarity value S0. Furthermore, the first threshold S = (S0 - E0) can be determined.

[0057] Furthermore, in some systems, R0 is greater than 90%. Therefore, to reduce errors, the fault tolerance value E0 can be further increased. E0 can be set to 10%, so the first threshold S = (S0 - 10%).

[0058] Step S206: Obtain the image to be tested;

[0059] Specifically, during the test, the image to be tested is acquired, and a baseline image in the same scene is extracted accordingly.

[0060] Step S208: The image to be tested is resized and normalized.

[0061] The image to be tested is resized and normalized to unify the image to be tested with the standard image under the same standard, thereby reducing errors caused by size issues and facilitating subsequent processing.

[0062] Step S210: Compare the image to be tested with the reference image to obtain the similarity value of the image to be tested;

[0063] Specifically, the image to be tested is compared with a reference image to determine the similarity value R between the two images. a .

[0064] Step S212, compare the similarity value of the image to be measured with the first threshold to determine whether the image to be measured meets the requirements;

[0065] Specifically, compare R a with the first threshold S to determine whether the image to be measured meets the requirements; if R a > S, execute step S214, indicating that the image to be measured meets the requirements, and also indicating that the scene where the image to be measured is collected has not changed or the change is within an acceptable range;

[0066] If R a < S, it means that the image to be measured does not meet the requirements, indicating that the scene corresponding to the image to be measured has changed greatly or the system is in an abnormal operating state. Further, execute step S216 to compare the non - compliant image with the abnormal images to determine whether there are identical images;

[0067] Specifically, first, establish an abnormal image library, which contains H abnormal images. An abnormal image is an image displayed on the scene interface when the system is in an abnormal state. See Figure 3 the schematic diagrams of some common abnormal images shown: Abnormal image (A) is a common image displayed on the interface when the network is not smooth. Abnormal image (B) is the image displayed on the interface when the account has no permission to access the content. The abnormal situation corresponding to abnormal image (C) is generally: website abnormality, DNS (Domain Name System) setting abnormality, etc. Abnormal image (D) usually corresponds to a gateway error or an invalid gateway.

[0068] Further, perform OCR (Optical Character Recognition) text recognition on each abnormal image in the abnormal image library, and pre - establish an identification list L 0k , where k represents any number from 1 to H. The identification list includes the keywords corresponding to the abnormal images. Exemplarily, the identification list L 01 corresponding to abnormal image (A) includes the keywords: request timeout, network, no, and connection. The identification list L 03 corresponding to abnormal image (C) includes the keywords: 400, Bad, and Request; at the same time, each identification list also corresponds to different abnormal results. The abnormal result corresponding to the identification list L 01 is a network connection abnormality, and the abnormal result corresponding to the identification list L <​​​​​​0k any one of them (e.g., L) 01 If all elements are included, it means that the image under test is related to L. 01 If the corresponding abnormal image is the same, execute step S218 to output the abnormal result, i.e., output the recognition list L. 01 The corresponding abnormal result is a network connection error.

[0070] Furthermore, if at least one keyword in the list to be identified is not included in all L... 0k In step S220, images that do not meet the requirements are added to the abnormal image library;

[0071] Specifically, the image to be tested is added to the abnormal image library, and a corresponding recognition list and abnormal results are established.

[0072] This application provides an image testing method. By determining a standard similarity value and a tolerance value, a first threshold is obtained. The similarity value of the image to be tested is compared with the first threshold to determine whether the image meets the requirements. Furthermore, images that do not meet the requirements are compared with images in an abnormal image library, and abnormal results are output or abnormal images are added to the abnormal image library. This invention addresses scenarios where images change, improves the accuracy of comparison results by setting a tolerance value, reduces errors caused by changes in images within a reasonable range, intuitively obtains the results of comparison anomalies, and continuously updates the abnormal image library to make it more comprehensive.

[0073] Example 3

[0074] Corresponding to the above method embodiments, this invention provides an image testing device, such as... Figure 4 The diagram shows an image testing apparatus, which includes:

[0075] The first image acquisition module 401 is used to acquire multiple correct images of the same scene;

[0076] The benchmark value determination module 402 is used to determine a standard similarity value and a fault tolerance value based on multiple correct images, and to determine a first threshold based on the standard similarity value and the fault tolerance value;

[0077] The second image acquisition module 403 is used to acquire the image to be tested;

[0078] The similarity value determination module 404 compares the image to be tested with the reference image to obtain the similarity value of the image to be tested;

[0079] The image determination module 405 is used to compare the similarity value of the image to be tested with the first threshold to determine whether the image to be tested meets the requirements.

[0080] This application provides an image testing device that further determines a standard similarity value and a first threshold by acquiring multiple correct images of the same scene; compares the similarity value obtained by comparing the image to be tested with a reference image with the first threshold to determine whether the image to be tested meets the requirements; this invention improves the accuracy of the comparison results by setting a tolerance value for scenarios where the image changes, and reduces errors caused by changes in the image within a reasonable range.

[0081] In some embodiments, the above apparatus further includes an image adjustment module for resizing and normalizing the correct image and the image to be tested;

[0082] In some embodiments, the above apparatus further includes an abnormal image comparison module, used to compare the non-compliant image with abnormal images in an abnormal image library, and determine whether there is an image in the abnormal image library that is the same as the non-compliant image;

[0083] In some embodiments, the above-described apparatus further includes an OCR text recognition module for building a recognition list based on an image;

[0084] In some embodiments, the above-described apparatus further includes an abnormal result output module, which outputs an abnormal result corresponding to the abnormal image if the image that does not meet the requirements is found to be the same image in a tremor image library.

[0085] The image testing apparatus provided in this embodiment of the invention can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the apparatus provided in this embodiment of the invention are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the apparatus embodiments can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, apparatuses, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.

[0086] Example 4

[0087] This invention also provides an electronic device for running the above-described image testing method; see [link to previous document]. Figure 5 The diagram shows the structure of an electronic device, which includes a memory 100 and a processor 101. The memory 100 is used to store one or more computer instructions, which are executed by the processor 101 to implement the above-mentioned business information processing method.

[0088] Furthermore, Figure 5 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 101, the communication interface 103 and the memory 100 connected via the bus 102.

[0089] The memory 100 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0090] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. Processor 101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 100, and processor 101 reads information from memory 100 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0091] The computer program product for image testing provided in this embodiment of the invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0092] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0093] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0094] In addition, the functional units in the embodiments provided by the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0095] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0096] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0097] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. All should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An image testing method, characterized in that, The method includes: Acquire multiple correct images from the same scene; A standard similarity value and a tolerance value are determined based on multiple correct images, and a first threshold is determined based on the standard similarity value and the tolerance value; wherein, the first threshold is the difference between the standard similarity value and the tolerance value; Acquire the image to be tested; The image to be tested is compared with a reference image to obtain a similarity value for the image to be tested; The similarity value of the image to be tested is compared with the first threshold to determine whether the image to be tested meets the requirements; The step of determining the standard similarity value and the fault tolerance value based on the multiple correct images includes: The reference image is determined from multiple correct images; The multiple correct images are compared with the reference image to obtain multiple similarity values; The largest value among the multiple similarity values ​​is taken as the standard similarity value; The smallest value among the plurality of similarity values ​​is taken as the lowest similarity value, and a fault tolerance value is determined based on the lowest similarity value; wherein, the fault tolerance value is the difference between 1 and the lowest similarity value.

2. The image testing method according to claim 1, characterized in that, After the step of acquiring the image to be tested, the method further includes: The image to be tested is subjected to size adjustment and normalization processing.

3. The image testing method according to claim 1, characterized in that, An abnormal image library is pre-established, which includes multiple abnormal images; After the step of comparing the similarity value of the image to be tested with the first threshold to determine whether the image to be tested meets the requirements, the method further includes: The non-compliant image is compared with the abnormal images in the abnormal image library to determine whether there is an image in the abnormal image library that is identical to the non-compliant image.

4. The image testing method according to claim 3, characterized in that, The step of comparing the non-compliant image with the abnormal images in the abnormal image library to determine whether there is an image identical to the non-compliant image in the abnormal image library includes: An identification list is established based on the abnormal image, and the identification list includes keywords of the abnormal image; A list of images to be identified is established based on the images that do not meet the requirements, and the list of images to be identified includes keywords of the images that do not meet the requirements; The keywords in the list to be identified are compared with the keywords in the list to be identified to determine whether there is an image in the abnormal image library that is the same as the image that does not meet the requirements. If an exception exists, output the result.

5. The image testing method according to claim 4, characterized in that, The step of determining whether there is an image identical to the non-compliant image in the abnormal image library includes: If the keywords in the identification list include the keywords in the list to be identified, it is determined that there is an image in the abnormal image library that is identical to the image that does not meet the requirements; If at least one keyword in the list of keywords to be identified does not belong to the list of keywords, it is determined that there is no image in the abnormal image library that is the same as the image that does not meet the requirements.

6. The image testing method according to claim 4, characterized in that, The method further includes: If the image does not exist, add the non-compliant image to the abnormal image library.

7. An image testing device, characterized in that, The device includes: The first image acquisition module is used to acquire multiple correct images of the same scene; A baseline value determination module is used to determine a standard similarity value and a tolerance value based on multiple correct images, and to determine a first threshold based on the standard similarity value and the tolerance value; wherein, the first threshold is the difference between the standard similarity value and the tolerance value; The second image acquisition module is used to acquire the image to be tested; The similarity value determination module compares the image to be tested with the reference image to obtain the similarity value of the image to be tested; An image determination module is used to compare the similarity value of the image to be tested with the first threshold to determine whether the image to be tested meets the requirements; The benchmark value determination module is used to determine the benchmark image from multiple correct images; compare the multiple correct images with the benchmark image to obtain multiple similarity values; take the largest value among the multiple similarity values ​​as the standard similarity value; take the smallest value among the multiple similarity values ​​as the minimum similarity value, and determine a tolerance value based on the minimum similarity value; wherein, the tolerance value is the difference between 1 and the minimum similarity value.

8. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the image testing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the image testing method according to any one of claims 1 to 6.