Target object detection method and system, medium and electronic equipment

By performing edge enhancement and local image binarization of the detected images, the problem of low robustness in target object detection in complex environments is solved, and more efficient and accurate target object detection is achieved.

CN119810402APending Publication Date: 2025-04-11GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311304758.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art In complex environments, such as strong noise, light mutations and background disturbances, the detection of target objects is low, and the recognition efficiency and accuracy are limited.

Method used

By performing edge enhancement processing on the image to be detected, and partially binarize the edge enhancement image according to the preset template image, the pixel points of the edge part are filtered out, and whether there is a target object in the preset template image in the image to be detected.

Benefits of technology

It effectively solves the problem of unstable target object detection caused by changes in complex environments, and improves the robustness of target object detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810402A_ABST
    Figure CN119810402A_ABST
Patent Text Reader

Abstract

The invention discloses a target object detection method and system, a medium and electronic equipment, and the method comprises the steps: carrying out the edge enhancement processing of a to-be-detected image when the to-be-detected image is received, and obtaining an edge enhanced image; according to a preset template image, carrying out local image binarization on the edge enhanced image to obtain each local binary image; and based on each local binary image and a target binary image corresponding to the preset template image, determining whether a target object in the preset template image exists in the to-be-detected image. According to the method, the local image binarization is carried out on the edge enhanced image, and the local window adaptive binarization is carried out on the edge enhanced image, so that the pixel points of the edge part can be effectively screened out, the problem of unstable target object detection caused by complex environment change is effectively solved, and the robustness of target object detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a target object detection method, system, medium and electronic device. Background Art

[0002] Image processing technology has great application value and a wide range of application markets in many fields. Among them, target detection and tracking technology has made great progress after a long period of research. The research on target detection algorithms targeting people, vehicles and other objects has become an academic and scientific field with many research directions and broad application prospects.

[0003] In the prior art, it is necessary to select images with better imaging quality from multiple frames for detection. However, in complex environments such as strong noise, sudden changes in illumination and background disturbances, environmental factors have a great interference on target detection, resulting in great limitations in recognition efficiency and accuracy, thereby reducing the robustness of target object detection. Summary of the invention

[0004] The embodiments of the present application provide a method, system, medium and electronic device for detecting a target object. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to determine the key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description below.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting a target object, the method comprising:

[0006] When receiving the image to be detected, edge enhancement processing is performed on the image to be detected to obtain an edge enhanced image;

[0007] According to the preset template image, the edge enhanced image is locally binarized to obtain local binary images;

[0008] Based on each local binary image and a target binary image corresponding to the preset template image, it is determined whether the target object in the preset template image exists in the image to be detected.

[0009] Optionally, based on a preset template image, local image binarization is performed on the edge enhanced image to obtain local binary images, including:

[0010] Construct a sliding window of the same size as the preset template image;

[0011] According to the sliding window, the edge-enhanced image is subtracted to obtain multiple local images;

[0012] The edge foreground of each local image is screened to filter out the contour pixels of the image foreground to obtain each local binary image.

[0013] Optionally, the edge-enhanced image is subtracted according to the sliding window to obtain multiple local images, including:

[0014] Moving the sliding window in the edge enhanced image according to a preset direction and a preset step size;

[0015] During the movement of the sliding window, the area covered by the sliding window in the edge enhanced image is deducted to obtain a local image;

[0016] When all image regions in the edge enhanced image are covered by the sliding window, multiple local images are obtained.

[0017] Optionally, edge foregrounds of each local image are filtered to filter out contour pixels of the image foreground to obtain local binary images, including:

[0018] Calculate the pixel mean of each local image;

[0019] Calculate the target difference between the pixel value of each pixel in each local image and the pixel mean of each local image;

[0020] Pixels whose target difference is greater than a preset threshold are screened in each local image to screen out the contour pixels of the image foreground to obtain each local binary image.

[0021] Optionally, determining whether a target object in a preset template image exists in the image to be detected based on a target binary image corresponding to each local binary image and a preset template image includes:

[0022] Calculate the matching score between each local binary image and the target binary image corresponding to the preset template image;

[0023] When the matching score is greater than a preset threshold, it is determined that the target object in the preset template image exists in the image to be detected; or,

[0024] When the matching score is less than or equal to the preset threshold, it is determined that the target object in the preset template image does not exist in the image to be detected.

[0025] Optionally, calculating a matching score between each local binary image and a target binary image corresponding to a preset template image includes:

[0026] Determine the pixel intersections in the target binary image of each local binary image and the preset template image;

[0027] Calculate the sum of the pixel values ​​in the pixel intersection;

[0028] According to the sum of the pixel values, a matching score between each local binary image and a target binary image corresponding to a preset template image is determined.

[0029] Optionally, after determining whether the target object in the preset template image exists in the image to be detected, the method further includes:

[0030] The local binary image whose matching score is greater than a preset score threshold is used as the target local binary image;

[0031] Identify the window position of the target local binary image in the image to be detected;

[0032] Associating the window position with the matching score of the target local binary image to obtain target object information;

[0033] Report the target object information to the client.

[0034] In a second aspect, an embodiment of the present application provides a target object detection system, the system comprising:

[0035] The edge enhancement module is used to perform edge enhancement processing on the image to be detected when receiving the image to be detected to obtain an edge enhanced image;

[0036] A local image binarization module is used to perform local image binarization on the edge enhanced image according to a preset template image to obtain local binary images;

[0037] The object information reporting module is used to determine whether the target object in the preset template image exists in the image to be detected based on the target binary image corresponding to each local binary image and the preset template image.

[0038] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0039] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0040] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0041] In an embodiment of the present application, the target object detection system first performs edge enhancement processing on the image to be detected when receiving the image to be detected to obtain an edge enhanced image; then, based on the preset template image, the edge enhanced image is locally binarized to obtain each local binary image; finally, based on the target binary image corresponding to each local binary image and the preset template image, it is determined whether the image to be detected contains the target object in the preset template image. Since the present application performs local image binarization on the edge enhanced image and performs local window adaptive binarization on the edge enhanced image, the pixel points of the edge part can be effectively screened out, which effectively solves the problem of unstable target object detection caused by complex environmental changes, thereby improving the robustness of target object detection.

[0042] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0044] Figure 1 It is a flowchart of a target object detection method provided in an embodiment of the present application;

[0045] Figure 2 is a schematic block diagram of a target object detection process provided by an embodiment of the present application;

[0046] Figure 3 is a schematic diagram of the structure of a target object detection system provided in an embodiment of the present application;

[0047] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following description and the accompanying drawings sufficiently illustrate specific embodiments of the present application to enable those skilled in the art to practice them.

[0049] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0050] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of systems and methods consistent with some aspects of the present application as detailed in the attached claims.

[0051] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0052] Currently, when detecting a target object, it is necessary to select an image with better imaging quality from multiple frames of images for detection.

[0053] The inventors of the present application noticed that in complex environments such as strong noise, sudden changes in illumination and background disturbances, environmental factors have a significant impact on target detection, resulting in great limitations in recognition efficiency and accuracy, thereby reducing the robustness of target object detection.

[0054] In order to solve the problem of low security of the platform system, the present application provides a target object detection method, system, medium and electronic device to solve the problems existing in the above-mentioned related technical problems. In the technical solution provided by the present application, since the present application performs local image binarization on the edge-enhanced image and performs local window adaptive binarization on the edge-enhanced image, the pixel points of the edge part can be effectively screened out, which effectively solves the problem of unstable target object detection caused by complex environmental changes, thereby improving the robustness of target object detection. The following exemplary embodiments are used for detailed description.

[0055] The following will be combined with the attached Figure 1 -Attached Figure 2 , a target object detection method provided by an embodiment of the present application is introduced in detail. The method can be implemented by a computer program and can be run on a target object detection system based on a von Neumann system. The computer program can be integrated into an application or run as an independent tool application.

[0056] See also Figure 1 , which is a flow chart of a target object detection method provided in an embodiment of the present application.

[0057] like Figure 1 As shown, the method of the embodiment of the present application may include the following steps:

[0058] S101, when receiving an image to be detected, performing edge enhancement processing on the image to be detected to obtain an edge enhanced image;

[0059] The image to be detected can be a picture obtained from any channel of the multi-source channels. For example, the image obtained from the multi-source channels can be a locally stored picture, a picture collected by a camera, or a picture from a cloud database. Edge enhancement is to highlight the edges (i.e., image hue mutations or boundary lines of ground object types) where the brightness values ​​(or hues) of adjacent pixels (or areas) of an image (or image) differ greatly. The edge-enhanced image can more clearly show the boundaries of different object types or phenomena, or the traces of linear images, so as to facilitate the identification of different object types and the delineation of their distribution ranges.

[0060] In the embodiment of the present application, when the processor receives the image to be detected inputted by the client, it can perform edge enhancement processing on the image to be detected to obtain an edge enhanced image, so as to weaken the image background part of the image to be detected.

[0061] Specifically, when edge enhancement processing is performed on the image to be detected to obtain an edge enhanced image, the image to be detected is firstly copied into a positive film and a negative film using relevant mask technology, and the two films of different properties are precisely overlapped. When exposing and printing, the two films are shifted by a small distance from each other, so that an image with a slightly misaligned "border" is obtained, in which most of the image is offset by positive and negative, and a bright line (or dark line) appears at the edge, so as to achieve the display effect of highlighting the image boundary line from the background, so that the image is enhanced. Edge enhancement can also be achieved by other methods or computer processing, which is not limited here.

[0062] S102, performing local image binarization on the edge enhanced image according to a preset template image to obtain local binary images;

[0063] Among them, the preset template image is a fixed image input into the program by the user, which includes the target object of interest to the user. The image is used to compare with the image to be detected to determine whether the image to be detected contains the target object.

[0064] In an embodiment of the present application, when the edge-enhanced image is locally binarized according to a preset template image to obtain each local binary image, a sliding window of the same size as the preset template image is first constructed; then, the edge-enhanced image is subtracted according to the sliding window to obtain multiple local images; finally, the edge foreground of each local image is filtered to filter out the contour pixels of the image foreground to obtain each local binary image.

[0065] Specifically, when the edge-enhanced image is subtracted according to the sliding window to obtain multiple local images, the sliding window is first moved in the edge-enhanced image according to a preset direction and a preset step size; then, during the movement of the sliding window, the area covered by the sliding window in the edge-enhanced image is subtracted to obtain the local image; finally, when all image areas in the edge-enhanced image are covered by the sliding window, multiple local images are obtained.

[0066] Specifically, when filtering the edge foreground of each local image to filter out the contour pixels of the image foreground and obtain each local binary image, firstly, the pixel mean of each local image is calculated; then, the target difference between the pixel value of each pixel in each local image and the pixel mean of each local image is calculated; finally, pixel points whose target difference is greater than a preset threshold are filtered in each local image to filter out the contour pixels of the image foreground and obtain each local binary image.

[0067] For example, let the size of the sliding window be W and H, and it can be moved from the upper left corner to the right in the edge enhanced image according to a pixel step. During the movement, the area covered by the sliding window can be deducted to obtain a local image, and the mean of the local image is calculated as meanValue. It is calculated whether the difference between the value of each pixel in the local image and the mean meets the preset condition, and the pixels that meet the preset condition are screened out, that is, the edge foreground is selected according to the dynamic threshold, and the preset condition is: (pixel-meanValue)>0? (1,0).

[0068] S103, based on each local binary image and the target binary image corresponding to the preset template image, determining whether the target object in the preset template image exists in the image to be detected.

[0069] In an embodiment of the present application, when determining whether a target object in a preset template image exists in an image to be detected based on each local binary image and a target binary image corresponding to the preset template image, a matching score between each local binary image and the target binary image corresponding to the preset template image is first calculated; then, if the matching score is greater than a preset threshold, it is determined that the target object in the preset template image exists in the image to be detected; or, if the matching score is less than or equal to the preset threshold, it is determined that the target object in the preset template image does not exist in the image to be detected.

[0070] Specifically, when calculating the matching score between each local binary image and the target binary image corresponding to the preset template image, first determine the pixel intersection between each local binary image and the target binary image of the preset template image; then calculate the sum of each pixel value in the pixel intersection; finally, determine the matching score between each local binary image and the target binary image corresponding to the preset template image based on the sum of each pixel value.

[0071] The algorithm of intersection ratio to total foreground number adopted in this application can effectively suppress the matching instability problem caused by noise and sparse images.

[0072] For example, let the local binary image be window_binary_Img, the target binary image be model_binary_Img, calculate the intersection of the local binary image and the target binary image and sum them, the formula is: union = sum(window_binary_Img&model_binary_Img); according to the summation result, the matching score can be calculated, the formula is score = 2×union / (sum(window_binary_Img)+sum(model_binary_Img)), where sum is the summation symbol.

[0073] Furthermore, after determining a local binary image whose matching score is greater than a preset score threshold, it can be known that the image contains the target object in the preset template image, for example, the target object is a WiFi symbol. At this time, it is necessary to record the matching score and the position of the local window of the local binary image whose matching score is greater than the preset score threshold and report it to the client.

[0074] Specifically, when reporting to the client, first, the local binary image with a matching score greater than a preset score threshold is taken as the target local binary image; then the window position of the target local binary image in the image to be detected is identified; secondly, the window position and the matching score of the target local binary image are associated to obtain the target object information; finally, the target object information is reported to the client.

[0075] It should be noted that the target binary image corresponding to the preset template image is also obtained through edge enhancement and binarization, but the preset template image and the sliding window have the same size, so there is only one target binary image corresponding to the preset template image.

[0076] For example Figure 2 As shown, Figure 2 The present invention provides a schematic diagram of a target object detection process. First, the preset template image in the processor is edge enhanced and binarized to obtain a target binary image. Then, the image to be detected is edge enhanced and partially de-imaged to obtain multiple local images. Then, each local image is locally de-imaged. Figure 2 The local binary images are obtained by performing value processing; finally, the matching scores between the target binary image and each local binary image are calculated, and the target local binary image corresponding to the matching score greater than the preset score threshold is found, and the position and score of the target local binary image are recorded and reported to the client.

[0077] In an embodiment of the present application, the target object detection system first performs edge enhancement processing on the image to be detected when receiving the image to be detected to obtain an edge enhanced image; then, based on the preset template image, the edge enhanced image is locally binarized to obtain each local binary image; finally, based on the target binary image corresponding to each local binary image and the preset template image, it is determined whether the image to be detected contains the target object in the preset template image. Since the present application performs local image binarization on the edge enhanced image and performs local window adaptive binarization on the edge enhanced image, the pixel points of the edge part can be effectively screened out, which effectively solves the problem of unstable target object detection caused by complex environmental changes, thereby improving the robustness of target object detection.

[0078] The following is a system embodiment of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the system embodiment of the present application, please refer to the method embodiment of the present application.

[0079] See also Figure 3 , which shows a schematic diagram of the structure of a target object detection system provided by an exemplary embodiment of the present application. The target object detection system can be implemented as all or part of an electronic device through software, hardware or a combination of both. The system 1 includes an edge enhancement module 10, a local image binarization module 20, and an object information reporting module 30.

[0080] The edge enhancement module 10 is used to perform edge enhancement processing on the image to be detected when receiving the image to be detected to obtain an edge enhanced image;

[0081] The local image binarization module 20 is used to perform local image binarization on the edge enhanced image according to a preset template image to obtain local binary images;

[0082] The object information reporting module 30 is used to determine whether the target object in the preset template image exists in the image to be detected based on each local binary image and the target binary image corresponding to the preset template image.

[0083] Optionally, the local image binarization module 20 includes:

[0084] A sliding window construction unit 201 is used to construct a sliding window of the same size as a preset template image;

[0085] An image extraction unit 202 is used to extract the edge-enhanced image according to the sliding window to obtain multiple local images;

[0086] The local binary image screening unit 203 is used to screen the edge foreground of each local image to screen out the contour pixels of the image foreground to obtain each local binary image.

[0087] Optionally, the object information reporting module 30 includes:

[0088] A matching score calculation unit 301 is used to calculate a matching score between each local binary image and a target binary image corresponding to a preset template image;

[0089] The target object determination unit 302 is used to determine that the target object in the preset template image exists in the image to be detected when the matching score is greater than a preset threshold; or

[0090] When the matching score is less than or equal to the preset threshold, it is determined that the target object in the preset template image does not exist in the image to be detected.

[0091] It should be noted that the target object detection system provided in the above embodiment only uses the division of the above functional modules as an example when executing the target object detection method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the target object detection system provided in the above embodiment and the target object detection method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0092] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0093] In an embodiment of the present application, the target object detection system first performs edge enhancement processing on the image to be detected when receiving the image to be detected to obtain an edge enhanced image; then, based on the preset template image, the edge enhanced image is locally binarized to obtain each local binary image; finally, based on the target binary image corresponding to each local binary image and the preset template image, it is determined whether the image to be detected contains the target object in the preset template image. Since the present application performs local image binarization on the edge enhanced image and performs local window adaptive binarization on the edge enhanced image, the pixel points of the edge part can be effectively screened out, which effectively solves the problem of unstable target object detection caused by complex environmental changes, thereby improving the robustness of target object detection.

[0094] The present application also provides a computer-readable medium having program instructions stored thereon, and when the program instructions are executed by a processor, the target object detection methods provided by the above-mentioned various method embodiments are implemented.

[0095] The present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the target object detection method of each of the above method embodiments.

[0096] See also Figure 4 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .

[0097] The communication bus 1002 is used to realize the connection and communication between these components.

[0098] The user interface 1003 may include a display screen (Display) and a camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.

[0099] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0100] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts within the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.

[0101] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may also be optionally at least one storage system located away from the aforementioned processor 1001. As Figure 4 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a target object detection application.

[0102] exist Figure 4In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 1001 can be used to call the target object detection application stored in the memory 1005 and specifically perform the following operations:

[0103] When receiving the image to be detected, edge enhancement processing is performed on the image to be detected to obtain an edge enhanced image;

[0104] According to the preset template image, the edge enhanced image is locally binarized to obtain local binary images;

[0105] Based on each local binary image and a target binary image corresponding to the preset template image, it is determined whether the target object in the preset template image exists in the image to be detected.

[0106] In one embodiment, when the processor 1001 performs local image binarization on the edge enhanced image according to the preset template image to obtain each local binary image, the following operations are specifically performed:

[0107] Construct a sliding window of the same size as the preset template image;

[0108] According to the sliding window, the edge-enhanced image is subtracted to obtain multiple local images;

[0109] The edge foreground of each local image is screened to filter out the contour pixels of the image foreground to obtain each local binary image.

[0110] In one embodiment, when the processor 1001 performs subtraction of the edge enhanced image according to the sliding window to obtain multiple local images, the following operations are specifically performed:

[0111] Moving the sliding window in the edge enhanced image according to a preset direction and a preset step size;

[0112] During the movement of the sliding window, the area covered by the sliding window in the edge enhanced image is deducted to obtain a local image;

[0113] When all image regions in the edge enhanced image are covered by the sliding window, multiple local images are obtained.

[0114] In one embodiment, when the processor 1001 performs edge foreground screening on each local image to screen out contour pixels of the image foreground and obtain each local binary image, the following operations are specifically performed:

[0115] Calculate the pixel mean of each local image;

[0116] Calculate the target difference between the pixel value of each pixel in each local image and the pixel mean of each local image;

[0117] Pixels whose target difference is greater than a preset threshold are screened in each local image to screen out the contour pixels of the image foreground to obtain each local binary image.

[0118] In one embodiment, when the processor 1001 determines whether there is a target object in the preset template image in the image to be detected based on each local binary image and the target binary image corresponding to the preset template image, the following operations are specifically performed:

[0119] Calculate the matching score between each local binary image and the target binary image corresponding to the preset template image;

[0120] When the matching score is greater than a preset threshold, it is determined that the target object in the preset template image exists in the image to be detected; or,

[0121] When the matching score is less than or equal to the preset threshold, it is determined that the target object in the preset template image does not exist in the image to be detected.

[0122] In one embodiment, when the processor 1001 calculates the matching score between each local binary image and the target binary image corresponding to the preset template image, the following operations are specifically performed:

[0123] Determine the pixel intersections in the target binary image of each local binary image and the preset template image;

[0124] Calculate the sum of the pixel values ​​in the pixel intersection;

[0125] According to the sum of the pixel values, a matching score between each local binary image and a target binary image corresponding to a preset template image is determined.

[0126] In one embodiment, after determining whether there is a target object in a preset template image in the image to be detected, the processor 1001 further performs the following operations:

[0127] The local binary image whose matching score is greater than a preset score threshold is used as the target local binary image;

[0128] Identify the window position of the target local binary image in the image to be detected;

[0129] Associating the window position with the matching score of the target local binary image to obtain target object information;

[0130] Report the target object information to the client.

[0131] In an embodiment of the present application, the target object detection system first performs edge enhancement processing on the image to be detected when receiving the image to be detected to obtain an edge enhanced image; then, based on the preset template image, the edge enhanced image is locally binarized to obtain each local binary image; finally, based on the target binary image corresponding to each local binary image and the preset template image, it is determined whether the image to be detected contains the target object in the preset template image. Since the present application performs local image binarization on the edge enhanced image and performs local window adaptive binarization on the edge enhanced image, the pixel points of the edge part can be effectively screened out, which effectively solves the problem of unstable target object detection caused by complex environmental changes, thereby improving the robustness of target object detection.

[0132] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the target object detection program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the target object detection program can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0133] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A target object detection method, characterized in that: The method comprises: When receiving the image to be detected, edge enhancement processing is performed on the image to be detected to obtain an edge enhanced image; According to a preset template image, performing local image binarization on the edge enhanced image to obtain local binary images; Based on the local binary images and the target binary image corresponding to the preset template image, it is determined whether the target object in the preset template image exists in the image to be detected.

2. The method according to claim 1, characterized in that The method of performing local image binarization on the edge enhanced image according to the preset template image to obtain local binary images includes: Constructing a sliding window of the same size as the preset template image; According to the sliding window, the edge-enhanced image is subtracted to obtain a plurality of local images; The edge foreground of each local image is screened to filter out the contour pixels of the image foreground to obtain each local binary image.

3. The method according to claim 2, characterized in that The step of subtracting the edge enhanced image according to the sliding window to obtain a plurality of local images includes: Moving the sliding window in the edge enhanced image according to a preset direction and a preset step size; During the movement of the sliding window, the area covered by the sliding window in the edge enhanced image is deducted to obtain a local image; When all image areas in the edge enhanced image are completely covered by the sliding window, multiple local images are obtained.

4. The method according to claim 2, characterized in that: The step of filtering edge foregrounds of each local image to filter out contour pixels of the image foreground to obtain each local binary image includes: Calculate the pixel mean of each local image; Calculating a target difference between a pixel value of each pixel in each local image and a pixel mean value of each local image; Pixels whose target difference is greater than a preset threshold are screened in each local image to screen out contour pixels of the image foreground to obtain each local binary image.

5. The method according to claim 1, characterized in that The determining whether the target object in the preset template image exists in the image to be detected based on the target binary image corresponding to each local binary image and the preset template image comprises: Calculating a matching score between each local binary image and a target binary image corresponding to the preset template image; When the matching score is greater than a preset threshold, determining that the target object in the preset template image exists in the image to be detected; or When the matching score is less than or equal to a preset threshold, it is determined that the target object in the preset template image does not exist in the image to be detected.

6. The method according to claim 5, characterized in that The calculating the matching score between each local binary image and the target binary image corresponding to the preset template image includes: Determine pixel intersections in the target binary image of each local binary image and the preset template image; Calculate the sum of the pixel values ​​in the pixel intersection; According to the sum of the pixel values, a matching score between each local binary image and a target binary image corresponding to the preset template image is determined.

7. The method according to claim 5, characterized in that After determining whether the target object in the preset template image exists in the image to be detected, the method further includes: The local binary image whose matching score is greater than a preset score threshold is used as a target local binary image; Identify the window position of the target local binary image in the image to be detected; Associating the window position with the matching score of the target local binary image to obtain target object information; Report the target object information to the client.

8. A target object detection system, characterized in that: The system comprises: The edge enhancement module is used to perform edge enhancement processing on the image to be detected when receiving the image to be detected to obtain an edge enhanced image; A local image binarization module, used to perform local image binarization on the edge enhanced image according to a preset template image to obtain local binary images; The object information reporting module is used to determine whether the target object in the preset template image exists in the image to be detected based on the target binary image corresponding to each local binary image and the preset template image.

9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method according to any one of claims 1 to 7.