Image processing method and device, electronic device, and computer readable medium

By acquiring the image to be processed in real time and performing feature point matching and mapping area detection, the problem of cross-terminal detection diversity and low detection accuracy in image processing is solved, and efficient automated testing of terminal images is achieved.

CN113313125BActive Publication Date: 2024-09-27BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110662853.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-15
Publication Date
2024-09-27
Estimated Expiration
2041-06-15

Smart Images

  • Figure CN113313125B
    Figure CN113313125B
Patent Text Reader

Abstract

The present disclosure provides an image processing method and device, which relates to technical fields such as image processing and deep learning. The specific implementation scheme is: acquiring the image to be processed in real time; extracting feature points of the image to be processed to obtain a feature point set to be tested of the image to be processed, and the feature point set to be tested includes at least one feature point to be tested; matching the feature point set to be tested with a target feature point set of a preset target image to obtain at least one matching point pair; based on at least one matching point pair, performing region mapping on the image to be processed to obtain a mapping region of the image to be processed; based on the mapping region and the target image, detecting the image to be processed to obtain a detection result. This implementation improves the accuracy of image detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, specifically to technical fields such as image processing and deep learning, and in particular to an image processing method and device, an electronic device, a computer-readable medium, and a computer program product. Background Art

[0002] China now has a huge number of mobile phone users, and its rich applications have become a must-have for mobile phone users. In order for an application to be chosen by users for a long time, it must have a good interactive interface and useful functions. Therefore, a lot of testing work needs to be done before the product is released online, and a large part of the testing work is to test the correctness of the interactive interface display in various scenarios. Summary of the invention

[0003] Provided are an image processing method and apparatus, an electronic device, a computer-readable medium, and a computer program product.

[0004] According to a first aspect, an image processing method is provided, the method comprising: acquiring an image to be processed in real time; extracting feature points of the image to be processed to obtain a set of feature points to be tested of the image to be processed; matching the set of feature points to be tested with a target feature point set of a preset target image to obtain at least one matching point pair; performing region mapping on the image to be processed based on at least one matching point pair to obtain a mapping region of the image to be processed; and detecting the image to be processed based on the mapping region and the target image to obtain a detection result.

[0005] According to a second aspect, an image processing device is provided, which includes: an acquisition unit, configured to acquire an image to be processed in real time; an extraction unit, configured to extract feature points of the image to be processed to obtain a set of feature points to be tested of the image to be processed; a matching unit, configured to match the set of feature points to be tested with a target feature point set of a preset target image to obtain at least one matching point pair; a mapping unit, configured to perform region mapping on the image to be processed based on at least one matching point pair to obtain a mapping region of the image to be processed; and an acquisition unit, configured to detect the image to be processed based on the mapping region and the target image to obtain a detection result.

[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any implementation manner of the first aspect.

[0007] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method described in any implementation of the first aspect.

[0008] According to a fifth aspect, a computer program product is provided, comprising a computer program, which implements the method described in any implementation manner of the first aspect when executed by a processor.

[0009] The image processing method and device provided by the embodiments of the present disclosure firstly acquire the image to be processed in real time; secondly, extract feature points of the image to be processed to obtain the feature point set to be tested of the image to be processed; thirdly, match the feature point set to be tested with the target feature point set of the preset target image to obtain at least one matching point pair; then, based on the at least one matching point pair, perform region mapping on the image to be processed to obtain the mapping region of the image to be processed; finally, based on the mapping region and the target image, perform detection on the image to be processed to obtain the detection result. Thus, the mapping region is determined by extracting feature points, and image detection is performed based on the mapping region, which improves the accuracy of image detection, realizes real-time automated testing of images on the terminal, and solves the problem of cross-terminal detection diversity while improving the image test accuracy of the terminal.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0012] Figure 1 is a flow chart of an embodiment of an image processing method according to the present disclosure;

[0013] Figure 2 is a schematic diagram of matching an image to be processed and a target image on the same terminal according to an embodiment of the present disclosure;

[0014] Figure 3 is a schematic diagram of matching the image to be processed and the target image on different terminals according to an embodiment of the present disclosure;

[0015] Figure 4 is a flow chart of a method for real-time acquisition of an image to be processed disclosed herein;

[0016] Figure 5 is a schematic structural diagram of an embodiment of an image processing device according to the present disclosure;

[0017] Figure 6It is a block diagram of an electronic device used to implement the image processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0019] Figure 1 A process 100 according to an embodiment of the image processing method of the present disclosure is shown. The image processing method comprises the following steps:

[0020] Step 101: Acquire the image to be processed in real time.

[0021] In this embodiment, the image to be processed is an image to be detected that is acquired in real time by the execution subject on which the image processing method is running. According to different detection requirements, the provider of the image to be processed may be different. For example, in order to detect whether the interface image displayed by the application on the mobile terminal meets the expected scene, the image to be processed may be a picture obtained by taking a screenshot of the image displayed in real time on the mobile terminal.

[0022] Optionally, the image to be processed may be an image stored in a database. The execution entity on which the image processing method runs obtains the image to be processed from the application of the terminal according to the detection requirements and saves it in the database, so that the execution entity can obtain the image to be processed from the database in real time, thereby providing data support for image detection.

[0023] Optionally, the image to be processed may also be different images generated in real time by an application on the terminal performing real-time tasks (for example, display tasks of a communication interface), for example, an opening interface image displayed after the communication application is triggered; or an interface image of communication being displayed when the communication application sends a communication signal to the outside.

[0024] Step 102: extract feature points from the image to be processed to obtain a set of feature points to be tested for the image to be processed.

[0025] There are three main types of image features, namely points, lines, and surfaces. Point features are one of the most common features, including edge points, center points, and intersection points of different objects in the image. Feature point extraction methods include Moravec algorithm, SIFT (Scale Invariant Feature Transform) algorithm, and improved SIFT algorithm.

[0026] In this embodiment, the feature point set to be tested includes at least one feature point to be tested, and each feature point to be tested has its own attributes, including: position, pixel value, etc. When extracting feature points from the image to be processed, feature points can also be extracted from the target image at the same time to obtain a target feature point set of the target image, and the target feature point set of the target image can include at least one target feature point. In this embodiment, the target image is a preset image that meets the expected scene. By matching the image to be processed with the target image, it is determined whether the image to be processed has a high degree of similarity with the target image, thereby achieving the purpose of detecting the image to be processed.

[0027] Step 103 : Match the feature point set to be tested with the target feature point set of the preset target image to obtain at least one matching point pair.

[0028] In this embodiment, matching the feature point set to be tested with the target feature point set refers to how to find the feature point to be tested that is most similar to each target feature point in the target feature point set in the feature point set to be tested. A variety of matching methods can be used to match the feature point set to be tested with the target feature point set. For example, a brute-force matching method (Brute-FroceMatcher) is used to calculate the distance between a target feature point in the target feature point set and each feature point to be tested in the feature point set to be tested, and then the obtained distances are sorted, and the feature point to be tested with the closest distance is taken as the matching point in the matching point pair.

[0029] It should be noted that the brute force matching method is simple and crude, and its result is obvious. However, in actual practice, the matching point pairs obtained by the brute force matching method contain a large number of incorrect matching point pairs, which requires the use of some mechanisms to filter out the incorrect matching point pairs.

[0030] Step 104: Based on at least one matching point pair, perform region mapping on the image to be processed to obtain a mapping region of the image to be processed.

[0031] In this embodiment, the mapping area is the area in the image to be processed that is related to the at least one matching point pair, that is, the area with the highest matching degree with the target image. The feature point set to be tested in the mapping area has the highest similarity with the target feature point set of the target image.

[0032] Step 105: Based on the mapping area and the target image, the image to be processed is detected to obtain a detection result.

[0033] In this embodiment, the target image and the image to be processed may be two images displayed or stored on the same carrier (eg, terminal, server), or the target image and the image to be processed may be two images displayed or stored on different carriers.

[0034] like Figure 2As shown, the display mechanism for the target image M and the image to be processed displayed or stored in the same carrier is the same. When the image to be processed is detected, the image to be processed in the mapping area C is directly compared with the target image M for similarity. If the similarity is greater than the similarity threshold (for example, 90%), it is determined that the image to be processed is qualified, and the image to be processed in the mapping area meets the image display requirements. The detection result is output, and the detection result may include: confidence and the position identifier of the target range, wherein the confidence is determined by the range of the similarity comparison, and the position identifier of the target range includes: the coordinates of the upper left corner of the mapping area, the length of the mapping area, the width of the mapping area, etc. When the similarity is less than the similarity threshold, it is determined that the image to be processed is unqualified, and the output detection result is empty. When the detection result is empty, it means that the expected result is incorrect and the cause of the problem needs to be investigated.

[0035] like Figure 3 As shown, for the target image M' and the image to be processed which are respectively displayed or stored in different carriers, it is necessary to perform image transformation on the target image M' according to the different display mechanisms of the carriers where the two are located, and compare the similarity between the image C' in the mapping area and the transformed target image. If the similarity is greater than a similarity threshold (for example, 90%), it is determined that the image to be processed is qualified, the image to be processed in the mapping area meets the image display requirements, and the detection result is output.

[0036] This embodiment provides an image processing method, which uses a relatively fine feature detection and matching algorithm. On the one hand, it can realize fine-grained image processing, and on the other hand, it is also robust to changes in resolution such as scaling. Therefore, the target image can use preset public image resources, which reduces the cost of manual detection of the image to be processed and improves the detection efficiency of the image to be processed.

[0037] The image processing method provided by the embodiment of the present disclosure firstly acquires the image to be processed in real time; secondly, extracts feature points of the image to be processed to obtain the feature point set to be tested of the image to be processed; thirdly, matches the feature point set to be tested with the target feature point set of the preset target image to obtain at least one matching point pair; then, based on the at least one matching point pair, performs region mapping on the image to be processed to obtain the mapping region of the image to be processed; finally, based on the mapping region and the target image, performs detection on the image to be processed to obtain the detection result. Thus, the mapping region is determined by extracting feature points, and the image processing is performed based on the mapping region, which improves the accuracy of image processing, realizes real-time automated testing of images on the terminal, and solves the problem of cross-terminal detection diversity while improving the image testing accuracy of the terminal.

[0038] Figure 4A flowchart 400 of a method for real-time acquisition of an image to be processed according to the present disclosure is shown. The method for real-time acquisition of an image to be processed comprises the following steps:

[0039] Step 401, obtaining a test task from a test task list.

[0040] In this embodiment, the test task can be a task for testing an application on the terminal. The test task can be used to test whether the display program executed by the application is correct, and the execution subject can obtain the image to be processed corresponding to the test task from the terminal application. The success or failure of the terminal application executing the test task can be determined through the image to be processed.

[0041] Before executing the test task, a test framework can be installed on the terminal. For interface design testing, a UI (User Interface) test framework (such as UI Automator) can be used. The UI test framework is suitable for cross-system and cross-application functional UI testing of installed applications. The operator can use the UI test framework to view in real time whether the interactive interface meets the expected results. The execution subject can also obtain the image to be processed in real time through the UI test framework, and save the image to be processed in the database to provide data support for subsequent image processing.

[0042] Step 402: Allocate the test task to the terminal to run the test task on the terminal.

[0043] In this embodiment, the test task is a task applicable to the terminal. After the terminal executes the test task, it generates a to-be-detected picture corresponding to the test task.

[0044] In this embodiment, the terminal includes at least one, and the model and operating system of each terminal are not limited. At least one application is installed on each terminal. After receiving the interface display task, the application of each terminal can present a user interface image with the same effect.

[0045] Step 403: receiving in real time the image to be processed corresponding to the test task sent by the terminal.

[0046] In this optional implementation, first, the execution entity on which the image processing method runs triggers the test task, generates a task list including at least one test task, and distributes it to multiple terminals. The multiple terminals start running their respective test tasks. Each test task will generate a corresponding image to be processed. Each terminal uploads its own image to be processed to the execution entity. The execution entity detects each image to be processed and gives a detection result to determine whether the test is successful or not. In the event of failure, the result is fed back to analyze possible vulnerabilities such as functional interaction.

[0047] Optionally, the execution entity on which the image processing method runs obtains in real time and displays the image to be tested through the UI test framework, and the operator checks whether the image to be processed meets the target image. When the image to be processed is unqualified, the vulnerability of the application executing the test task on the terminal is checked or the problem of the test task.

[0048] The method for obtaining the image to be processed provided by this optional implementation method allocates test tasks in the test task list to the terminal so that each terminal generates the image to be processed, and achieves the purpose of automated testing of the terminal's image by receiving the image to be processed sent by the terminal in real time, thereby ensuring the real-time testing effect of the terminal's image to be processed.

[0049] In some optional implementations of the present embodiment, the above-mentioned detection of the image to be processed based on the mapping area and the target image to obtain the detection result includes: cropping the image to be processed based on the mapping area to obtain a cropped image; in response to detecting that the cropped image and the target image have the same size, calculating the similarity between the cropped image and the target image; in response to determining that the similarity between the cropped image and the target image is greater than a set threshold, determining that the image to be processed is qualified.

[0050] In this optional implementation, after obtaining the mapping area, the image to be processed in the mapping area is cropped, thereby accurately determining the position in the image to be processed that corresponds to the target image; further, when the size of the cropped image is the same as that of the target image, the similarity between the cropped image and the target image is used to detect whether the image to be processed is qualified, thereby ensuring the reliability of the detection of the image to be processed.

[0051] In some optional implementations of the present embodiment, the above-mentioned detection of the image to be processed based on the mapping area and the target image to obtain the detection result also includes: in response to detecting that the size of the cropped image is different from that of the target image, scaling the cropped image so that the scaled cropped image has the same size as the target image.

[0052] In this optional implementation, an image scaling algorithm or an image scaling model may be used to scale the cropped image to obtain a cropped image having the same size as the target image.

[0053] In this optional implementation, when the sizes of the cropped image and the target image are inconsistent, the reliability of the similarity comparison between the cropped image and the target image is ensured by scaling the cropped image.

[0054] In some optional implementations of the present embodiment, the above-mentioned matching of the feature point set to be tested with the target feature point set of a preset target image to obtain at least one matching point pair includes: using a feature matching algorithm to match the feature point set to be tested with the target feature point set of the target image to obtain at least one initial point pair; screening at least one initial point pair to obtain at least one matching point pair.

[0055] In this optional implementation, the feature matching algorithm can adopt the kNN classification algorithm (k-NearestNeighbor). The core idea of ​​the kNN algorithm is: if most of the k nearest neighboring samples of a sample in the feature space belong to a certain category, then the sample also belongs to this category and has the characteristics of the samples in this category. This classification algorithm only determines the category of the sample to be classified based on the category of one or several nearest samples in determining the classification decision.

[0056] In this optional implementation, each matching point pair belongs to at least one initial point pair, and the matching point is a point pair with more accurate pairing obtained after screening at least one initial point pair. Each initial point pair and each matching point include corresponding target feature points and feature points to be measured.

[0057] In this optional implementation, after using the feature matching algorithm to match the feature point set to be tested with the target feature point set, the accuracy of the initial point pairs obtained is not high. By screening the initial point pairs, relatively accurate matching point pairs are obtained, which ensures the accuracy of the matching results of the feature point sets of the image to be processed and the target image.

[0058] In some optional implementations of the present embodiment, the above-mentioned screening of at least one initial point pair to obtain at least one matching point pair includes: for each initial point pair of the at least one initial point pair, determining the target feature point and the second closest target feature point in the initial point pair that are closest to the feature point to be measured; respectively calculating the ratio of the Euclidean distance between the closest target feature point and the second closest target feature point; in response to the ratio being greater than a set threshold, treating the initial point pair as a matching point pair.

[0059] In this optional manner, the aforementioned nearest target feature point and the second nearest target feature point may be one feature point or multiple feature points.

[0060] In this optional implementation, the accuracy of the obtained matching point pair is ensured by the ratio of the Euclidean distance between the target feature point closest to the feature point to be measured and the second closest target feature point in the initial point pair.

[0061] Optionally, the above-mentioned screening of at least one initial point pair to obtain at least one matching point pair may also include: for each initial point pair of at least one initial point pair, determining the feature point to be tested that is closest to the target feature point and the second closest feature point to be tested in the initial point pair; respectively calculating the ratio of the Euclidean distance between the nearest feature point to be tested and the second closest feature point to be tested; when the ratio of the Euclidean distance between the nearest feature point to be tested and the second closest feature point to be tested is greater than a set threshold, treating the initial point pair as a matching point pair; when the ratio of the Euclidean distance between the nearest feature point to be tested and the second closest feature point to be tested is less than or equal to the set threshold, discarding the initial point.

[0062] In this optional manner, the nearest feature point to be measured and the second nearest feature point to be measured may be one feature point or multiple feature points.

[0063] In some optional implementations of the present embodiment, screening at least one initial point pair to obtain at least one matching point pair also includes: based on the target feature points in the at least one matching point pair, using a homography transformation to obtain a mask matrix; based on the mask matrix, removing erroneous matching point pairs in the at least one matching point pair.

[0064] In this optional implementation, homography transformation is used to describe the position mapping relationship between the world coordinate system and the pixel coordinate system of an object. Each matching point pair includes a corresponding target feature point and a feature point to be measured. The target feature points in all matching point pairs are mapped to the corresponding feature points to be measured on the image to be processed by homography transformation, and a mask matrix reflecting the mapping state can be calculated.

[0065] The mask matrix is ​​used to block the image to control the image area or processing process. Through the mask matrix, each pixel value in the image can be recalculated. The mask matrix controls the influence of the pixels at the current position and surrounding positions of the old image on the pixel value at the current position of the new image.

[0066] In this embodiment, an erroneous matching point pair means that a corresponding feature point to be tested cannot be found for the current target feature point on the image to be processed through homography transformation, or the current feature point to be tested on the image to be processed has no corresponding target feature point on the target image. At this time, the erroneous matching point pair needs to be removed to achieve the purpose of optimizing the feature point set to be tested.

[0067] In this embodiment, the mask matrix obtained by homography transformation can effectively distinguish the correctness of the feature points to be measured mapped on the plane where the image to be processed is located, and the mask matrix is ​​used to filter out the erroneous feature points on the image to be processed, thereby filtering out the erroneous feature points in the feature point set to be measured.

[0068] In this optional implementation, the mask matrix obtained by homography transformation reflects the correct or incorrect mapping points of the target feature points on the image to be processed, thereby ensuring the reliability of the screening of matching point pairs.

[0069] In some optional implementations of the present embodiment, the above-mentioned area mapping of the image to be processed is performed based on at least one matching point pair to obtain the mapping area of ​​the image to be processed, including: determining all feature points to be measured corresponding to all matching points on the image to be processed based on at least one matching point pair; connecting all feature points to be measured that are closest to the border of the image to be processed to form a mapping curve surrounding all feature points to be measured; and using the area surrounded by the mapping curve as the mapping area of ​​the image to be processed.

[0070] In this optional implementation, all the feature points to be measured on the image to be processed are first determined, and the feature points to be measured that are closest to the border of the image to be processed are connected to form a mapping area, thereby ensuring the reliability of the mapping area.

[0071] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an image processing device, which is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0072] like Figure 5 As shown, the image processing device 500 provided in this embodiment includes: an acquisition unit 501, an extraction unit 502, a matching unit 503, a mapping unit 504, and a obtaining unit 505. The acquisition unit 501 can be configured to acquire the image to be processed in real time. The extraction unit 502 can be configured to extract feature points of the image to be processed to obtain a feature point set to be tested of the image to be processed, and the feature point set to be tested includes at least one feature point to be tested. The matching unit 503 can be configured to match the feature point set to be tested with a target feature point set of a preset target image to obtain at least one matching point pair. The mapping unit 504 can be configured to perform region mapping on the image to be processed based on at least one matching point pair to obtain a mapping region of the image to be processed. The obtaining unit 505 can be configured to detect the image to be processed based on the mapping region and the target image to obtain a detection result.

[0073] In this embodiment, in the image processing device 500, the specific processing of the acquisition unit 501, the extraction unit 502, the matching unit 503, the mapping unit 504, and the obtaining unit 505 and the technical effects thereof can be referred to respectively. Figure 1 The relevant descriptions of step 101, step 102, step 103, step 104, and step 105 in the corresponding embodiments are not repeated here.

[0074] In some optional implementations of this embodiment, the acquisition unit 501 includes: an acquisition module (not shown in the figure), an allocation module (not shown in the figure), and a receiving module (not shown in the figure). The acquisition module can be configured to acquire a test task from a test task list. The allocation module can be configured to allocate the test task to a terminal to run the test task on the terminal. The receiving module can be configured to receive in real time an image to be processed corresponding to the test task sent by the terminal.

[0075] In some optional implementations of this embodiment, the obtaining unit 505 includes: a cropping module (not shown in the figure), a calculation module (not shown in the figure), and a determination module (not shown in the figure). The cropping module can be configured to crop the image to be processed based on the mapping area to obtain a cropped image. The calculation module can be configured to calculate the similarity between the cropped image and the target image in response to detecting that the size of the cropped image is the same as that of the target image. The determination module can be configured to determine that the image to be processed is qualified in response to determining that the similarity between the cropped image and the target image is greater than a set threshold.

[0076] In some optional implementations of this embodiment, the obtaining unit 505 further includes: a scaling module (not shown in the figure). The scaling module may be configured to scale the cropped image in response to detecting that the size of the cropped image is different from that of the target image, so that the scaled cropped image has the same size as the target image.

[0077] In some optional implementations of this embodiment, the matching unit 503 includes: a matching module (not shown in the figure), and a screening module (not shown in the figure). The matching module can be configured to use a feature matching algorithm to match the feature point set to be tested with the target feature point set of the target image to obtain at least one initial point pair. The screening module can be configured to screen at least one initial point pair to obtain at least one matching point pair.

[0078] In some optional implementations of this embodiment, the screening module includes: a determination submodule (not shown in the figure), a calculation submodule (not shown in the figure), and a screening submodule (not shown in the figure). Among them, the determination submodule can be configured to determine, for each initial point pair of at least one initial point pair, the target feature point closest to the feature point to be measured and the second closest target feature point in the initial point pair. The calculation submodule can be configured to calculate the ratio of the Euclidean distance between the closest target feature point and the second closest target feature point, respectively. The screening submodule can be configured to, in response to the ratio being greater than a set threshold, treat the initial point pair as a matching point pair.

[0079] In some optional implementations of this embodiment, the screening module further includes: an obtaining submodule (not shown in the figure) and a removing submodule (not shown in the figure). The obtaining submodule may be configured to obtain a mask matrix based on the target feature points in at least one matching point pair by using a homography transformation. The removing submodule may be configured to remove an erroneous matching point pair in at least one matching point based on the mask matrix.

[0080] In some optional implementations of this embodiment, the mapping unit 504 includes: an adaptation module (not shown in the figure), a connection module (not shown in the figure), and a localization module (not shown in the figure). The adaptation module can be configured to determine all feature points to be measured corresponding to all matching points on the image to be processed based on at least one matching point pair. The connection module can be configured to connect all feature points to be measured that are closest to the border of the image to be processed to form a mapping curve surrounding all feature points to be measured. The localization module can be configured to use the area surrounded by the mapping curve as the mapping area of ​​the image to be processed.

[0081] The image processing device provided by the embodiment of the present disclosure is as follows: first, the acquisition unit 501 acquires the image to be processed in real time; second, the extraction unit 502 extracts feature points of the image to be processed to obtain the feature point set to be tested of the image to be processed; third, the matching unit 503 matches the feature point set to be tested with the target feature point set of the preset target image to obtain at least one matching point pair; third, the mapping unit 504 performs region mapping on the image to be processed based on at least one matching point pair to obtain the mapping region of the image to be processed; finally, the acquisition unit 505 detects the image to be processed based on the mapping region and the target image to obtain the detection result. Thus, the mapping region is determined by extracting feature points, and image detection is performed based on the mapping region, which improves the accuracy of image detection, realizes real-time automated testing of images on the terminal, and solves the problem of cross-terminal detection diversity while improving the image test accuracy of the terminal.

[0082] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0083] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0084] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0085] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0086] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as image processing methods. For example, in some embodiments, the image processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the image processing method in any other appropriate manner (e.g., by means of firmware).

[0087] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0088] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable image processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0089] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0090] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0091] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0092] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0093] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0094] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0095] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. An image processing method, the method comprising: Acquire the image to be processed in real time; Extracting feature points from the image to be processed to obtain a set of feature points to be tested for the image to be processed; Matching the feature point set to be tested with a target feature point set of a preset target image to obtain at least one matching point pair; Based on the at least one matching point pair, determining all feature points to be measured corresponding to all matching points on the image to be processed; Connecting all the feature points to be measured that are closest to the border of the image to be processed to form a mapping curve surrounding all the feature points to be measured; and using the area surrounded by the mapping curve as the mapping area of ​​the image to be processed; Based on the mapping area and the target image, the image to be processed is detected to obtain a detection result, including: based on the mapping area, the image to be processed is cropped to obtain a cropped image; in response to detecting that the cropped image and the target image have the same size, the similarity between the cropped image and the target image is calculated; in response to determining that the similarity between the cropped image and the target image is greater than a set threshold, the image to be processed is determined to be qualified.

2. The method according to claim 1, wherein: The real-time acquisition of the image to be processed comprises: Get the test task from the test task list; Allocating the test task to a terminal to run the test task on the terminal; The image to be processed corresponding to the test task and sent by the terminal is received in real time.

3. The method according to claim 1, wherein: The detecting the image to be processed based on the mapping area and the target image to obtain a detection result further includes: In response to detecting that the sizes of the cropped image and the target image are different, the cropped image is scaled so that the scaled cropped image has the same size as the target image.

4. The method according to any one of claims 1 to 3, wherein: The step of matching the feature point set to be measured with a target feature point set of a preset target image to obtain at least one matching point pair comprises: Using a feature matching algorithm to match the feature point set to be tested with the target feature point set of the target image to obtain at least one initial point pair; The at least one initial point pair is screened to obtain at least one matching point pair.

5. The method according to claim 4, wherein: The screening of the at least one initial point pair to obtain at least one matching point pair comprises: For each of the at least one initial point pair, determining a target feature point and a second closest target feature point in the initial point pair that are closest to the feature point to be measured; Respectively calculating the ratio of the Euclidean distance between the nearest target feature point and the second nearest target feature point; In response to the ratio being greater than a set threshold, the initial point pair is regarded as a matching point pair.

6. The method according to claim 5, wherein: The screening of the at least one initial point pair to obtain at least one matching point pair further comprises: Based on the target feature points in the at least one matching point pair, a mask matrix is ​​obtained by using a homography transformation; Based on the mask matrix, an erroneous matching point pair in the at least one matching point pair is removed.

7. An image processing device, comprising: An acquisition unit, configured to acquire the image to be processed in real time; An extraction unit is configured to extract feature points from the image to be processed to obtain a set of feature points to be tested for the image to be processed; A matching unit, configured to match the feature point set to be measured with a target feature point set of a preset target image to obtain at least one matching point pair; The mapping unit comprises: an adaptation module configured to determine all feature points to be measured corresponding to all matching points on the image to be processed based on the at least one matching point pair; a connection module configured to connect all feature points to be measured that are closest to the border of the image to be processed to form a mapping curve surrounding all feature points to be measured; and a localization module configured to use the area surrounded by the mapping curve as the mapping area of ​​the image to be processed; The obtaining unit is configured to detect the image to be processed based on the mapping area and the target image to obtain a detection result, including: a cropping module, configured to crop the image to be processed based on the mapping area to obtain a cropped image; a calculation module, configured to calculate the similarity between the cropped image and the target image in response to detecting that the cropped image and the target image have the same size; a determination module, configured to determine that the image to be processed is qualified in response to determining that the similarity between the cropped image and the target image is greater than a set threshold.

8. The device according to claim 7, wherein: The acquisition unit comprises: An acquisition module is configured to acquire a test task from a test task list; an allocating module, configured to allocate the test task to a terminal so as to run the test task on the terminal; The receiving module is configured to receive in real time the image to be processed corresponding to the test task sent by the terminal.

9. The device according to claim 7, wherein: The obtaining unit further comprises: The scaling module is configured to scale the cropped image in response to detecting that the sizes of the cropped image and the target image are different, so that the scaled cropped image has the same size as the target image.

10. The device according to any one of claims 7 to 9, wherein: The matching unit comprises: A matching module is configured to match the feature point set to be tested with the target feature point set of the target image using a feature matching algorithm to obtain at least one initial point pair; The screening module is configured to screen the at least one initial point pair to obtain at least one matching point pair.

11. The device according to claim 10, wherein: The screening module comprises: A determination submodule is configured to determine, for each of the at least one initial point pair, a target feature point that is closest to the feature point to be measured and a target feature point that is next closest to the feature point to be measured in the initial point pair; A calculation submodule is configured to respectively calculate the ratio of the Euclidean distance between the nearest target feature point and the second nearest target feature point; The screening submodule is configured to, in response to the ratio being greater than a set threshold, regard the initial point pair as a matching point pair.

12. The device according to claim 11, wherein The screening module also includes: An obtaining submodule is configured to obtain a mask matrix by using a homography transformation based on the target feature points in the at least one matching point pair; The removal submodule is configured to remove an erroneous matching point pair in the at least one matching point based on the mask matrix.

13. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.

15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 6.