Target area detection method and device, equipment and medium

By using preset rule shapes to divide image regions in the autonomous driving system, the problem of excessively long computation time caused by large amounts of data is solved, and target region detection with rapid response to abnormal situations is achieved.

CN121963132APending Publication Date: 2026-05-01QINGDAO HISENSE TRANS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, the amount of image region location information data describing abnormal situations is large, resulting in excessively long calculation times during autonomous driving and an inability to respond in a timely manner.

Method used

By identifying irregularly shaped candidate target regions in the image to be detected, multiple regular image regions are divided using preset regular shapes, and the target regular image region is selected as the region of the target to be detected based on the degree of overlap, thereby reducing the amount of data description.

Benefits of technology

This improves data processing efficiency, reduces subsequent algorithm processing time, and ensures that the autonomous driving system can respond to abnormal situations in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963132A_ABST
    Figure CN121963132A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a target area detection method and device, equipment and a medium. In the embodiment of the invention, the candidate target region included in the determined to-be-detected image is in the irregular shape, and more data is used for describing the irregular shape, so that the plurality of regular image regions corresponding to the preset regular shape in the to-be-detected image are further determined, and the image areas of different regular image regions are the same or different; the different regular image areas are overlapped or not overlapped, and according to the overlapping degree of the plurality of regular image areas and the candidate target area, selecting a target regular image area from the plurality of regular image areas as the area of the target to be detected and storing the target to be detected. In addition, the area corresponding to the regular shape is described, and less data is used compared with the area corresponding to the irregular shape, so that the data volume of subsequent processing is reduced, and the data processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, device and medium for target region detection. Background Technology

[0002] Autonomous driving technology has made tremendous progress in recent years. Navigation is crucial for autonomous operation. During autonomous driving, real-time analysis of road conditions is necessary to ensure safety. For example, it's essential to detect abnormalities such as snow accumulation or road surface depressions ahead and implement appropriate emergency response plans accordingly.

[0003] In related technologies, image recognition algorithms are generally used to detect road conditions. However, when anomalies are detected, a large amount of data is used to describe the location information of the image region corresponding to the anomaly. For example, if the image region corresponding to the anomaly is irregularly shaped, related technologies typically enumerate every pixel on the edge of the image region to describe it, resulting in a large amount of data. Processing this large amount of data during autonomous driving will consume a significant amount of computation time, making it difficult to control the vehicle to respond promptly.

[0004] Therefore, how to determine and describe the location information of the image region corresponding to the abnormal situation has become an urgent problem to be solved. Summary of the Invention

[0005] This application provides a target region detection method, apparatus, device, and medium to solve the problem in the prior art where the large amount of data describing the target region leads to long processing times for subsequent algorithms.

[0006] Firstly, this application provides a target region detection method, the method comprising: Identify candidate target regions in the image to be detected, wherein the candidate target region is the region where the target to be detected is located, and the candidate target region is of an irregular shape; Determine multiple regular image regions in the image to be detected that correspond to a preset regular shape. The image areas of different regular image regions may be the same or different, and the image regions may overlap or not overlap. Based on the degree of overlap between the plurality of regular image regions and the candidate target regions, a target regular image region is selected from the plurality of regular image regions as the region of the target to be detected, and saved.

[0007] Secondly, this application provides a target area detection device, the device comprising: The detection module is used to determine candidate target regions included in the image to be detected. The candidate target regions are the regions where the target to be detected is located, and the candidate target regions are irregularly shaped. The determination module is used to determine multiple regular image regions corresponding to preset regular shapes in the image to be detected. The image areas of different regular image regions are the same or different, and the different regular image regions overlap or do not overlap. Based on the degree of overlap between the multiple regular image regions and the candidate target region, the target regular image region is selected as the region of the target to be detected from the multiple regular image regions and saved.

[0008] Thirdly, embodiments of this application also provide an electronic device, the electronic device including a processor, the processor being configured to execute a computer program stored in a memory to implement the steps of any of the target region detection methods described above.

[0009] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the target region detection methods described above.

[0010] Fifthly, embodiments of this application also provide a computer program product, the computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the steps of any of the target region detection methods described above.

[0011] Since the candidate target regions included in the image to be detected in this embodiment are irregularly shaped, describing these irregular shapes would require a lot of data. Therefore, multiple regular image regions corresponding to preset regular shapes in the image to be detected are further determined. The image areas of different regular image regions may be the same or different, and they may overlap or not overlap. Based on the degree of overlap between these multiple regular image regions and the candidate target regions, a target regular image region is selected from the multiple regular image regions as the region of the target to be detected and saved. Describing the region corresponding to the regular shape will require less data than describing the region of the irregular shape, thereby reducing the amount of data for subsequent processing and improving data processing efficiency. Attached Figure Description

[0012] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1A flowchart illustrating a target region detection process provided in an embodiment of this application; Figure 2 A schematic diagram of a regular image region provided in an embodiment of this application; Figure 3 This application provides an embodiment of a snow-covered area. Figure 4 This is a schematic diagram of a target region detection and determination process provided in an embodiment of this application; Figure 5 This is a schematic diagram of a target area detection device provided in an embodiment of this application; Figure 6 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art are within the scope of protection of this application.

[0015] This application provides a target region detection method, apparatus, device, and medium. The method involves: determining candidate target regions included in an image to be detected, wherein the candidate target regions are regions where the target to be detected is located, and the candidate target regions are irregularly shaped; determining multiple regular image regions in the image to be detected corresponding to preset regular shapes, wherein the image areas of different regular image regions are the same or different, and the different regular image regions overlap or do not overlap; and selecting a target regular image region as the region of the target to be detected from the multiple regular image regions based on the degree of overlap between the multiple regular image regions and the candidate target regions, and saving the selected region.

[0016] Figure 1 This is a flowchart illustrating a target region detection process provided in an embodiment of this application, as shown below. Figure 1 As shown, the process includes the following steps: S101: Determine the candidate target region included in the image to be detected, wherein the candidate target region is the region where the target to be detected is located, and the candidate target region is an irregular shape.

[0017] The target area detection method provided in this application embodiment is applied to electronic devices, such as servers, PCs, vehicle controllers, etc.

[0018] To determine whether a target exists in the image to be detected, the region where the target is located is marked when the target is present. In this embodiment, a target detection algorithm can be used to determine candidate target regions included in the image to be detected. That is, the region in the image to be detected containing the target is called the target region. The target can be snow, road obstructions, water accumulation, bumpy areas, etc. The image to be detected can be captured by an image acquisition device, such as a roadside camera or a vehicle-mounted camera, or it can be sent by other electronic devices or obtained from a database. The image to be detected can be an RGB color space image.

[0019] S102: Determine multiple regular image regions in the image to be detected that correspond to a preset regular shape. The image areas of different regular image regions may be the same or different, and the image regions may overlap or not overlap.

[0020] Since the image to be detected may not be very clear when the vehicle is in motion, the determined candidate region will also be irregular in shape. Alternatively, the target to be detected may itself be irregular in shape, so the determined candidate target region will also be irregular in shape.

[0021] To accurately describe the irregular shape, it is generally possible to describe each pixel in the outline of the candidate target region, or to describe each pixel in the candidate target region itself. However, subsequent complex algorithmic processing based on a large number of pixels would consume significant processing time. Therefore, in this embodiment, a regular shape can be used to describe the region containing the target to be detected.

[0022] To facilitate subsequent processing, different preset regular shapes, such as rectangles, triangles, trapezoids, and circles, can be pre-configured in this embodiment. After determining the candidate target region, multiple regular image regions corresponding to the preset regular shapes in the image to be detected can be determined. These different regular image regions may or may not overlap, and the image area sizes of different regular image regions may be the same or different.

[0023] For example, if the preset shape is a triangle, then all triangles can be enumerated in the image to be detected. Different triangles may or may not overlap, and the area of ​​different triangles may be the same or different.

[0024] Figure 2 This is a schematic diagram of a regular image region provided in an embodiment of this application. Figure 2 The region shown can be understood as any regular image region in a defined image to be detected. Figure 2The region formed by the outermost triangle can be understood as a regular image region. The solid-colored portion within this regular image region is the candidate target region. The apex of this triangle can be considered the vanishing point of the target to be detected.

[0025] S103: Based on the degree of overlap between the plurality of regular image regions and the candidate target regions, select the target regular image region as the region of the target to be detected from the plurality of regular image regions and save it.

[0026] After determining each regular image region, the degree of overlap between each regular image region and the candidate target region can be determined separately.

[0027] After determining the degree of overlap for each regular image region, a regular image region can be selected as the region of the target to be detected based on each degree of overlap. In this embodiment, the regular image region with the highest degree of overlap can be determined as the region of the target to be detected. Alternatively, the regular image region with the smallest area that contains the complete candidate target region can be determined as the region of the target to be detected.

[0028] After identifying the region of the target to be detected, the information of that region can be saved for subsequent algorithm processing. Since this region is a regular image area, only a small amount of data needs to be saved when storing relevant information, and the region where the target to be detected is located can be accurately determined later based on this small amount of data.

[0029] For example, when the shape corresponding to the regular image region is a triangle, the three vertices of the triangle can be saved; when the shape corresponding to the regular image region is a rectangle, the four vertices of the rectangle can be saved; when the shape corresponding to the regular image region is a trapezoid, the four vertices of the trapezoid can be saved.

[0030] Since the candidate target regions included in the image to be detected in this embodiment are irregularly shaped, describing these irregular shapes would require a lot of data. Therefore, multiple regular image regions corresponding to preset regular shapes in the image to be detected are further determined. The image areas of different regular image regions may be the same or different, and they may overlap or not overlap. Based on the degree of overlap between these multiple regular image regions and the candidate target regions, a target regular image region is selected from the multiple regular image regions as the region of the target to be detected and saved. Describing the region corresponding to the regular shape will require less data than describing the region of the irregular shape, thereby reducing the amount of data for subsequent processing and improving data processing efficiency.

[0031] To further improve the accuracy of target region detection, based on the above embodiments, in this embodiment, the step of selecting a target regular image region as the region of the target to be detected from the plurality of regular image regions according to the degree of overlap between the plurality of regular image regions and the candidate target region includes: For each regular image region, determine the area ratio of the image area of ​​the regular image region to the total area of ​​the image to be detected; determine the pixel count ratio based on the number of pixels in the candidate target image included in the regular image region and the number of pixels included in the candidate target region; determine the target score of the regular image region based on the area ratio and the pixel count ratio. The region of the rule image corresponding to the minimum target score is determined as the region of the target to be detected.

[0032] In this embodiment, when determining the region of the target to be detected based on the degree of overlap, the area ratio of the image area of ​​each determined regular image region to the total area of ​​the image to be detected can be determined. Then, based on the number of pixels in the candidate target image included in the image region and the number of pixels included in the candidate target region, a pixel count ratio is determined. Finally, this area ratio and pixel count ratio can be used as the target score for the regular image region.

[0033] Specifically, for each defined regular image region, the target score for any regular image region can be calculated based on the following formula:

[0034] in, Indicates the target score; The image area represents a regular image region; This represents the total area of ​​the image to be detected; This indicates the number of pixels in the candidate target image included within the regular image region; This indicates the number of pixels included in the candidate target region.

[0035] In this embodiment, after determining the target score corresponding to each regular image region, the regular image region corresponding to the minimum target score can be determined as the region of the target to be detected. That is, the regular image region corresponding to the minimum target score is determined as the region of interest of the target to be detected.

[0036] Figure 3 This application provides an embodiment of a snow-covered area, such as... Figure 3 As shown, when the preset rule shape is trapezoidal and the target to be detected is snow, the following can be obtained: Figure 3The snow-covered area shown. Figure 3 The image area marked with 1 is the identified snow-covered area.

[0037] In one possible implementation, since the contrast between different parts of the image to be detected is generally high, in order to further improve the accuracy of target region detection, in this embodiment of the application, when determining the candidate target regions included in the image to be detected, the target to be detected included in the image to be detected can be extracted based on a target detection algorithm. For example, the target detection algorithm can be a YOLO series algorithm. It should be noted that those skilled in the art can configure the target detection algorithm as needed. For example, the target detection algorithm can be used to extract the snow and non-snow parts in the image to be detected, and can also extract snow on the road and other areas in the image to be detected.

[0038] In one possible implementation, to further improve the accuracy of target region detection, in this embodiment of the application, morphological transformation processing can be performed on the image to be detected before determining the candidate target regions included in the image to be detected. Morphological transformation processing is a set of processing methods based on shape and structural elements to filter and transform images, and it has a direct and intuitive effect on image noise removal, connected component extraction, and boundary smoothing.

[0039] In this embodiment, morphological transformation can be used to remove noise from the image to be detected, thereby improving the accuracy of subsequent target detection and ultimately improving the accuracy of target region detection. For example, morphological transformation can be used to remove small snowflakes from the image to be detected.

[0040] In one possible implementation, in order to further improve the accuracy of target region detection, in this embodiment of the application, the color space of the image to be detected may be converted to the HSV color space before determining the candidate target regions included in the image to be detected.

[0041] Because the HSV color space typically offers better performance than the RGB color space in many object detection tasks, especially color-based object detection. HSV separates color information from luminance, making the hue component relatively stable under varying lighting conditions, whereas all three components of RGB are easily affected by luminance. For example, under different lighting conditions, the HSV hue value of the same object changes less, while the RGB value may fluctuate significantly, which helps in more stable color recognition. For instance, when the target to be detected is snow, since it is easier to distinguish snow and tree components in the HSV color space, the color space of the image to be detected can be converted to the HSV color space in this embodiment. For example, the RGB color space can be converted to the HSV color space.

[0042] Specifically, the RGB color space can be converted to the HSV color space based on the following formula:

[0043] Where V represents lightness; R represents the red channel value; G represents the green channel value; B represents the blue channel value; S represents saturation, used to describe color; H represents hue; and C represents the difference between the maximum and minimum values ​​of the three RGB channels.

[0044] It should be noted that the conversion between RGB and HSV color spaces is an existing technology, and this application will not elaborate on this process in the embodiments.

[0045] In one possible implementation, in order to further improve the accuracy of target region detection, in this embodiment of the application, the image to be detected may be filtered before determining the candidate target regions included in the image to be detected.

[0046] Specifically, before determining the candidate target regions included in the image to be detected, filters can be used to process the image. For example, Gaussian filters, histogram equalization, and illumination filters can be used for filtering. In other words, image enhancement processing is performed on the image to be detected to improve the accuracy of subsequent detection.

[0047] In real life, snow accumulation on roads is a significant contributing factor to traffic accidents, greatly increasing the likelihood of such incidents. Currently, there is no intelligent analysis and detection platform for detecting snow accumulation on roads, relying entirely on manual inspection. In actual traffic operations, transportation operators only manually inspect the road conditions of a small number of key sections, neglecting to conduct manual inspections of a large number of road sections. This results in a delayed response from transportation operators to snow accumulation, hindering timely measures such as issuing warnings and implementing snow removal and de-icing, thus increasing the probability of accidents. This manual method of road video surveillance is far behind the needs of highway development and, to some extent, restricts the effective management of road video surveillance. Based on the target area detection method provided in the above embodiments of this application, accurate and efficient detection of snow-covered areas is possible.

[0048] The following is combined with Figure 4 The process of detecting the target area is explained. Figure 4 This is a schematic diagram of a target region detection and determination process provided in an embodiment of this application, as shown below. Figure 4As shown, during target region detection, an input image to be detected can be acquired and filtered to obtain a filtered image. Next, target detection is performed on the filtered image to determine the candidate target region where the detection model is located. Finally, the regular image region corresponding to the candidate target region is determined and marked in the image to be detected. How to determine the regular image region corresponding to the candidate target region has been described in detail in the above embodiments, and this process will not be described again in this embodiment.

[0049] Based on the same inventive concept, embodiments of this application provide a target area detection device. Figure 5 This application provides a schematic diagram of a target area detection device, which includes: The detection module 501 is used to determine candidate target regions included in the image to be detected, wherein the candidate target region is the region where the target to be detected is located, and the candidate target region is an irregular shape; The determining module 502 is used to determine multiple regular image regions corresponding to preset regular shapes in the image to be detected, wherein the image areas of different regular image regions are the same or different, and the different regular image regions overlap or do not overlap; based on the degree of overlap between the multiple regular image regions and the candidate target region, the target regular image region is selected as the region of the target to be detected from the multiple regular image regions and saved.

[0050] In one possible implementation, the determining module 502 is specifically configured to: determine the area ratio of the image area of ​​each regular image region to the total area of ​​the image to be detected; determine the pixel count ratio based on the number of pixels in the candidate target image included in the regular image region and the number of pixels included in the candidate target region; determine the target score of the regular image region based on the area ratio and the pixel count ratio; and determine the regular image region corresponding to the minimum target score as the region of the target to be detected.

[0051] In one possible implementation, the determining module 502 is specifically used to extract the target to be detected included in the image to be detected based on the target detection algorithm to obtain the candidate target region.

[0052] In one possible implementation, the device further includes: The preprocessing module 503 is used to extract the target to be detected included in the image to be detected based on the target detection algorithm to obtain the candidate target region.

[0053] In one possible implementation, the preprocessing module 503 is used to perform morphological transformation processing on the image to be detected.

[0054] In one possible implementation, the preprocessing module 503 is used to convert the color space of the image to be detected into the HSV color space.

[0055] In one possible implementation, the preprocessing module 503 is used to perform filtering processing on the image to be detected.

[0056] Based on the same inventive concept, embodiments of this application provide an electronic device that can implement the steps of the target region detection method described above. Figure 6 This application provides a schematic diagram of an electronic device structure, such as... Figure 6 As shown, it includes: processor 601, communication interface 602, memory 603 and communication bus 604, wherein processor 601, communication interface 602 and memory 603 communicate with each other through communication bus 604. The memory 603 stores a computer program, which, when executed by the processor 601, causes the processor 601 to perform the following steps: Identify candidate target regions in the image to be detected, wherein the candidate target region is the region where the target to be detected is located, and the candidate target region is of an irregular shape; Determine multiple regular image regions in the image to be detected that correspond to a preset regular shape. The image areas of different regular image regions may be the same or different, and the image regions may overlap or not overlap. Based on the degree of overlap between the plurality of regular image regions and the candidate target regions, a target regular image region is selected from the plurality of regular image regions as the region of the target to be detected, and saved.

[0057] In one possible implementation, selecting a target regular image region as the region of the target to be detected from the plurality of regular image regions based on the degree of overlap between the plurality of regular image regions and the candidate target regions includes: For each regular image region, determine the area ratio of the image area of ​​the regular image region to the total area of ​​the image to be detected; determine the pixel count ratio based on the number of pixels in the candidate target image included in the regular image region and the number of pixels included in the candidate target region; determine the target score of the regular image region based on the area ratio and the pixel count ratio. The region of the rule image corresponding to the minimum target score is determined as the region of the target to be detected.

[0058] In one possible implementation, determining the candidate target regions included in the image to be detected includes: The target to be detected is extracted from the image to be detected based on the target detection algorithm to obtain the candidate target region.

[0059] In one possible implementation, before determining the candidate target regions included in the image to be detected, the method further includes: The image to be detected is subjected to morphological transformation processing.

[0060] In one possible implementation, before determining the candidate target regions included in the image to be detected, the method further includes: The color space of the image to be detected is converted to the HSV color space.

[0061] In one possible implementation, before determining the candidate target regions included in the image to be detected, the method further includes: The image to be detected is then filtered.

[0062] Since the principle of the above-mentioned electronic device in solving the problem is similar to that of the target area detection method, the implementation of the above-mentioned electronic device can be found in the embodiments of the method, and repeated parts will not be described again.

[0063] The communication bus mentioned in the aforementioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus. Communication interface 602 is used for communication between the aforementioned electronic device and other devices. The memory can include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.

[0064] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0065] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium storing a computer program executable by a processor. When the program runs on the processor, it causes the processor to perform the following steps: Identify candidate target regions in the image to be detected, wherein the candidate target region is the region where the target to be detected is located, and the candidate target region is of an irregular shape; Determine multiple regular image regions in the image to be detected that correspond to a preset regular shape. The image areas of different regular image regions may be the same or different, and the image regions may overlap or not overlap. Based on the degree of overlap between the plurality of regular image regions and the candidate target regions, a target regular image region is selected from the plurality of regular image regions as the region of the target to be detected, and saved.

[0066] In one possible implementation, selecting a target regular image region as the region of the target to be detected from the plurality of regular image regions based on the degree of overlap between the plurality of regular image regions and the candidate target regions includes: For each regular image region, determine the area ratio of the image area of ​​the regular image region to the total area of ​​the image to be detected; determine the pixel count ratio based on the number of pixels in the candidate target image included in the regular image region and the number of pixels included in the candidate target region; determine the target score of the regular image region based on the area ratio and the pixel count ratio. The region of the rule image corresponding to the minimum target score is determined as the region of the target to be detected.

[0067] In one possible implementation, determining the candidate target regions included in the image to be detected includes: The target to be detected is extracted from the image to be detected based on the target detection algorithm to obtain the candidate target region.

[0068] In one possible implementation, before determining the candidate target regions included in the image to be detected, the method further includes: The image to be detected is subjected to morphological transformation processing.

[0069] In one possible implementation, before determining the candidate target regions included in the image to be detected, the method further includes: The color space of the image to be detected is converted to the HSV color space.

[0070] In one possible implementation, before determining the candidate target regions included in the image to be detected, the method further includes: The image to be detected is then filtered.

[0071] Since the principle of the computer-readable storage medium in solving the problem is similar to that of the target area detection method, the implementation of the computer-readable storage medium can be found in the embodiments of the method, and repeated details will not be repeated.

[0072] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the target region detection methods discussed above. Since the principle by which the above-described computer program product solves the problem is similar to that of the target region detection method, the implementation of the above-described computer program product can be referred to the implementation of the method, and repeated details will not be described again.

[0073] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0074] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0075] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0076] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0077] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A target region detection method, characterized in that, The method includes: Identify candidate target regions in the image to be detected, wherein the candidate target region is the region where the target to be detected is located, and the candidate target region is of an irregular shape; Determine multiple regular image regions in the image to be detected that correspond to a preset regular shape. The image areas of different regular image regions may be the same or different, and the image regions may overlap or not overlap. Based on the degree of overlap between the plurality of regular image regions and the candidate target regions, a target regular image region is selected from the plurality of regular image regions as the region of the target to be detected, and saved.

2. The method according to claim 1, characterized in that, The step of selecting a target regular image region as the region of the target to be detected from the plurality of regular image regions based on the degree of overlap between the plurality of regular image regions and the candidate target region includes: For each regular image region, determine the area ratio of the image area of ​​the regular image region to the total area of ​​the image to be detected; determine the pixel count ratio based on the number of pixels in the candidate target image included in the regular image region and the number of pixels included in the candidate target region; determine the target score of the regular image region based on the area ratio and the pixel count ratio. The region of the rule image corresponding to the minimum target score is determined as the region of the target to be detected.

3. The method according to claim 1, characterized in that, The process of determining the candidate target regions included in the image to be detected includes: The target to be detected is extracted from the image to be detected based on the target detection algorithm to obtain the candidate target region.

4. The method according to claim 1, characterized in that, Before determining the candidate target regions included in the image to be detected, the method further includes: The image to be detected is subjected to morphological transformation processing.

5. The method according to claim 1, characterized in that, Before determining the candidate target regions included in the image to be detected, the method further includes: The color space of the image to be detected is converted to the HSV color space.

6. The method according to claim 1, characterized in that, Before determining the candidate target regions included in the image to be detected, the method further includes: The image to be detected is then filtered.

7. A target area detection device, characterized in that, The device includes: The detection module is used to determine candidate target regions included in the image to be detected. The candidate target regions are the regions where the target to be detected is located, and the candidate target regions are irregularly shaped. The determination module is used to determine multiple regular image regions corresponding to preset regular shapes in the image to be detected. The image areas of different regular image regions are the same or different, and the different regular image regions overlap or do not overlap. Based on the degree of overlap between the multiple regular image regions and the candidate target region, the target regular image region is selected as the region of the target to be detected from the multiple regular image regions and saved.

8. The apparatus according to claim 7, characterized in that, The determining module is specifically configured to: determine the area ratio of the image area of ​​each regular image region to the total area of ​​the image to be detected; determine the pixel count ratio based on the number of pixels in the candidate target image included in the regular image region and the number of pixels included in the candidate target region; determine the target score of the regular image region based on the area ratio and the pixel count ratio; and determine the regular image region corresponding to the minimum target score as the region of the target to be detected.

9. An electronic device, characterized in that, The electronic device includes a processor that executes a computer program stored in a memory to implement the steps of the target region detection method as described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the target region detection method as described in any one of claims 1-6.