Methods and systems for image processing and storage media thereof

By filtering pixel points in images based on gradients and values to identify target points for similarity calculations, the method reduces computational load and enhances processing efficiency in template matching.

JP2026522483APending Publication Date: 2026-07-07ZHEJIANG HUARAY TECH CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
ZHEJIANG HUARAY TECH CO LTD
Filing Date
2024-06-26
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing template matching methods in computer image processing are computationally intensive due to the complexity of similarity calculations, particularly in shape-based matching, which requires significant computational resources and inefficient processing.

Method used

A method and system that filters pixel points in an image based on pixel gradients and values, determining target pixel points for similarity calculations, reducing the number of points involved and lowering computational load by performing similarity calculations only on these target points.

Benefits of technology

Improves the efficiency of template matching by reducing computational requirements and enhancing processing speed through targeted similarity calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026522483000001_ABST
    Figure 2026522483000001_ABST
Patent Text Reader

Abstract

A method and system for image processing and a storage medium thereof are provided. The method includes the step of acquiring an image to be matched. The image to be matched includes a plurality of pixel points. The method includes the step of acquiring pixel reference information for each of the plurality of pixel points. The pixel reference information includes first reference information relating to the pixel gradient of the pixel point and second reference information relating to the pixel values ​​of both the pixel point and the adjacent pixel points of the pixel point. The method includes the step of determining whether a pixel point is a target pixel point based on the pixel reference information, wherein the target pixel point is a pixel point whose pixel value is not a preset value. The method further includes the step of determining an initial similarity between the target pixel point and the pixel points in the template image depending on whether the pixel point is a target pixel point, and the step of determining the similarity between the image to be matched and the template image based on at least one initial similarity corresponding to at least one target pixel point.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] Cross-reference of related applications This application claims priority to Chinese Patent Application No. 202310767480.3, filed on 26 June 2023, the entirety of which is incorporated herein by reference.

[0002] This disclosure relates to the field of image processing, and more particularly to a method and system for determining image similarity, and a storage medium thereof. [Background technology]

[0003] Computer image processing is a widely used technology, and template matching is a crucial component of it. Template matching involves using a specific algorithm to find the region in a target image that most closely matches the features of a template image. This is the first step in machine vision applications, and the accuracy and speed of the matching are critical to the application's success. Template matching typically uses shape-based matching methods that require extracting edge features from an image and calculating the similarity between the target image and the template image based on these features. A common method for calculating similarity is by calculating the cosine angle, which involves a large amount of computation and cumbersome steps, resulting in inefficient template matching and high computational performance requirements. [Overview of the project] [Problems that the invention aims to solve]

[0004] Therefore, it is desirable to provide a method and system for image processing, as well as a storage medium, that improves the efficiency of template matching and reduces the requirements for computational performance. [Means for solving the problem]

[0005] One embodiment of the present disclosure provides a method to be implemented on a computing device comprising at least one processor and at least one storage device. The method includes the step of acquiring an image to be matched. The image to be matched comprises a plurality of pixel points. For each of the plurality of pixel points, the method includes the step of acquiring pixel reference information for the pixel point. The pixel reference information comprises first reference information relating to the pixel gradient of the pixel point and second reference information relating to the pixel values ​​of both the pixel point and the adjacent pixel points of the pixel point. The method includes the step of determining, based on the pixel reference information, whether a pixel point is a target pixel point, wherein the target pixel point is a pixel point whose pixel value is not a preset value. Depending on whether a pixel point is a target pixel point, the method further includes the step of determining an initial similarity between the target pixel point and a pixel point in a template image, and determining a similarity between the image to be matched and a template image based on at least one initial similarity corresponding to at least one target pixel point.

[0006] In some embodiments, the step of determining whether a pixel point is a target pixel point based on pixel reference information includes the steps of determining whether the pixel reference information satisfies a first preset condition, and determining whether the pixel point is not a target pixel point if the pixel reference information satisfies the first preset condition. The first preset condition is set based on a comparison between the first reference information and a preset threshold. The method further includes the step of setting the pixel value of the pixel point to a preset value.

[0007] In some embodiments, a pre-set threshold is determined based on candidate features. Candidate features include statistical features of the contrast and gradient magnitude of the image to be matched.

[0008] In some embodiments, the candidate features further include the contrast of candidate regions within the image to be matched.

[0009] In some embodiments, the candidate features correspond to multiple candidate regions within the image to be matched, where at least one of the shapes or sizes of the multiple candidate regions is different, and the contrast of the candidate regions is determined based on a weighted calculation of the contrasts of the multiple candidate regions.

[0010] In some embodiments, the pre-set threshold is determined based on processing speed requirements and the statistical characteristics of the gradient magnitude of the image to be matched.

[0011] In some embodiments, the step of determining whether a pixel point is a target pixel point based on pixel reference information further includes the step of determining whether the pixel reference information satisfies a second preset condition if the pixel reference information does not satisfy a first preset condition, and the step of determining whether the pixel point is not a target pixel point if the pixel reference information satisfies the second preset condition. The second preset condition is set based on a comparison between the second reference information and a preset template. The method further includes the step of setting the pixel value of the pixel point to a preset value.

[0012] In some embodiments, the adjacent pixel points of a pixel point include eight adjacent pixel points located around the pixel point, and the preset template includes two pixel values ​​from the eight adjacent pixel points that satisfy a third preset condition, and the two adjacent pixel points are symmetric with respect to the pixel point.

[0013] In some embodiments, the adjacent pixel points of a pixel point include a first, second, third, fourth, fifth, sixth, seventh, and eighth adjacent pixel points located around the pixel point with the pixel point as the center. The first through eighth adjacent pixel points are arranged clockwise / counterclockwise around the pixel point. A pre-configured template includes the fact that the pixel values ​​of three of the eight adjacent pixel points satisfy a third pre-configuration condition, and these three adjacent pixel points correspond to one of the first, second, third, or fourth combinations of pixel points. The first combination of pixel points is the combination of the first adjacent point, the fourth adjacent point, and the seventh adjacent point; the second combination of pixel points is the combination of the third adjacent point, the fifth adjacent point, and the eighth adjacent point; the third combination of pixel points is the combination of the first adjacent point, the third adjacent point, and the sixth adjacent point; and the fourth combination of pixel points is the combination of the second adjacent point, the fifth adjacent point, and the seventh adjacent point.

[0014] In some embodiments, the third preset condition includes the pixel value being less than or equal to a preset value.

[0015] In some embodiments, the method further includes the step of performing multiple traversals on pixel points among a plurality of pixel points whose pixel reference information does not satisfy the first preset condition until a fourth preset condition is met.

[0016] In some embodiments, the fourth pre-setting condition includes at least one of the following: the ratio of the number of non-target pixel points among the plurality of pixel points to the number of the plurality of pixel points is greater than or equal to a pre-set ratio threshold; the number of traversals reaches a pre-set number; or the duration of the traversal reaches a pre-set duration.

[0017] In some embodiments, the step of determining initial similarity includes: determining whether the pixel values ​​of a predetermined number of pixel points among a plurality of pixel points are predetermined values; not determining initial similarity for a predetermined number of pixel points if all of the pixel values ​​of the predetermined number of pixel points are predetermined values; and determining initial similarity for at least one pixel point if the pixel value of at least one of the predetermined number of pixel points is not predetermined values.

[0018] In some embodiments, the preset number is determined based on the number of pixel points that at least one processor can process in parallel.

[0019] One embodiment of the present disclosure provides a system comprising at least one storage device containing a set of instructions and at least one processor communicating with the at least one storage device. When executing the set of instructions, the at least one processor causes the system to perform an operation. This operation includes acquiring an image to be matched. The image to be matched includes a plurality of pixel points. This operation includes acquiring pixel reference information for each of the plurality of pixel points. The pixel reference information includes first reference information relating to the pixel gradient of the pixel point and second reference information relating to the pixel values ​​of both the pixel point and the adjacent pixel points of the pixel point. This operation determines, based on the pixel reference information, whether the pixel point is a target pixel point, which includes the pixel point having a pixel value that is not a preset value. Depending on whether the pixel point is a target pixel point, this operation further includes determining an initial similarity between the target pixel point and the pixel points in the template image, and determining a similarity between the image to be matched and the template image based on at least one initial similarity corresponding to at least one target pixel point.

[0020] One embodiment of the present disclosure provides a system including a first acquisition module, a second acquisition module, a first determination module, a second determination module, and a third determination module. The image acquisition module is configured to acquire an image to be matched, and the image to be matched includes a plurality of pixel points. For each of the plurality of pixel points, the second acquisition module is configured to acquire pixel reference information of the pixel point, and the pixel reference information includes first reference information regarding the pixel gradient of the pixel point and second reference information regarding the pixel values of both the pixel point and its adjacent pixel points. The first determination module is configured to determine, based on the pixel reference information, whether the pixel point is a target pixel point, and the target pixel point is a pixel point whose pixel value is not a preset value. The second determination module is configured to determine an initial similarity between the target pixel point and a pixel point in the template image in response to the pixel point being a target pixel point. The third determination module is configured to determine the similarity between the image to be matched and the template image based on at least one initial similarity corresponding to at least one target pixel point.

[0021] One embodiment of the present disclosure provides a non - transient computer - readable medium comprising executable instructions that, when executed by at least one processor, instruct the at least one processor to perform the method in the embodiments of the present disclosure.

[0022] Additional features may be partly described in the following description, and partly may become apparent to those skilled in the art by considering the following and the accompanying drawings, or may be learned by practice of the examples. The features of the present disclosure may be realized and achieved by various manners of implementation or use of the methods, means, and combinations described in the detailed examples discussed below.

[0023] The present disclosure will be further described with respect to exemplary embodiments. These exemplary embodiments will be described in detail with reference to the drawings. The drawings are not to scale. These embodiments are non-limiting exemplary embodiments, and like reference numerals represent like structures throughout the plurality of figures of the following drawings.

Brief Description of the Drawings

[0024] [Figure 1] FIG. is a schematic diagram showing an exemplary image processing system according to some embodiments of the present disclosure. [Figure 2] FIG. is a block diagram showing an exemplary image processing system according to some embodiments of the present disclosure. [Figure 3] FIG. is a flowchart showing an exemplary process of image processing according to some embodiments of the present disclosure. [Figure 4] FIG. is a flowchart showing an exemplary process of image processing according to some embodiments of the present disclosure. [Figure 5] FIG. is a flowchart showing an exemplary process of image processing according to some embodiments of the present disclosure. [Figure 6] FIG. is a schematic diagram showing an exemplary process of image processing according to some embodiments of the present disclosure. [Figure 7] FIG. is a schematic diagram showing an exemplary preset template according to some embodiments of the present disclosure. [Figure 8] FIG. is a schematic diagram showing an exemplary preset template according to some embodiments of the present disclosure.

Modes for Carrying Out the Invention

[0025] In the following detailed description, numerous specific details are given as examples to provide a complete understanding of the relevant disclosure. However, it will be apparent to those skilled in the art that the disclosure can be implemented without such details. In other instances, well-known methods, procedures, systems, components, and / or circuits are described at a relatively high level without detail to avoid unnecessarily obscuring aspects of the disclosure. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and uses without departing from the spirit and scope of the disclosure. Accordingly, the disclosure is not limited to the embodiments shown and should be given the broadest scope that coincides with the claims.

[0026] The terms used herein are intended solely to describe and not to limit to specific exemplary embodiments. Where used herein, the singular forms “a,” “an,” and “the” may also be intended to include the plural unless the context clearly indicates otherwise. Where used herein, the terms “comprise,” “comprises,” and / or “comprising,” “include,” “includes,” and / or “including” specify the presence of a described feature, integer value, step, action, element, and / or component, but do not preclude the presence or addition of one or more other features, integer values, steps, actions, elements, components, and / or groups thereof.

[0027] As used herein, the terms “system,” “engine,” “unit,” “module,” and / or “block” will be understood to be one way of distinguishing, in ascending order, different components, elements, parts, sections, or assemblies at different levels. However, terms may be replaced by other expressions if they can achieve the same purpose.

[0028] Where a unit, engine, module, or block is referred to as being "on top of," "connected to," or "combined with" another unit, engine, module, or block, it should be understood that it may also be directly on top of, directly connected to, directly combined with, or directly communicating with the other unit, engine, module, or block, or, unless otherwise clearly indicated by the context, there may be intervening units, engines, modules, or blocks. As used herein, the term "and / or" includes any or all combination of one or more of the enumerated items relating to it.

[0029] These and other features and characteristics of this disclosure, as well as the operation and function of related structural elements, and the economics of assembly and manufacture of the parts, may become more apparent by considering the following description with reference to the accompanying drawings, all of which form part of this disclosure. However, it should be clearly understood that the drawings are for illustrative and illustrative purposes only and are not intended to limit the scope of this disclosure. It should be understood that the drawings are not to scale.

[0030] Template matching typically uses edge feature-based matching. Edge feature-based matching involves calculating edge information for the image to be matched and the template image, and then performing edge matching based on that edge information to obtain the region where the edge information of objects in the image to be matched best matches the edge information of objects in the template image.

[0031] Shape-based template matching is a type of edge-feature-based matching that typically involves extracting edge features (also called edge feature vectors) from both the image to be matched and the template image, and then calculating the similarity of the gradient vectors between the template image and the image to be matched based on the edge features. The complexity of the algorithms used in the similarity calculation process makes it computationally intensive. For example, the similarity calculation process must simultaneously consider four dimensions in a 2D plane coordinate system for a 2D image: angle, scale, and X and Y directions, which places a high demand on the processing power of the processor.

[0032] This disclosure provides a method and system for determining similarity. The method includes the step of obtaining an image to be matched, wherein the image to be matched includes a plurality of pixel points. The method includes the step of obtaining pixel reference information for each of the plurality of pixel points. The pixel reference information includes first reference information relating to the pixel gradient of the pixel point and second reference information relating to the pixel values ​​of both the pixel point and the adjacent pixel points of the pixel point. The method includes the step of determining whether a pixel point is a target pixel point based on the pixel reference information, wherein the target pixel point is a pixel point whose pixel value is not a preset value. The method further includes the step of determining an initial similarity between the target pixel point and the pixel points in the template image, depending on whether the pixel point is a target pixel point, and the step of determining the similarity between the image to be matched and the template image based on at least one initial similarity corresponding to at least one target pixel point.

[0033] According to embodiments of this disclosure, pixel points in the image to be matched can be filtered based on pixel gradients and pixel values. Similarity calculations are performed only on the filtered pixel points in the image to be matched (i.e., target pixel points) and the pixel points in the template image, thereby reducing the number of pixel points involved in the similarity calculation, which in turn reduces the computational load and lowers the computational performance requirements of the processing equipment. As a result, image processing efficiency is improved.

[0034] Figure 1 is a schematic diagram showing an exemplary image processing system 100 according to some embodiments of the present disclosure. As shown in Figure 1, the image processing system 100 may include an image acquisition device 110, a processing device 120, a storage device 130, a terminal 140, and a network 150.

[0035] The image acquisition device 110 may be configured to acquire one or more images (the term “image” as used herein refers to a single image or a frame of video). In some embodiments, the image acquisition device 110 may include a camera 110-1, a video recorder 110-2, an image sensor 110-3, etc. The camera 110-1 may include a gun camera, a dome camera, an all-in-one camera, a monocular camera, a binocular camera, a multicular camera, or the like, or any combination thereof. The video recorder 110-2 may include a PC digital video recorder (DVR), an embedded DVR, or the like, or any combination thereof. The image sensor 110-3 may include a charge-coupled device (CCD) image sensor, a complementary metal-oxide-semiconductor (CMOS) image sensor, or the like, or any combination thereof. In some embodiments, the image acquisition device 110 may include a plurality of components, each capable of acquiring an image. For example, the image acquisition device 110 may include a plurality of sub-cameras capable of simultaneously capturing images or videos. In some embodiments, the image acquisition device 110 may transmit the acquired images to one or more components of the image processing system 100 (e.g., a processing unit 120, a storage device 130, a terminal 140) via the network 150.

[0036] The processing unit 120 may process information and / or data related to image processing in order to perform one or more functions described in this disclosure. For example, the processing unit 120 may acquire an image to be matched. The image to be matched may include a plurality of pixel points. For each of the plurality of pixel points, the processing unit 120 may acquire pixel reference information for the pixel point. The pixel reference information may include first reference information relating to the pixel gradient of the pixel point and second reference information relating to the pixel values ​​of the pixel point and adjacent pixel points of the pixel point. Based on the pixel reference information, the processing unit 120 may determine whether the pixel point is a target pixel point. A target pixel point may be a pixel point whose pixel value is not a preset value. Depending on whether the pixel point is a target pixel point, the processing unit 120 may determine an initial similarity between the target pixel point and the pixel point in the template image, and determine the similarity between the image to be matched and the template image based on at least one initial similarity corresponding to at least one target pixel point.

[0037] The processing unit 120 may be a single server or a group of servers. The server group may be centralized or distributed (for example, the processing unit 120 may be a distributed system). In some embodiments, the processing unit 120 may be local or remote. For example, the processing unit 120 may access information and / or data stored in the image acquisition device 110 and / or storage device 130 via the network 150. As another example, the processing unit 120 may be directly connected to the image acquisition device 110 and / or storage device 130 to access the stored information and / or data. In some embodiments, the processing unit 120 may be implemented on a cloud platform. As just one example, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an intercloud, a multicloud, or similar, or any combination thereof.

[0038] In some embodiments, the processing unit 120 may include one or more processors (e.g., single-core processors or multi-core processors). As just one example, the processing unit 120 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), an application-specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), a microprocessor, or similar, or any combination thereof.

[0039] The storage device 130 may store data and / or instructions. The data and / or instructions may be obtained, for example, from the processing unit 120, the image acquisition device 110, and / or any other components of the image processing system 100. For example, the storage device 130 may store data and / or information such as images collected by the image acquisition device 110. Alternatively, the storage device 130 may store data and / or information processed by the processing unit 120, such as the similarity of different images. In some embodiments, the storage device 130 may store data and / or instructions that the processing unit 120 may execute or use to perform the exemplary methods described herein. In some embodiments, the storage device 130 may include mass storage, removable storage, volatile read-and-write memory, read-only memory (ROM), or similar, or any combination thereof. In some embodiments, the storage device 130 may be implemented on a cloud platform. In some embodiments, the storage device 130 may be part of the processing unit 120 and / or the image acquisition device 110.

[0040] Terminal 140 can interact with a user. The user can issue operation commands to the image acquisition device 110 via Terminal 140, enabling the image acquisition device 110 to complete specific operations, such as capturing images. In some embodiments, Terminal 140 can send commands to the processing device 120 to perform exemplary methods described herein. In some embodiments, Terminal 140 can receive image similarity determination results from the processing device 120, and the user can perform further processing based on those results. In some embodiments, Terminal 140 may be one or any combination of other devices having input and / or output capabilities, such as a mobile device 140-1, a tablet computer 140-2, a laptop computer 140-3, or a desktop computer.

[0041] The network 150 may include any suitable network that can facilitate the exchange of information and / or data for the image processing system 100. In some embodiments, one or more components of the image processing system 100 (e.g., a processing unit 120, an image acquisition device 110) may communicate information and / or data with one or more other components of the image processing system 100 via the network 120. For example, the processing unit 120 may acquire an image to be matched from the image acquisition device 110 via the network 150. In some embodiments, the network 150 may be or include wired networks, wireless networks (e.g., 802.11 networks, Wi-Fi networks), etc.

[0042] It should be noted that the above description is provided for illustrative purposes only and is not intended to limit the scope of this disclosure. Those skilled in the art can make multiple variations and modifications under the teachings of this disclosure. In some embodiments, the image processing system 100 may include one or more additional components, and / or one or more components of the image processing system 100 described above may be omitted. Additionally or alternatively, two or more components of the image processing system 100 may be integrated into a single component. For example, the processing unit 120 may be integrated into the image acquisition device 110. Components of the image processing system 100 may be implemented on two or more sub-components. However, such variations and modifications do not depart from the scope of this disclosure.

[0043] Figure 2 is a block diagram showing an exemplary image processing system 200 according to some embodiments of the present disclosure. As shown in Figure 2, the image processing system 200 for processing images includes a first acquisition module 210, a second acquisition module 220, a first determination module 230, a second determination module 240, and a third determination module 250. In some embodiments, the modules of the image processing system 200 may be implemented by a processing unit 120.

[0044] The first acquisition module 210 may be configured to acquire an image to be matched. The image to be matched may include multiple pixel points. Further descriptions of acquiring the image to be matched can be found elsewhere in this disclosure (e.g., operation 310 and its description).

[0045] The second acquisition module 220 may be configured to acquire pixel reference information for each of a plurality of pixel points. The pixel reference information may include first reference information and second reference information. The first reference information relates to the pixel gradient of the pixel point, and the second reference information relates to the pixel values ​​of the pixel point and adjacent pixel points of the pixel point. Further explanation of acquiring pixel reference information can be found elsewhere in this disclosure (e.g., operation 320 and its description).

[0046] The first determination module 230 may be configured to determine whether a pixel point is a target pixel point based on pixel reference information. A target pixel point is a pixel point whose pixel value is not a preset value. Further explanation of how to determine whether a pixel point is a target pixel point can be found elsewhere in this disclosure (e.g., operation 330 and its description).

[0047] The second determination module 240 may be configured to determine the initial similarity between a target pixel point and a pixel point in the template image, depending on whether the pixel point is a target pixel point. Further explanation of the determination of initial similarity can be found elsewhere in this disclosure (e.g., operation 340 and its description).

[0048] A third determination module 250 may be configured to determine the similarity between the image to be matched and the template image based on at least one initial similarity corresponding to at least one target pixel point. Further explanation of how the similarity between the image to be matched and the template image is determined can be found elsewhere in this disclosure (e.g., operation 350 and its description).

[0049] It should be noted that the above description of the image processing system 200 is provided for illustrative purposes only and is not intended to limit the scope of the disclosure. Those skilled in the art will be able to make various modifications and changes to the forms and details of application of the system without departing from the principles of the disclosure. In some embodiments, the image processing system 200 may include one or more other modules and / or omit one or more of the modules described above. Additionally or alternatively, two or more modules may be integrated into a single module and / or a module may be divided into two or more units. For example, a first acquisition module 210 and a second acquisition module 220 may be integrated into a single module that can perform the functions of the first acquisition module 210 and the second acquisition module 220. As another example, a first determination module 230, a second determination module 240, and a third determination module 250 may be integrated into a single module that can perform the functions of the first determination module 230, the second determination module 240, and the third determination module 250. However, such variations and modifications are also included within the scope of this disclosure.

[0050] Figure 3 is a flowchart illustrating an exemplary image processing process according to some embodiments of the present disclosure. In some embodiments, process 300 may be performed by image processing system 100 and / or image processing system 200. For example, process 300 may be implemented as a set of instructions (e.g., an application) stored in a memory device (e.g., memory device 130 shown in Figure 1). In some embodiments, the processing unit 120 of image processing system 100 and / or one or more modules of image processing system 200 may execute a set of instructions and may be instructed accordingly to perform process 300.

[0051] In step 310, the image to be matched can be acquired. In some embodiments, the operation 310 may be performed by the first acquisition module 210 shown in Figure 2.

[0052] The image to be matched refers to an image that needs to be template-matched. The image to be matched may include various types of images, such as two-dimensional images and three-dimensional images. For illustrative purposes, the following description is provided with reference to a two-dimensional image and is not intended to be limiting. In some embodiments, the image to be matched may be acquired via an image acquisition device (e.g., image acquisition device 110). For example, the image to be matched may be a video frame extracted from a video captured by the image acquisition device that meets specific quality requirements (e.g., image brightness and clarity). As another example, the image to be matched may be a single image frame captured by the image acquisition device. In some embodiments, the image to be matched may be acquired via other means, such as retrieving it from a storage device (e.g., storage device 130). In some embodiments, the image to be matched may be a complete image or at least a part of a complete image. For example, the image to be matched may be a sub-image acquired by segmenting a complete image.

[0053] In some embodiments, the image to be matched may include the object to be matched and a background image, etc. The object to be matched is an object that needs to be matched with a target object in the template image, such as an animal, a person, or a vehicle. Pixel points in the background image are considered noise points. Conventional template matching involves calculating the similarity between pixel points in the background image and pixel points in the template image, but this is unnecessary, increases the computational load, and thereby reduces the efficiency of template matching.

[0054] The image to be matched may contain multiple pixel points, and the processing unit 120 may perform operations 320 to 340 for each of the multiple pixel points.

[0055] In 320, for each of the multiple pixel points, pixel reference information of the pixel point can be acquired. In some embodiments, operation 320 may be performed by a second acquisition module 220.

[0056] Pixel reference information refers to information about pixel point features. For example, information about pixel point features includes the color, brightness, grayscale, and gradient of the pixel point. In some embodiments, the processing unit 120 may process pixel points through a pre-configured image processing algorithm or machine learning model to obtain the pixel reference information of the pixel point. In some embodiments, the processing unit 120 may store the obtained pixel reference information in a storage device (e.g., storage device 130) for use in subsequent operations.

[0057] Pixel reference information may include first and second reference information. The first reference information relates to the pixel gradient of a pixel point, and the second reference information relates to the pixel values ​​of both the pixel point and its adjacent pixel points. Adjacent pixel points of a pixel point refer to pixel points adjacent to a pixel point. Two pixel points are adjacent if there are no other pixel points separating them. For example, as shown in Figure 7, the adjacent pixel points of pixel point P are located around pixel point P and may include eight pixel points 710-780 centered on pixel point P.

[0058] The first reference information may include the magnitude of the gradient of a pixel point. The processing unit 120 may obtain the pixel gradient of a pixel point based on the pixel values ​​of the pixel point and its adjacent pixel points, and may calculate the magnitude of the gradient of a pixel point based on the pixel gradient. The pixel gradient of a pixel point represents the magnitude of the change from the pixel value of the pixel point to the pixel values ​​of its adjacent pixel points. Pixel points located at the edges of objects in the image being matched and at the edges of the image being matched itself will have a large change in pixel value, resulting in a larger gradient value. Conversely, smooth regions of the image being matched will show a smaller change in pixel value, resulting in a smaller gradient value. In some embodiments, the pixel gradient of a pixel point may be determined based on the difference in pixel values ​​between its left and right adjacent pixel points, or between its above and below adjacent pixel points. A larger gradient value indicates a larger difference in pixel values. A larger difference indicates a higher probability that the pixel point belongs to the edge of an object in the image being matched, or to the edge of the image being matched itself. Therefore, obtaining the pixel gradient of pixel points within the image to be matched can be seen as extracting the contours of objects within the image to be matched and the image to be matched itself, essentially performing edge detection on the image to be matched.

[0059] In some embodiments, the processing unit 120 calculates the pixel gradient of a pixel point (m x , m y ) can be expressed as, where m x m is the gradient of the pixel points along the x-direction. y This is the gradient of the pixel point along the y-direction. Next, the magnitude of the gradient of the pixel point is

number

[0060] The second reference information may include the pixel values ​​of a pixel point and its adjacent pixel points. Pixel values ​​may include values ​​that reflect the color or brightness of the pixel point. For example, pixel values ​​may include RGB values, grayscale values, etc. For illustrative purposes, the following explanation is provided with reference to grayscale values, but this is not intended to be limiting. As a mere example, grayscale values ​​range from 0 to 255.

[0061] In 330, for each of the multiple pixel points, it can be determined whether the pixel point is a target pixel point based on the pixel reference information of the pixel point. In some embodiments, operation 330 may be performed by a first determination module 230.

[0062] A target pixel point refers to a pixel point in the image to be matched that needs to be involved in the similarity calculation. For example, a target pixel point may include an edge point of an object in the image to be matched, or an edge point of the image to be matched. In some embodiments, the processing unit 120 may determine whether the pixel reference information of a pixel point satisfies a preset condition (e.g., a first preset condition, a second preset condition). If the pixel reference information of a pixel point satisfies the preset condition, the pixel point is determined not to be a target pixel point, and its pixel value is set to the preset value. In some embodiments, a target pixel point may be a pixel point whose pixel value is not the preset value.

[0063] In some embodiments, the preset value may be 0, or a smaller pixel value such as 3, 5, or any other value not exceeding 10. The preset value may be determined in various ways. For example, the preset value may be determined empirically. As another example, the preset value may be determined based on the statistical features of the pixel values ​​of multiple pixel points in the image to be matched. Just as an example, the statistical features may include at least one of the mean, range, and variance of the pixel values ​​of multiple pixel points in the image to be matched. In some embodiments, the processor 120 may determine the preset value based on the statistical features of the pixel values ​​of multiple pixel points in the image to be matched in various ways. For example, the processor 120 may construct a lookup table of preset values ​​based on the statistical features and the corresponding baseline preset value. The baseline preset value refers to the preset value that provides the most accurate and fastest matching when used. As another example, the processor 120 may determine the preset value via a machine learning model. The input to the machine learning model may be the statistical features, and the output may be the preset value. The machine learning models may include logistic regression models, random forest models, or support vector machine (SVM) models. A detailed description of how to determine whether a pixel point is a target pixel point based on pixel reference information can be found elsewhere in this disclosure (e.g., processes 400 and 500, and their descriptions).

[0064] According to embodiments of this disclosure, by selecting several pixel points in the image to be matched (for example, pixel points whose pixel values ​​are set to a predetermined value) through pre-set conditions, the number of pixel points involved in subsequent similarity determination is reduced, thereby reducing the computational load and improving the efficiency of template matching.

[0065] In step 340, for each of the multiple pixel points, an initial similarity between the target pixel point and the pixel point in the template image can be determined, depending on whether the pixel point is a target pixel point. In some embodiments, step 340 may be performed by a second determination module 240.

[0066] A template image is an image containing a target object. The target object is an object that the user wants the image to be matched to match. Target objects can include various types, such as animals, human bodies, and vehicles. In some embodiments, the template image may contain at least a portion of the target object. For example, if the target object is a vehicle license plate, the template image may contain the vehicle license plate or a portion of it. In some embodiments, the processor 120 may obtain a template image from a user. For example, the processor 120 may obtain a template image via user input or import. In some embodiments, the processor 120 may obtain a template image by other means. For example, the processor 120 may retrieve a template image from a storage device (e.g., storage device 130). In some embodiments, after pixel points in the image to be matched are identified as target pixel points, the processor 120 may determine the initial similarity between the target pixel points and the pixel points in the template image. In some embodiments, the size and shape of the image to be matched and the template image may be the same or different. The processor 120 may perform multiple coordinate transformations on the template image. After each coordinate transformation, the initial similarity between the target pixel point in the image to be matched and the pixel point in the template image is calculated.

[0067] In some embodiments, the processing unit 120 may process a predetermined number of pixel points in the image to be matched at once. For example, the processing unit 120 may determine whether the pixel values ​​of a predetermined number of pixel points among a plurality of pixel points in the image to be matched are predetermined values. Depending on whether the pixel values ​​of all of the predetermined number of pixel points are predetermined values ​​(meaning that these pixel points are not target pixel points), the processing unit 120 may not have to determine the initial similarity of the predetermined number of pixel points. For example, the processing unit 120 may record the initial similarity of the predetermined number of pixel points as 0 or null. Depending on whether the pixel value of at least one of the predetermined number of pixel points is not predetermined (meaning that a target pixel point exists among the predetermined number), the processing unit 120 may determine the initial similarity for at least one pixel point. In other words, the processing unit 120 can calculate the initial similarity for at least one target pixel point out of a predetermined number of pixel points, while skipping the calculation of the initial similarity for non-target pixel points out of the predetermined number of pixel points, and recording their initial similarity as 0 or null. The above process of determining the initial similarity can be repeated until all pixel points in the image to be matched have been processed.

[0068] In the embodiments of this disclosure, by determining whether the pixel value of a pixel point is a preset value, it is determined whether to continue the subsequent initial similarity determination for that pixel point, thereby reducing the number of pixel points involved in the initial similarity calculation, and thereby reducing the computational load and improving the efficiency of template matching.

[0069] In some embodiments, the preset number is determined based on the number of pixel points that the processor 120 can process in parallel (also called the parallel processing capacity). For example, when using the AVX2 instruction set for processing, the processor 120 can process 16 pixel points simultaneously at one time. As another example, multithreaded parallel processing can be performed using OpenCV. Furthermore, the processor 120 may use multiple processors for parallel processing, in which case the parallel processing capacity of the processor 120 is the sum of the processing capacities of these processors. Alternatively, the processor 120 may distribute tasks across multiple processing nodes for distributed parallel processing of pixel points, where the parallel processing capacity of the processor 120 is the sum of the processing capacities of the distributed nodes.

[0070] According to embodiments of this disclosure, the number of pixel points to be processed each time is determined based on the parallel processing capability of the processing unit, and the parallel processing capability of the processing unit fully utilizes the capabilities of the unit, reduces the waste of computational resources, speeds up processing, and improves template matching efficiency.

[0071] In some embodiments, after filtering out non-target pixel points in the image to be matched, the processor 120 may select some of the remaining pixel points as target pixel points. For example, the processor 120 may sample some pixel points from the remaining pixel points using completely random sampling. As another example, the processor 120 may sample some pixel points from the remaining pixel points according to a pre-defined sampling rule. The pre-defined sampling rule may include setting more sampling points the closer to the center of the image to be matched, and setting fewer sampling points the further away from the center of the image to be matched. As just one example, the function for setting sampling points according to the pre-defined sampling rule may be a Gaussian function.

[0072] Feature points in the template image refer to pixel points within the template image that are involved in the similarity calculation. In some embodiments, feature points in the template image can be determined by various methods.

[0073] In some embodiments, feature points in the template image may include edge points. For example, edge points may include edge pixels of a target object in the template image, edge pixels of the template image itself, and so on. The processing unit 120 may determine edge points in the template image by methods such as an edge detection algorithm or a machine learning model, and designate the edge points as feature points in the template image.

[0074] In some embodiments, the processing unit 120 may select several pixel points in the template image to participate in the similarity calculation according to a pre-configured rule. The pre-configured rule may include sampling according to random sampling, placement rules, etc. Random sampling may be similar to random sampling of non-target pixel points in the image to be matched. Sampling according to a placement rule may be performed row by row or column by column. For example, sampling according to a placement rule may include sampling 10 pixel points from each row of pixel points. In some embodiments, feature points in the template image may be the intersection of edge points and pixel points selected according to the pre-configured rule.

[0075] According to embodiments of the present disclosure, some pixel points in the image to be matched are filtered based on predefined conditions. Further filtering of pixel points in both the image to be matched and the template image is performed by random sampling and / or predefined rules, thereby reducing the number of pixel points involved in the similarity calculation, lowering the computational load, and further improving the template matching efficiency.

[0076] In some embodiments, the processing unit 120 may use various similarity determination methods to determine the initial similarity between a target pixel point in the image to be matched and a pixel point in the template image. For example, the similarity determination method may include steps such as calculating the cosine angle, calculating the Euclidean distance, and calculating the Manhattan distance.

[0077] In some embodiments, the pixel points in the template image that participate in the similarity calculation along with the target pixel points are the pixel points in the template image that correspond to the target pixel points. The coordinates of the pixel points in the template image are the same as the coordinates of the target pixel points in the image being matched. Note that the target pixel points and their corresponding pixel points in the template image that participate in the similarity calculation may be called a set of pixel points.

[0078] Taking the method of determining similarity by calculating the cosine angle as an example, the following describes a method for determining the initial similarity between a target pixel point and a pixel point in a template image. The processing unit 120 can normalize the gradient of the pixel points in the template image according to the following equation (1) and convert the gradient into a gradient vector having a modulus length of unit length.

number

number

[0079] Furthermore, the processing device 120 can normalize the gradients of the pixel points in the image to be matched corresponding to the feature points in the template image in the same manner as in Equation (1), and the gradient vector obtained after processing is denoted as B. Then, the processing device 120 can determine the initial similarity between the target pixel point and the pixel point in the template image according to the following Equation (2).

Number

[0080] In some embodiments, the initial similarity calculated by equation (2) corresponds to a specific set of parameters. This specific set of parameters includes angles, scales, and positions relative to the template and target images. The ranges of values ​​for angles, scales, and positions can be preset. For example, the angle range might be from -180° to 180°, the scale range from 0.5 to 5 (unitless, representing a multiplier), and the position range might be the resolution of the template image. The processor 120 can assign values ​​to each parameter within the preset ranges of angles, scales, and positions, and then combine them into a set of parameters. Using equation (2), an initial similarity corresponding to this set of parameters can be obtained. After traversing all values ​​within the preset range, multiple initial similarities are obtained. As just one example, the processor 120 may perform a coordinate transformation on feature points in the template image based on a set of traversal parameters to obtain new coordinates. The initial similarity is then calculated based on the new coordinates. Coordinate transformations may include rotation (based on angles within the set of traversal parameters), scaling (based on scales within the set of traversal parameters), and transformations (based on positions within the set of traversal parameters). The new coordinates of feature points in the template image after the coordinate transformation may be expressed by equation (3) below.

number

[0081] It can be understood that calculating initial similarity by calculating cosine angles involves a cumbersome computational process and high algorithmic complexity. According to embodiments of the present disclosure, pixel points are filtered via pre-defined conditions related to pixel reference information, and initial similarity calculations are performed only on the filtered target pixel points, thereby reducing the number of pixel points involved in the similarity calculation, significantly reducing the amount of similarity calculation, shortening the time consumed by the calculation, and improving the speed of template matching.

[0082] In 350, the similarity between the image to be matched and the template image can be determined based on at least one initial similarity corresponding to at least one target pixel point. In some embodiments, operation 350 may be performed by a third determination module 250.

[0083] After obtaining the initial similarity between all target pixel points in the image to be matched and the corresponding pixel points in the template image, the processing unit 120 may determine the similarity between the image to be matched and the template image based on these initial similarities. The higher the similarity, the greater the match between the image to be matched and the template image. As just one example, if the initial similarity values ​​are in the range of 0 to 1, the similarity values ​​between the image to be matched and the template image may also be in the range of 0 to 1. In this case, if the similarity between the matched image and the template image is greater than or equal to a preset value (e.g., 0.95, 0.98, etc.), the image to be matched may be considered to match the template image.

[0084] In some embodiments, the processing unit 120 may further process these initial similarities and use the processing result as the similarity between the image to be matched and the template image. For example, the processing may include maximizing the result. Specifically, the processing unit 120 may take the maximum value from the multiple initial similarities obtained in operation 340 and use this maximum value as the similarity between the target image and the template image.

[0085] In some embodiments, the calculated similarity between the image to be matched and the template image may have the same range of values ​​as the initial similarity. For example, the range of values ​​may be from 0 to 1.

[0086] In some embodiments, the processing unit 120 may use the similarity between the image to be matched and the template image, obtained based on the initial similarity, as the first similarity. The processing unit 120 may determine a second similarity based on the pixel values ​​of multiple sets of pixel points in the image to be matched and the template image. The first and second similarities are weighted and summed, and the result is used as the final similarity between the image to be matched and the template image. The weight of the first similarity is greater than the weight of the second similarity. The second similarity is determined as follows: The processing unit 120 may construct a first feature vector based on the pixel values ​​of all target pixel points. The elements in the first feature vector are the pixel values ​​of the target pixel points. The processing unit 120 may then construct a second feature vector based on the pixel points in the template image corresponding to the target pixel points. The elements in the second feature vector are the pixel values ​​of these pixel points in the template image. Furthermore, the processing unit 120 may determine the similarity between the first feature vector and the second feature vector as the second similarity. A method for calculating the similarity between the first feature vector and the second feature vector may be similar to that given by equation (2).

[0087] In some embodiments, the processing unit 120 may determine a third similarity based on the initial similarity of some of the target pixel points in the image to be matched. For example, the processing unit 120 may determine a third similarity based on the initial similarity of keypoints among the target pixel points in the image to be matched. Keypoints may be pixel points whose initial similarity is equal to or greater than a set value (for example, the set value is determined based on experience).

[0088] In some embodiments, if the third similarity is less than a preset value (e.g., 0.95, 0.98, etc.), the image to be matched may be considered not to match the template image. If the third similarity is equal to or greater than the preset value, the processing unit 120 may determine a fourth similarity based on the initial similarity of the remaining target pixel points or all target pixel points in the image to be matched, and designate the fourth similarity as the similarity between the image to be matched and the template image.

[0089] As a simple example, the processing unit 120 may divide the target pixel points in the image to be matched into discrete points and non-discrete points. Discrete points are target pixel points that are relatively far apart from each other in the image to be matched (for example, pixel points at the corners of the image to be matched). Non-discrete points are the other target pixel points in the image to be matched, excluding the discrete points. The processing unit 120 may first determine a third similarity based on the discrete points. If the third similarity is less than a preset value (for example, 0.95, 0.98, etc.), the image to be matched may be considered not to match the template image. Otherwise, the processing unit 120 may determine a fourth similarity based on the non-discrete points, and based on the fourth similarity, determine whether the image to be matched matches the template image.

[0090] As another example, the processing unit 120 may determine a sub-image of a predetermined size (e.g., 3x3 pixels, 5x5 pixels, etc.) containing feature points (e.g., edge points of the template image) within the template image to be used as a matching template. The processing unit 120 may determine a fifth similarity between the matching template in the image to be matched and the corresponding sub-image. If the fifth similarity is less than a predetermined value (e.g., 0.95, 0.98, etc.), the image to be matched may be considered not to match the template image. Otherwise, the processing unit 120 may determine a sixth similarity based on the initial similarity of all target pixel points, and based on the sixth similarity, determine whether the image to be matched matches the template image.

[0091] Figure 4 is a flowchart illustrating an exemplary image processing process according to some embodiments of the present disclosure. In some embodiments, at least a portion of process 400 may be performed to achieve at least a portion of operation 330, as described in relation to Figure 3. For example, the processing unit 120 or the first determination module 230 may determine whether a pixel point in the image to be matched is a target pixel point by performing at least a portion of process 400.

[0092] In 410, for each of the multiple pixel points in the image to be matched, it can be determined whether the pixel reference information of the pixel point satisfies the first pre-set condition.

[0093] A first preset condition may be set based on a comparison between a first reference information and a preset threshold. In some embodiments, the first reference information may be the magnitude of the gradient of a pixel point, and the first preset condition may be that the magnitude of the gradient is less than a preset threshold. Satisfying the first preset condition means that the pixel point is likely not an edge point of an object in the image being matched or an edge point of the image being matched itself.

[0094] Pre-defined thresholds can be determined in various ways. For example, pre-defined thresholds can be determined based on experience, requirements, pre-defined rules, etc.

[0095] In some embodiments, a preset threshold may be determined based on candidate features of the image to be matched. Candidate features may include statistical features of the contrast and gradient magnitude of the image to be matched. As just one example, statistical features of gradient magnitude may include the mean, range, and variance of the gradient magnitude of multiple pixel points in the image to be matched. In some embodiments of this disclosure, setting a preset threshold relates to statistical features of the gradient magnitude of the image to be matched, thereby reducing the likelihood that edge pixel points in the image to be matched will be filtered out and improving the accuracy of the similarity calculation between the image to be matched and the template image.

[0096] If the contrast of the image to be matched is low, it is difficult to distinguish between objects in the image and the surrounding information. If the preset threshold is set too high, some pixel points on the objects may be filtered out, thereby causing errors in the similarity calculation between the image to be matched and the template image. Therefore, in some embodiments of this disclosure, the setting of the preset threshold is related to the contrast of the image to be matched, thereby reducing the possibility of pixel points on objects in the image to be matched being filtered out and improving the accuracy of the similarity calculation between the image to be matched and the template image. In some embodiments, the higher the contrast of the image to be matched, the higher the preset threshold may be, and the lower the contrast, the lower the preset threshold may be.

[0097] In some embodiments, the method by which the processing unit 120 determines a preset threshold may be similar to the method by which the preset value is determined in operation 330. For example, a lookup table for preset thresholds may be constructed based on statistical features of contrast, gradient magnitude, and corresponding reference preset thresholds, and the preset thresholds may be determined according to the lookup table. Another example is inputting statistical features of contrast and gradient magnitude of the image to be matched into a machine learning model to obtain an output preset threshold.

[0098] In some embodiments, candidate features may further include the contrast of candidate regions within the image to be matched. A candidate region refers to a region within the image to be matched that may contain an object.

[0099] In some embodiments, candidate features may correspond to multiple candidate regions within the image to be matched. At least one of the shapes or sizes of the multiple candidate regions may differ. As just one example, candidate regions may be determined by the following methods: selecting a representative feature of the target object in the template image (such as a circle, corner, or line segment); performing edge detection on the image to be matched and obtaining matching features from the extracted edges that are similar in shape to the representative feature; and determining the region within the smallest rectangle containing the matching feature as a candidate region. As another example, based on the previous example, any shape and size of region in the image to be matched may be determined as a candidate region, as long as it contains the matching feature. In some embodiments, the contrast of a candidate region may be determined based on a weighted calculation of the contrasts of multiple candidate regions. Specifically, the contrasts of multiple candidate regions may be weighted and summed, and the weighted sum is determined as the contrast of the candidate region.

[0100] According to embodiments of this disclosure, the contrast of a candidate region is determined based on the contrast of multiple regions, providing a more accurate contrast measurement, thereby improving the accuracy of a preset threshold and enhancing the accuracy of similarity calculations between the image to be matched and the template image.

[0101] In some embodiments, the processing unit 120 may determine a preset threshold based on the processing speed requirement and the statistical characteristics of the gradient magnitude of the image to be matched. The higher the processing speed requirement, the faster the required matching speed, and the higher the preset threshold may be (but not exceeding the upper limit). By setting the preset threshold according to the processing speed requirement, as many pixel points as possible can be filtered when the processing speed requirement is high, thereby ensuring the processing speed requirement and improving template matching efficiency, while when the processing speed requirement is not high, more pixel points are retained for similarity calculation, improving template matching accuracy.

[0102] In some embodiments, the processing unit 120 may use a pyramid model for template matching between the image to be matched and the template image. When setting a preset threshold, the higher the pyramid level, the smaller the preset threshold, thereby ensuring that more pixel points are retained at higher levels of the pyramid where fewer pixel points and more information exist, thereby ensuring the accuracy of the similarity calculation.

[0103] In some embodiments, if the pixel reference information satisfies a first pre-configuration condition, the processing unit 120 may continue to perform operations 420 and 430; otherwise, the processing unit 120 may perform process 500.

[0104] In 420, it can be determined that a pixel point is not a target pixel point if the pixel reference information satisfies the first pre-set condition.

[0105] In some embodiments, if the pixel reference information of a pixel point is determined to satisfy a first pre-set condition, the pixel point can be filtered as a noise point rather than a target pixel point, thus eliminating the need to participate in the subsequent operation 340 that calculates the initial similarity.

[0106] In 430, the pixel value of a pixel point can be set to a preset value. That is, the processing unit 120 can set the pixel value of a pixel point that is not a target pixel point to a preset value. Further explanation of how the preset value is determined can be found in operation 330 and related descriptions, but will not be repeated here.

[0107] In the embodiments of this disclosure, the number of pixel points required to participate in the similarity calculation is reduced by filtering out pixel points in the image to be matched whose gradient magnitude is less than a preset threshold, thereby significantly reducing the computational load, shortening the computation time, and improving image processing efficiency.

[0108] Figure 5 is a flowchart illustrating an exemplary image processing process according to some embodiments of the present disclosure. In some embodiments, at least a portion of process 500 may be performed to achieve at least a portion of operation 330, as described in relation to Figure 3. For example, the processing unit 120 or the first determination module 230 may determine whether a pixel point is a target pixel point by performing at least a portion of process 500.

[0109] In 510, if the pixel reference information of each of the multiple pixel points in the image to be matched does not satisfy the first pre-set condition, it can be determined whether the pixel reference information of the pixel point satisfies the second pre-set condition.

[0110] A second pre-configuration condition may be set based on a comparison between a second reference information for a pixel point and a pre-configuration template. In some embodiments, the second reference information may include the pixel values ​​of the pixel point and its adjacent pixel points. The adjacent pixel points of a pixel point may include eight adjacent pixel points located around the pixel point with the pixel point as the center. The eight adjacent pixel points of a pixel point may be sequentially referred to as the first adjacent pixel point, the second adjacent pixel point, the third adjacent pixel point, the fourth adjacent pixel point, the fifth adjacent pixel point, the sixth adjacent pixel point, the seventh adjacent pixel point, and the eighth adjacent pixel point, and are arranged in a clockwise / counterclockwise direction around the pixel point. In some embodiments, the second pre-configuration condition may be that the second reference information for a pixel point matches a pre-configuration template.

[0111] In some embodiments, a pre-configured template may include the condition that at least some of the pixel values ​​of eight adjacent pixel points satisfy a third pre-configuration condition. The third pre-configuration condition may include the condition that the pixel values ​​are less than or equal to a pre-configuration value. The pre-configuration value is one of the pre-configuration values ​​described in operations 330, 430, and 530. By determining whether at least some of the pixel values ​​of adjacent pixel points are less than or equal to the pre-configuration value, it is possible to verify whether the pixel reference information of a pixel point fits the pre-configured template, and further, whether the pixel point needs to be filtered, thereby making the filtering of the pixel point more accurate and improving the accuracy of template matching.

[0112] In some embodiments, the pre-configured template may include two pixel values ​​from eight adjacent pixel points that satisfy a third pre-configuration condition, and the two adjacent pixel points are symmetrical with respect to the pixel point. Figure 7 is a schematic diagram showing an exemplary pre-configured template according to some embodiments of the present disclosure. As shown in Figure 7, the adjacent pixel points of pixel P include eight adjacent pixel points that are centrally located around pixel point P. These eight adjacent pixel points are arranged clockwise and are sequentially referred to as the first adjacent pixel point 710, the second adjacent pixel point 720, the third adjacent pixel point 730, the fourth adjacent pixel point 740, the fifth adjacent pixel point 750, the sixth adjacent pixel point 760, the seventh adjacent pixel point 770, and the eighth adjacent pixel point 780. The pixel value of pixel point P is 255. The pre-configured value is 0. In subfigure a, the first adjacent pixel point 710 and the fifth adjacent pixel point 750 are symmetric with respect to pixel point P, both have a pixel value of 0, are equal to the preset value, and satisfy the third preset condition. In subfigure b, the third adjacent pixel point 730 and the seventh adjacent pixel point 770 are symmetric with respect to pixel point P, both have a pixel value of 0, are equal to the preset value, and satisfy the third preset condition. In subfigure c, the second adjacent pixel point 720 and the sixth adjacent pixel point 760 are symmetric with respect to pixel point P, both have a pixel value of 0, are equal to the preset value, and satisfy the third preset condition. In subfigure d, the fourth adjacent pixel point 740 and the eighth adjacent pixel point 780 are symmetric with respect to pixel point P, both have a pixel value of 0, are equal to the preset value, and satisfy the third preset condition. In some embodiments, the pixel reference information of a pixel point is considered to satisfy a second pre-configured condition if the pixel values ​​of a pixel point and its adjacent pixel points in the image to be matched match any one of the subfigures in Figure 7. Whether the pixel reference information of a pixel point fits the pre-configured template is based on whether two adjacent pixel points satisfy the pixel value and relative position requirements, thereby improving the accuracy of pixel point filtering and template matching.

[0113] In some embodiments, a pre-configured template may include the fact that the pixel values ​​of three of the eight adjacent pixel points of a pixel point satisfy a third pre-configuration condition, and these three adjacent pixel points correspond to one of the first, second, third, or fourth pixel point combinations. The first pixel point combination is the combination of the first, fourth, and seventh adjacent points; the second pixel point combination is the combination of the third, fifth, and eighth adjacent points; the third pixel point combination is the combination of the first, third, and sixth adjacent points; and the fourth pixel point combination is the combination of the second, fifth, and seventh adjacent points.

[0114] Figure 8 is a schematic diagram showing exemplary preset templates according to several embodiments of the present disclosure. As shown in Figure 8, the neighboring pixel points of pixel point Q include eight neighboring pixel points located at the center of pixel point Q. These eight neighboring pixel points are arranged clockwise and are sequentially referred to as the first neighboring pixel point 810, the second neighboring pixel point 820, the third neighboring pixel point 830, the fourth neighboring pixel point 840, the fifth neighboring pixel point 850, the sixth neighboring pixel point 860, the seventh neighboring pixel point 870, and the eighth neighboring pixel point 880. The pixel value of pixel point Q is 255. The preset value is 0. In subfigure e, the first neighboring pixel point 810, the fourth neighboring pixel point 840, and the seventh neighboring pixel point 870 satisfy the first pixel combination, all of which have pixel values ​​of 0, equal to the preset value, and satisfy the third preset condition. In subfigure f, the third adjacent pixel point 830, the fifth adjacent pixel point 850, and the eighth adjacent pixel point 880 satisfy the second pixel combination, and all of their pixel values ​​are 0, which is equal to the preset value, thus satisfying the third preset condition. In subfigure g, the first adjacent pixel point 810, the third adjacent pixel point 830, and the sixth adjacent pixel point 860 satisfy the third pixel combination, and all of their pixel values ​​are 0, which is equal to the preset value, thus satisfying the third preset condition. In subfigure h, the second adjacent pixel point 820, the fifth adjacent pixel point 850, and the seventh adjacent pixel point 870 satisfy the fourth pixel combination, and all of their pixel values ​​are 0, which is equal to the preset value, thus satisfying the third preset condition. In some embodiments, the pixel reference information of a pixel point in the image to be matched is considered to satisfy a second pre-configured condition if it matches any one of the subfigures in Figure 8, both for the pixel point and its adjacent pixel points. Whether the pixel reference information of a pixel point matches a pre-configured template is determined based on whether the three adjacent pixel points satisfy the pixel value requirement and the relative position requirement, improving the accuracy of pixel filtering and template matching.

[0115] In Figures 7 and 8, the pixel values ​​of the central and adjacent pixel points that do not satisfy the third pre-set condition are both 255, and this is only an example, not an limitation. As a mere example, the pixel values ​​of the central and adjacent pixel points that do not satisfy the third pre-set condition may not be equal. As another example, at least one of the central and adjacent pixel points that do not satisfy the third pre-set condition may have a pixel value other than 255, such as a larger pixel value like 254, 250, or 247.

[0116] In some embodiments, the pre-configured template may include the fact that more than three of the eight adjacent pixel points satisfy a third pre-configuration condition, and more than three adjacent pixel points fit a particular combination of pixels. For example, four of the eight adjacent pixel points satisfy the third pre-configuration condition, and these four adjacent pixel points fit a particular combination of pixels. The particular combination of pixels may be the first, third, fifth, and seventh adjacent pixel points.

[0117] In some embodiments, a third preset condition may be that the pixel value is less than or equal to a preset value, and the difference between the pixel value of an adjacent pixel point that fits the preset template and the preset value is less than or equal to a first preset value. The first preset value may be set empirically, for example, a value greater than 0 and less than 5.

[0118] In some embodiments, a third preset condition may be that the pixel value is less than or equal to a preset value, and the sum of the differences between the pixel values ​​of adjacent pixel points that fit the preset template and the preset value is less than or equal to a second preset value. The second preset value may be set based on the first preset value, for example, to a value no more than twice the first preset value.

[0119] In step 520, it can be determined that a pixel point is not a target pixel point if the pixel reference information of the pixel point satisfies a second pre-set condition. Step 520 is the same as step 420 and is not repeated here.

[0120] In step 530, the pixel value of the pixel point can be set to a preset value. Operation 530 is the same as operation 430 and is not repeated here.

[0121] In some embodiments, after operations 510-530 are performed once, pixel points whose pixel reference information satisfies the second pre-configuration condition may have their values ​​reassigned, and these values ​​may update the pixel values ​​of adjacent pixel points of some pixel points that did not originally satisfy the second pre-configuration condition, so that these pixel points satisfy the second pre-configuration condition. If operations 510-530 are performed only once, these pixel points may be treated as target pixel points and participate in subsequent similarity calculations, which may result in unnecessary computational overhead. In some embodiments, for pixel points whose pixel reference information does not satisfy the first pre-configuration condition, the processing unit 120 may iteratively perform operations 510-530 to traverse them until a fourth pre-configuration condition is met.

[0122] In some embodiments, a fourth preset condition includes at least one of the following: the ratio of the number of non-target pixel points among multiple pixel points in the image to be matched to the total number of multiple pixel points is greater than or equal to a preset ratio threshold; the number of traversals reaches a preset number; or the duration of the traversal reaches a preset time limit. In some embodiments, the preset ratio threshold, the number of traversals, and the duration of the traversal may be set based on experience, historical statistics, or user needs. For example, if the preset ratio threshold is set to 40%, it may be considered that once this ratio is reached, computational efficiency can be greatly improved and it is not necessary to continue the traversal. As another example, if the number of traversals is set to 3 or the duration of the traversal is set to 2 hours, it may be considered that increasing the number or duration of the traversals only increases unnecessary computational overhead.

[0123] In some embodiments, the preset ratio threshold may be related to the edge ratio of the template image (e.g., the proportion of edge pixels in the template image). A higher edge ratio indicates more complex edge features in the template image, requiring a larger number of pixels to be retained for subsequent similarity calculations, which may result in a lower preset ratio threshold.

[0124] According to embodiments of this disclosure, the number of pixel points that need to be involved in the similarity calculation is further reduced by filtering out pixel points in the image to be matched that satisfy a pre-defined template, along with the pixel values ​​of adjacent pixel points, thereby significantly reducing the computational load, shortening the computation time, and improving image processing efficiency.

[0125] Figure 6 is a schematic diagram illustrating an exemplary process of image processing according to some embodiments of the present disclosure. In some embodiments, process 600 may be performed by image processing system 100 and / or image processing system 200. For example, process 600 may be implemented as a set of instructions (e.g., an application) stored in a memory device (e.g., memory device 130 shown in Figure 1). In some embodiments, the processing unit 120 of image processing system 100 and / or one or more modules of image processing system 200 may execute a set of instructions and may be instructed accordingly to perform process 600.

[0126] As shown in Figure 6, the image to be matched may contain n (n>2) pixel points, denoted as pixel point 1, pixel point 2, ..., pixel point n. For each pixel point, the processing unit 120 may obtain its corresponding pixel reference information, i.e., pixel reference information 1, pixel reference information 2, ..., pixel reference information n. The pixel reference information may include the magnitude of the gradient of the pixel point (first reference information) and the pixel values ​​of the pixel point and its adjacent pixel points (second reference information). For each pixel point, the processing unit 120 may perform operations similar to operations 610 to 640 to determine whether the pre-set conditions are met, and thereby determine whether to proceed with operation 650. Below, this process is illustrated using pixel point 1 as an example.

[0127] In step 610, it can be determined whether the magnitude of the gradient is less than a pre-set threshold.

[0128] In some embodiments, the processing unit 120 may determine whether the magnitude of the gradient of pixel point 1 is less than a preset threshold. That is, the processing unit 120 may check whether the pixel reference information 1 satisfies a first preset condition. If the magnitude of the gradient of pixel point 1 is less than the preset threshold, operation 620 is performed; otherwise, operation 630 is performed. A further explanation of how to determine whether the pixel reference information of a pixel point satisfies the first preset condition can be found in operation 410 and its related explanations, and is not repeated here.

[0129] In 620, pixel point 1 may be determined not to be a target pixel point.

[0130] In some embodiments, if the magnitude of the gradient of pixel point 1 is less than a preset threshold, the processing unit 120 may determine that pixel point 1 is not a target pixel point, which means that pixel point 1 will not be involved in the subsequent similarity calculation. A target pixel point is one that needs to be involved in the similarity calculation between the image to be matched and the template image. Operation 620 is similar to operations 420 and 520 and will not be repeated here.

[0131] In some embodiments, after performing operation 620, the processing unit 120 may proceed to operation 640.

[0132] In 630, it can be determined whether the adjacent pixel points of pixel point 1 match a pre-configured template.

[0133] In some embodiments, if the magnitude of the gradient of pixel point 1 is greater than or equal to a preset threshold, the processing unit 120 may further determine whether the adjacent pixel points of pixel point 1 conform to a preset template (e.g., the templates shown in Figures 7 and 8). That is, the processing unit 120 may check whether the pixel reference information 1 of pixel point 1 satisfies a second preset condition. Specifically, the processing unit 120 may evaluate whether the pixel values ​​of at least some (e.g., 2, 3, 4, etc.) adjacent pixel points of pixel point 1 satisfy a third preset condition, and whether these pixel points satisfy the positional requirements of adjacent pixel points in the preset template. If the adjacent pixel points of pixel point 1 conform to the preset template, operation 620 is performed; otherwise, pixel point 1 may be determined to be a target pixel point. Further explanation of the determination of whether the pixel reference information of a pixel point satisfies a second preset condition can be found in operation 510 and its related descriptions and is not repeated here.

[0134] In 640, the pixel value of pixel point 1 can be set to a preset value.

[0135] In some embodiments, after determining that pixel point 1 is not a target pixel point, the processing unit 120 may set the pixel value of pixel point 1 to a preset value such as a smaller pixel value, such as 0 or 5.

[0136] In step 650, the similarity between the image to be matched and the template image can be determined.

[0137] In some embodiments, after all pixel points in the image to be matched have been evaluated for target pixel points, the processing unit 120 may calculate and determine initial similarity based on all target pixel points, and determine the similarity between the image to be matched and the template image based on these initial similarities. A further explanation of the similarity between the image to be matched and the template image can be found in operations 340 and 350 and their related descriptions, and is not repeated here.

[0138] In some embodiments, operation 630 may be omitted. If the magnitude of the gradient of pixel point 1 is greater than or equal to a preset threshold, the processing unit 120 may determine that pixel point 1 is a target pixel point, which is suitable for scenarios where computing resources are abundant and there is little demand to reduce computing consumption.

[0139] The operations of the illustrated processes 300, 400, 500, and 600 presented above are intended to be illustrative. In some embodiments, the processes may be achieved with one or more additional operations not described and / or without one or more of the operations described. Furthermore, the order of the operations of the processes described above is not intended to be limiting.

[0140] Having explained the basic concepts in this manner, it will be rather clear to those skilled in the art, after reading this detailed disclosure, that the aforementioned detailed disclosure is intended to be presented only as an example and not as an limitation. Although not expressly stated herein, various changes, improvements, and modifications may be made and are intended for those skilled in the art. These changes, improvements, and modifications are intended to be suggested by this disclosure and are within the spirit and scope of the exemplary embodiments of this disclosure.

[0141] Furthermore, specific terminology has been used to describe embodiments of this disclosure. For example, the terms “one embodiment,” “an embodiment,” and / or “some embodiments” may mean that certain features, structures, or characteristics described in relation to that embodiment are included in at least one embodiment of this disclosure. Therefore, it should be emphasized and understood that two or more references to “embodiment,” “one embodiment,” or “alternative embodiment” in different parts of this disclosure do not necessarily all refer to the same embodiment. Furthermore, certain features, structures, or characteristics may be appropriately combined in one or more embodiments of this disclosure.

[0142] Furthermore, as will be understood by those skilled in the art, aspects of the present disclosure may be exemplified and described herein in any of several patentable classes or contexts, including novel and useful processes, machines, manufactures, or compositions of materials, or novel and useful improvements thereof. Accordingly, aspects of the present disclosure may be implemented entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or as a combination of software and hardware implementations, all of which may be generally referred to herein as “units,” “modules,” or “systems.” Furthermore, aspects of the present disclosure may take the form of computer program products embodied in one or more computer-readable media in which computer-readable program code is embodied.

[0143] A computer-readable signaling medium may contain propagating data signals in which computer-readable program code is internally embodied, for example, in the baseband or as part of a carrier wave. Such propagating signals may take any of the various forms, including electromagnetic, optical, or similar, or any suitable combination thereof. A computer-readable signaling medium is not a computer-readable storage medium, but any computer-readable medium on which programs can be communicated, propagated, or transported for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable signaling medium may be transmitted using any suitable medium, including wireless, wired, fiber optic cable, RF, or similar, or any suitable combination thereof.

[0144] Computer program code for performing the actions for the aspects of this disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, and Python; traditional procedural programming languages ​​such as the C programming language, Visual Basic, Fortran 2103, Perl, COBOL 2102, PHP, and ABAP; dynamic programming languages ​​such as Python, Ruby, and Groovy; or other programming languages. The program code may run entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on both the user's computer and a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (e.g., via the Internet using an Internet service provider) or in a cloud computing environment, or provided as a service such as Software as a Service (SaaS).

[0145] Furthermore, the enumerated order of processing elements or sequences, or the use of numbers, letters, or other names, is not intended to limit the processes and methods described in the claims to any order, unless otherwise specified in the claims. While the above disclosure discusses, through various examples, what are currently considered to be various useful embodiments of this disclosure, such details are for that purpose only, and it should be understood that the attached claims are not limited to the disclosed embodiments, but rather intended to cover modifications and equivalent configurations that fall within the spirit and scope of the disclosed embodiments. For example, the implementation of the various components described above may be carried out in hardware devices, but may also be carried out as software-only solutions, such as installation on existing servers or mobile devices.

[0146] Similarly, in the foregoing description of embodiments of this disclosure, it should be understood that various features may be grouped into a single embodiment, figure, or description thereof for the purpose of simplifying the disclosure to aid in understanding one or more of the various embodiments of the invention. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed subject matter requires more features than are expressly described in each claim. Rather, embodiments of the invention have fewer features than all of all the features of a single, aforementioned disclosed embodiment.

[0147] In some embodiments, numbers representing quantities or characteristics used to describe and claim specific embodiments of this application should be understood to be modified in some cases by the terms “about,” “approximate,” or “substantially.” For example, “about,” “approximate,” or “substantially” may indicate a variation of ±1%, ±5%, ±10%, or ±20% of the value they describe, unless otherwise specified. Thus, in some embodiments, numerical parameters described in the specification and the appended claims are approximations that may vary depending on the desired characteristics to be obtained by a particular embodiment. In some embodiments, numerical parameters should be interpreted by applying common rounding techniques in light of the number of significant figures reported. Although the numerical ranges and parameters representing a wide range of some embodiments of this application are approximations, the numbers shown in specific examples are reported as accurately as possible.

[0148] Each of the patents, patent applications, publications of patent applications, and other materials such as articles, books, specifications, publications, documents, and things referenced herein is incorporated herein by reference in its entirety for all purposes, except for any application file history relating thereto, anything that contradicts or conflicts with this document, or anything that may have a limited effect with respect to the broadest scope of the claims currently or hereafter relating herein. For example, if there is any contradiction or conflict between the explanations, definitions and / or use of terms relating to any of the incorporated materials and the explanations, definitions and / or use of terms relating to this document, the explanations, definitions and / or use of terms in this document shall prevail.

[0149] Finally, it should be understood that the embodiments of the present application disclosed herein are illustrative of the principles of the embodiments of the present application. Other modifications that may be adopted may also be within the scope of the present application. Therefore, alternative configurations of the embodiments of the present application may be used, in accordance with the teachings herein, not as an example but as an exception. Thus, the embodiments of the present application are not limited to those illustrated and described herein. [Explanation of Symbols]

[0150] 100 Image Processing Systems 110 Image acquisition device 110-1 Camera 110-2 Video Recorder 110-3 Image Sensor 120 Processing Units 130 Storage device 140 devices 140-1 Mobile devices 140-2 Tablet Computer 140-3 Laptop Computer 150 Networks 200 Image Processing Systems 210 First acquisition module 220 Second acquisition module 230 First determination module 240 Second judgment module 250 Third judgment module 710 First adjacent pixel point 720 Second adjacent pixel point 730 Third adjacent pixel point 740 Fourth adjacent pixel point 750 Fifth adjacent pixel point 760 Sixth adjacent pixel point 770 Seventh adjacent pixel point 780 The 8th adjacent pixel point 810 First adjacent pixel point 820 Second adjacent pixel point 830 Third adjacent pixel point 840 Fourth adjacent pixel point 850 Fifth adjacent pixel point 860 Sixth adjacent pixel point 870 Seventh adjacent pixel point 880 The 8th adjacent pixel point P pixel point Q Pixel point θ angle

Claims

1. A step of obtaining an image to be matched, wherein the image to be matched includes a plurality of pixel points, For each of the aforementioned plurality of pixel points, A step of obtaining pixel reference information for the pixel point, wherein the pixel reference information includes first reference information relating to the pixel gradient of the pixel point and second reference information relating to the pixel values ​​of both the pixel point and adjacent pixel points of the pixel point. A step of determining whether the pixel point is a target pixel point based on the pixel reference information, wherein the target pixel point is a pixel point whose pixel value is not a preset value. Depending on whether the aforementioned pixel point is the target pixel point, the steps include determining the initial similarity between the target pixel point and the pixel point in the template image, A step of determining the similarity between the image to be matched and the template image based on at least one initial similarity corresponding to at least one target pixel point, A method implemented on a computing device including at least one processor and at least one storage device, including the above.

2. The step of determining whether the pixel point is a target pixel point based on the pixel reference information is: A step of determining whether the pixel reference information satisfies a first preset condition, wherein the first preset condition is set based on a comparison between the first reference information and a preset threshold. The step of determining whether the pixel reference information satisfies the first pre-set condition, and that the pixel point is not the target pixel point. The method includes, Steps to set the pixel value of the pixel point to the preset value. Further including, The method according to claim 1.

3. The method according to claim 2, wherein the pre-set threshold is determined based on candidate features of the image to be matched, and the candidate features include statistical features of the contrast and gradient magnitude of the image to be matched.

4. The method according to claim 3, wherein the candidate features further include the contrast of the candidate region in the image to be matched.

5. The method according to claim 4, wherein the candidate features correspond to a plurality of candidate regions in the image to be matched, at least one of the shapes or sizes of the plurality of candidate regions is different, and the contrast of the candidate regions is determined based on a weighted calculation of the contrasts of the plurality of candidate regions.

6. The method according to claim 2, wherein the pre-set threshold is determined based on processing speed requirements and the statistical characteristics of the magnitude of the gradient of the image to be matched.

7. The step of determining whether the pixel point is a target pixel point based on the pixel reference information is: A step of determining whether the pixel reference information satisfies a second preset condition, in response to the fact that the pixel reference information does not satisfy the first preset condition, wherein the second preset condition is set based on a comparison between the second reference information and a preset template. The step of determining that the pixel point is not the target pixel point in accordance with the fact that the pixel reference information satisfies the second pre-set condition. Includes, The aforementioned method, Steps to set the pixel value of the pixel point to the preset value. Further including, The method according to any one of claims 2 to 6.

8. The method according to claim 7, wherein the adjacent pixel points of the pixel point include eight adjacent pixel points located around the pixel point with respect to the pixel point, the preset template includes the pixel values ​​of two of the eight adjacent pixel points that satisfy a third preset condition, and the two adjacent pixel points are symmetric with respect to the pixel point.

9. The adjacent pixel points of the aforementioned pixel point include a first adjacent pixel point, a second adjacent pixel point, a third adjacent pixel point, a fourth adjacent pixel point, a fifth adjacent pixel point, a sixth adjacent pixel point, a seventh adjacent pixel point, and an eighth adjacent pixel point, which are located around the pixel point with the pixel point as the center, and the first to eighth adjacent pixel points are arranged in a clockwise / counterclockwise direction around the pixel point, and the pre-configured template includes the fact that the pixel values ​​of three of the eight adjacent pixel points satisfy a third pre-configuration condition, and these three adjacent pixel points correspond to any of the first, second, third, or fourth combination of pixel points, The first combination of pixel points is a combination of the first adjacent point, the fourth adjacent point, and the seventh adjacent point. The second combination of pixel points is the combination of the third adjacent point, the fifth adjacent point, and the eighth adjacent point. The third combination of pixel points is a combination of the first adjacent point, the third adjacent point, and the sixth adjacent point. The fourth combination of pixel points is the combination of the second adjacent point, the fifth adjacent point, and the seventh adjacent point. The method according to claim 7.

10. The method according to claim 8 or 9, wherein the third pre-setting condition includes that the pixel value is less than or equal to the pre-setting value.

11. The aforementioned method, The step of performing multiple traversals on pixel points among the plurality of pixel points whose pixel reference information does not satisfy the first preset condition until the fourth preset condition is met. The method according to claim 7, further comprising:

12. The fourth pre-configuration condition is: The ratio of the number of non-target pixel points among the plurality of pixel points to the total number of pixel points is greater than or equal to a preset ratio threshold. The number of traversals reaches a predetermined number, or The duration of the traversal reaches the pre-set duration. The method according to claim 11, comprising at least one of the following.

13. The step of determining the initial similarity is: The step of determining whether the pixel values ​​of a predetermined number of pixel points among the plurality of pixel points are the predetermined values, In the case where the pixel values ​​of the predetermined number of pixel points are all the predetermined values, the initial similarity is not determined for the predetermined number of pixel points. The steps include determining the initial similarity for at least one pixel point in response to the fact that the pixel value of at least one of the preset number of pixel points is not the preset value, and The method according to claim 2, including the method described in claim 2.

14. The method according to claim 13, wherein the number of presets is determined based on the number of pixel points that the at least one processor can process in parallel.

15. It is a system, A memory device containing a set of instructions, At least one processor that communicates with the at least one storage device, and when executing a set of instructions, the at least one processor communicates with the system A step of obtaining an image to be matched, wherein the image to be matched includes a plurality of pixel points, For each of the aforementioned plurality of pixel points, A step of obtaining pixel reference information for the pixel point, wherein the pixel reference information includes first reference information relating to the pixel gradient of the pixel point and second reference information relating to the pixel values ​​of both the pixel point and adjacent pixel points of the pixel point. A step of determining whether the pixel point is a target pixel point based on the pixel reference information, wherein the target pixel point is a pixel point whose pixel value is not a preset value. Depending on whether the aforementioned pixel point is the target pixel point, the steps include determining the initial similarity between the target pixel point and the pixel point in the template image, A step of determining the similarity between the image to be matched and the template image based on at least one initial similarity corresponding to at least one target pixel point, A processor that performs operations including the above, A system that includes these features.

16. The step of determining whether the pixel point is a target pixel point based on the pixel reference information is: A step of determining whether the pixel reference information satisfies a first preset condition, wherein the first preset condition is set based on a comparison between the first reference information and a preset threshold. The step of determining whether the pixel reference information satisfies the first pre-set condition, and that the pixel point is not the target pixel point. Includes, The aforementioned method, Steps to set the pixel value of the pixel point to the preset value. Further including, The system described in item 15.

17. The system according to claim 16, wherein the pre-set threshold is determined based on candidate features of the image to be matched, and the candidate features include statistical features of the contrast and gradient magnitude of the image to be matched.

18. The system according to claim 17, wherein the candidate features further include the contrast of the candidate region in the image to be matched.

19. The system according to claim 18, wherein the candidate features correspond to a plurality of candidate regions in the image to be matched, at least one of the shapes or sizes of the plurality of candidate regions is different, and the contrast of the candidate regions is determined based on a weighted calculation of the contrasts of the plurality of candidate regions.

20. The system according to claim 16, wherein the pre-set threshold is determined based on processing speed requirements and the statistical characteristics of the magnitude of the gradient of the image to be matched.

21. The step of determining whether the pixel point is a target pixel point based on the pixel reference information is: A step of determining whether the pixel reference information satisfies a second preset condition, in response to the fact that the pixel reference information does not satisfy the first preset condition, wherein the second preset condition is set based on a comparison between the second reference information and a preset template. The step of determining that the pixel point is not the target pixel point in accordance with the fact that the pixel reference information satisfies the second pre-set condition. It further includes, The aforementioned method, Steps to set the pixel value of the pixel point to the preset value. The system according to any one of claims 16 to 20, further comprising:

22. The system according to claim 21, wherein the adjacent pixel points of the pixel point include eight adjacent pixel points located around the pixel point with respect to the pixel point, the preset template includes the pixel values ​​of two of the eight adjacent pixel points that satisfy a third preset condition, and the two adjacent pixel points are symmetric with respect to the pixel point.

23. The adjacent pixel points of the aforementioned pixel point include a first adjacent pixel point, a second adjacent pixel point, a third adjacent pixel point, a fourth adjacent pixel point, a fifth adjacent pixel point, a sixth adjacent pixel point, a seventh adjacent pixel point, and an eighth adjacent pixel point, which are located around the pixel point with the pixel point as the center, and the first to eighth adjacent pixel points are arranged in a clockwise / counterclockwise direction around the pixel point, and the pre-configured template includes the fact that the pixel values ​​of three of the eight adjacent pixel points satisfy a third pre-configuration condition, and these three adjacent pixel points correspond to any of the first, second, third, or fourth combination of pixel points, The first combination of pixel points is a combination of the first adjacent point, the fourth adjacent point, and the seventh adjacent point. The second combination of pixel points is the combination of the third adjacent point, the fifth adjacent point, and the eighth adjacent point. The third combination of pixel points is a combination of the first adjacent point, the third adjacent point, and the sixth adjacent point. The fourth combination of pixel points is the combination of the second adjacent point, the fifth adjacent point, and the seventh adjacent point. The system according to claim 21.

24. The system according to claim 22 or 23, wherein the third pre-setting condition includes that the pixel value is less than or equal to the pre-setting value.

25. The aforementioned method, The step of performing multiple traversals on pixel points among the plurality of pixel points whose pixel reference information does not satisfy the first preset condition until the fourth preset condition is met. The method according to claim 21, further comprising:

26. The fourth pre-configuration condition is: The ratio of the number of non-target pixel points among the plurality of pixel points to the total number of pixel points is greater than or equal to a preset ratio threshold. The number of traversals reaches a predetermined number, or The duration of the traversal reaches the pre-set duration. The method according to claim 25, comprising at least one of the following.

27. The step of determining the initial similarity is: The step of determining whether the pixel values ​​of a predetermined number of pixel points among the plurality of pixel points are the predetermined values, In the case where the pixel values ​​of the predetermined number of pixel points are all the predetermined values, the initial similarity is not determined for the predetermined number of pixel points. The steps include determining the initial similarity for at least one pixel point in response to the fact that the pixel value of at least one of the preset number of pixel points is not the preset value, and The method according to claim 16, including the method described in claim 16.

28. The system according to claim 27, wherein the number of pre-set values ​​is determined based on the number of pixel points that the at least one processor can process in parallel.

29. A system comprising a first acquisition module, a second acquisition module, a first determination module, a second determination module, and a third determination module, The image acquisition module is configured to acquire an image to be matched, and the image to be matched includes a plurality of pixel points. For each of the aforementioned plurality of pixel points, The second acquisition module is configured to acquire pixel reference information of the pixel point, the pixel reference information includes first reference information relating to the pixel gradient of the pixel point and second reference information relating to the pixel values ​​of both the pixel point and the adjacent pixel points of the pixel point, The first determination module is configured to determine whether the pixel point is a target pixel point based on the pixel reference information, and the target pixel point is a pixel point whose pixel value is not a preset value. The second determination module is configured to determine the initial similarity between the target pixel point and the pixel point in the template image, depending on whether the pixel point is the target pixel point. The third determination module is configured to determine the similarity between the image to be matched and the template image based on at least one initial similarity corresponding to at least one target pixel point. system.

30. A non-temporary computer-readable medium comprising, when executed by at least one processor, an executable instruction that instructs the at least one processor to perform the method according to any one of claims 1 to 14.