Method and system for detecting same-color pollutants in snowfield area near garbage can

By identifying snow-covered areas in the HSV color space and dividing them into grids, and combining the fusion scoring of color and texture feature parameters, the problems of false detection and false negative detection of garbage in snow-covered environments are solved, and efficient and accurate detection of pollutants of the same color is achieved.

CN122066972APending Publication Date: 2026-05-19GUANGDONG PROPHET BIG DATA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG PROPHET BIG DATA CO LTD
Filing Date
2026-03-04
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

During winter snowfall in northern cities, white or light-colored garbage is highly similar to the snowy background in terms of visual features. Existing garbage detection methods are not effective in snowy environments, traditional color segmentation algorithms fail, and deep learning methods are difficult to train robust models and are costly and require large computing resources.

Method used

By acquiring trash can image data, converting it to the HSV color space, using a snow feature recognition algorithm to determine candidate detection areas, dividing the data into grids, extracting color and texture feature parameters, and combining them with a scoring algorithm to determine contaminants of the same color, a comprehensive scoring mechanism using multi-feature fusion is adopted.

Benefits of technology

It significantly improved the accuracy and positioning precision of garbage detection, reduced the false detection rate and missed detection rate, and solved the problem of similar visual characteristics between garbage bags of the same color and the snow background in snowy environments, providing technical support for the promotion and application of intelligent sanitation systems in northern cities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122066972A_ABST
    Figure CN122066972A_ABST
Patent Text Reader

Abstract

The invention relates to a method and system for detecting same-color pollutants in a snowfield area near a garbage can, and the method comprises the steps: obtaining the image data of the garbage can, and extracting the position information of the garbage can through the image data; determining a plurality of candidate detection areas based on the position information, and performing snowfield judgment on the plurality of candidate detection areas through a snowfield feature recognition algorithm to obtain a snowfield area identification result; carrying out grid division on the candidate detection area which is identified as a snowfield according to the snowfield area identification result to obtain a plurality of sub-areas; and extracting color feature parameters and texture feature parameters of the plurality of sub-regions, and performing same-color pollutant judgment on the plurality of sub-regions through a feature combination scoring algorithm to obtain a detection result. The detection accuracy of the same-color pollutants in the snowfield environment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of facility and equipment management technology, and in particular relates to a method and system for detecting pollutants of the same color in snowy areas near trash cans. Background Technology

[0002] With the advancement of smart city construction, machine vision-based waste detection technology has been widely applied in urban sanitation management. This technology deploys cameras around trash cans to monitor waste distribution in real time, enabling automatic waste identification and early warning. In normal surface environments, existing waste detection methods are relatively mature and can effectively identify various types of waste. However, during winter snowfall in northern cities, snow cover severely impacts visual waste detection, especially since white or light-colored waste is visually highly similar to the snowy background, posing a significant challenge to detection. Therefore, waste detection technology tailored to snowy scenarios has become a key issue for the widespread application of intelligent sanitation systems in northern regions.

[0003] In existing technologies, conventional garbage detection methods mainly rely on color segmentation, edge detection, or deep learning models for target recognition. However, these methods have significant shortcomings in snowy environments: on the one hand, the high brightness and strong reflectivity of snow compress the effective contrast range of the image, and the white garbage bag and the snow background highly overlap in the RGB color space, causing traditional color segmentation algorithms to fail and unable to effectively distinguish between garbage and snow; on the other hand, although deep learning methods can theoretically solve this problem, they are limited by the scarcity of snow garbage samples, making it difficult to train robust detection models, and the deployment cost of these models is high, requiring large amounts of computing resources. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the purpose of the invention is to provide a method and system for detecting pollutants of the same color in snowy areas near trash cans.

[0005] This invention provides a method for detecting pollutants of the same color in snowy areas near trash cans, including: S1: Acquire image data of the trash can, and extract the location information of the trash can from the image data; S2: Based on the location information, multiple candidate detection areas are determined, and snow area identification is performed on the multiple candidate detection areas using a snow feature recognition algorithm to obtain the snow area identification result; S3: Divide the candidate detection areas identified as snow areas in the snow area identification results into grids to obtain multiple sub-regions; S4: Extract color feature parameters and texture feature parameters of multiple sub-regions, and use the feature combination scoring algorithm to determine the same-color contaminants in multiple sub-regions to obtain the detection results.

[0006] According to the present invention, a method for detecting pollutants of the same color in snowy areas near trash cans includes, after step S1: S11: Extract the RGB color components of each pixel in the image from the image data. The RGB color components include red, green and blue components. S12: Convert the RGB color components from the RGB color space to the HSV color space, and obtain the HSV color components corresponding to each pixel. The HSV color components include hue value, saturation value and brightness value.

[0007] According to the present invention, a method for detecting pollutants of the same color in snowy areas near trash cans, step S2 further includes: S21: Calculate the boundary coordinates of multiple candidate detection areas of the trash can based on the coordinate parameters; S22: For each candidate detection region, count the number of pixels in the region that meet the snow color feature conditions, wherein the snow color feature conditions are that the hue component is less than the first hue threshold, the saturation component is less than the first saturation threshold, and the brightness component is greater than the first brightness threshold. S23: Calculate the ratio of the number of pixels that meet the snow color feature conditions to the total number of pixels in the region to obtain the snow judgment score. When the snow judgment score exceeds the preset snow judgment threshold, it is marked as a snow region and the snow region identification result is obtained.

[0008] According to the present invention, a method for detecting contaminants of the same color in snowy areas near trash cans includes, in step S21, multiple candidate detection areas including: The first candidate region, which is the area directly below the trash can, has the following boundary coordinate expression: The second candidate region is the area to the lower left of the trash can, and its boundary coordinates are expressed as follows: The third candidate region, which is the area below the right side of the trash can, has the following boundary coordinate expression: in, The boundary coordinates of the first candidate region. The boundary coordinates of the second candidate region. The boundary coordinates of the third candidate region. Let x be the x-coordinate of the top-left vertex of the bounding box of the trash can in the image data. Let be the y-coordinate of the top-left vertex of the bounding box of the trash can in the image data. Let the height of the bounding box of the trash can in the image data be denoted as . Let x be the x-coordinate of the extended boundary on the left side of the trash can. The vertical coordinate of the upper boundary of the area below the trash can. The width of the extended area to the left of the trash can. Let x be the x-coordinate of the right-side extended boundary of the trash can. The height of the area directly below the trash can. This refers to the height of the lower left and lower right areas of the trash can.

[0009] According to the present invention, a method for detecting pollutants of the same color in a snowy area near a trash can is provided. In step S3, the snowy area is divided into multiple sub-regions using a non-uniform grid division method. The number of rows and columns of the grid division is adaptively determined according to the geometric dimensions of the snowy area. The boundary coordinates of the multiple sub-regions are obtained by calculating the grid index coordinates.

[0010] According to the present invention, a method for detecting pollutants of the same color in snowy areas near trash cans, step S4 further includes: S41: Extract color feature parameters of multiple sub-regions, and determine multiple color feature scores based on the color feature parameters; S42: Extract texture feature parameters of multiple sub-regions, and determine multiple texture feature scores based on the texture feature parameters; S43: Summate the scores of multiple color features with the scores of multiple texture features to obtain a comprehensive criterion score; S44: When the comprehensive criterion score exceeds the judgment threshold, it is determined that there is a pollutant of the same color in the current sub-region. The bounding box coordinates of the current sub-region are output as the location information of the pollutant of the same color, and the detection result is obtained.

[0011] According to the present invention, a method for detecting pollutants of the same color in snowy areas near trash cans, the method further includes the following step after S44: When the number of sub-regions containing the same color pollutant in the detection results reaches the warning trigger threshold, a warning signal is generated.

[0012] According to the present invention, a method for detecting pollutants of the same color in snowy areas near trash cans, step S41 specifically includes: S411: Calculate the mean difference between the red and green components, the mean difference between the red and blue components, and the mean difference between the blue and green components in each sub-region. Take the maximum absolute value of the multiple mean differences as the RGB channel mean difference feature. When the RGB channel mean difference feature exceeds the color difference threshold, record the RGB channel mean difference score of the current sub-region as 1. S412: Calculate the average brightness value of all pixels in each sub-region. When the average brightness value is within the preset brightness range, record the brightness distribution score of the current sub-region as 1. S413: Calculate the average saturation value of all pixels in each sub-region. When the average saturation value is within the preset saturation range, record the saturation distribution score of the current sub-region as 1.

[0013] According to the present invention, a method for detecting pollutants of the same color in snowy areas near trash cans, step S42 further includes: S421: Convert the image to a grayscale image and obtain the grayscale value of each pixel; S422: Calculate the mean gray value of all pixels in each sub-region, and calculate the variance of the gray value relative to the mean gray value. After normalizing the variance, compare it with the dispersion threshold. When the normalized variance exceeds the dispersion threshold, record the dispersion score of the current sub-region as 1. S423: Edge detection is performed on the internal region of each sub-region using a gradient operator to obtain: the gradient magnitude of multiple pixels. Pixels whose gradient magnitude exceeds the edge intensity threshold are marked as boundary points, and the boundary points constitute the boundary region. S424: Determine whether non-boundary points are surrounded by boundary regions, and calculate the ratio of the number of non-boundary points surrounded by boundary regions to the total number of pixels in the sub-region. When the ratio exceeds the enclosure threshold, the spatial change rate score of the current sub-region is recorded as 1.

[0014] The present invention also provides a system for detecting pollutants of the same color in snowy areas near trash cans, for performing a method for detecting pollutants of the same color in snowy areas near trash cans as described in any of the above claims, comprising: Extraction module: used to acquire image data of the trash can and extract the location information of the trash can from the image data; Judgment module: Used to determine multiple candidate detection areas based on the location information of trash cans, and to determine the snow area by using a snow feature recognition algorithm to obtain the snow area identification result; The partitioning module is used to divide the candidate detection areas identified as snow in the snow area identification results into grids, resulting in multiple sub-regions; Detection module: Used to extract color feature parameters and texture feature parameters of multiple sub-regions, and to determine the same-color contaminants in multiple sub-regions through a feature combination scoring algorithm to obtain the detection results.

[0015] This invention provides a method and system for detecting contaminants of the same color in snowy areas near trash cans. First, by converting the image from the RGB color space to the HSV color space, it fully utilizes the independence of the HSV space in hue, saturation, and brightness, laying the foundation for subsequent feature extraction. Second, by determining multiple candidate detection areas based on the trash can's location information and then classifying the area as snowy, this invention achieves accurate identification of snowy environments, avoiding the waste of computational resources caused by applying complex algorithms in non-snowy scenes, while also narrowing the detection range and significantly improving detection efficiency. Third, this invention uses a grid-based approach to subdivide the snowy area into multiple sub-regions, resulting in finer detection granularity and accurate location of the trash bag, avoiding false positives and false negatives caused by large-area overall judgment. Furthermore, by improving... By combining color and texture feature parameters for scoring, the subtle differences between white garbage bags and snow in multiple dimensions are fully explored. Color feature parameters include RGB channel mean differences, brightness distribution, and saturation distribution, which can distinguish garbage bags from snow based on color deviation and brightness. Texture feature parameters include grayscale dispersion and spatial variation rate, which can identify the wrinkles of garbage bags based on surface roughness and boundary integrity. Ultimately, the multi-feature fusion comprehensive scoring mechanism of this invention effectively reduces the uncertainty of single-feature judgment. By setting reasonable judgment thresholds, it significantly reduces false detection and false negative rates while ensuring detection accuracy. This solves the technical challenge of highly similar visual features between garbage bags of the same color and snow backgrounds in snowy environments, providing reliable technical support for the promotion and application of intelligent sanitation systems in northern cities. Attached Figure Description

[0016] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. It is obvious that the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings.

[0017] Figure 1 This is a schematic diagram of a method for detecting pollutants of the same color in snowy areas near trash cans, provided by an embodiment of the present invention. Figure 2 This is a schematic diagram of a color-matched pollutant detection system for snow-covered areas near trash cans, provided as an embodiment of the present invention. Detailed Implementation

[0018] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0019] Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts disclosed in this invention.

[0020] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The terms "installed," "connected," and "linked" should be interpreted broadly; for example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of methods and systems consistent with some aspects of the invention as detailed in the appended claims.

[0022] The embodiments of the present invention are described below with reference to the figures.

[0023] like Figure 1 As shown, the present invention provides a method for detecting pollutants of the same color in snowy areas near trash cans, comprising: S1: Acquire image data of the trash can, and extract the location information of the trash can from the image data.

[0024] Step S1 further includes: acquiring image data containing the trash can using an image acquisition device; obtaining the coordinate parameters of the trash can's bounding box from the image data; and outputting the coordinate parameters as the location information; the expression for the coordinate parameters is: in, Let x be the x-coordinate of the top-left vertex of the bounding box of the trash can in the image data. Let be the y-coordinate of the top-left vertex of the bounding box of the trash can in the image data. Let be the width of the bounding box of the trash can in the image data. This represents the height of the bounding box of the trash can in the image data.

[0025] Furthermore, the present invention first acquires image data containing a trash can using an image acquisition device. This image data is stored in the form of a digital matrix, with each pixel corresponding to an element in the matrix. Subsequently, the present invention extracts the bounding box information of the trash can from the image data. The bounding box is defined by four coordinate parameters: the x-coordinate and y-coordinate of the upper left vertex, the width w and height h of the bounding box. These four parameters together determine the spatial position and size range of the trash can in the image.

[0026] The process includes the following steps after step S1: S11: Extracting the RGB color components of each pixel in the image from the image data, wherein the RGB color components include red, green and blue components; S12: Converting the RGB color components from the RGB color space to the HSV color space, and obtaining the HSV color components corresponding to each pixel, wherein the HSV color components include hue, saturation and brightness values.

[0027] In steps S11 to S12, the present invention also obtains the RGB coordinates of each pixel. The image is converted to HSV using OpenCV controls to obtain each pixel. HSV coordinates ,in Represents pixels, The RGB coordinates of the red pixel are... The RGB coordinates of the green pixel are... The RGB coordinates of the blue pixel are... The HSV coordinates of the red pixel are... The HSV coordinates of the green pixel are... These are the HSV coordinates of the blue pixel.

[0028] S2: Based on the location information, multiple candidate detection areas are determined, and the snow area is determined by the snow feature recognition algorithm to obtain the snow area identification result.

[0029] Step S2 further includes: S21: Calculate the boundary coordinates of multiple candidate detection areas of the trash can based on the coordinate parameters.

[0030] Among them, the multiple candidate detection regions in step S21 include: The first candidate region, which is the area directly below the trash can, has the following boundary coordinate expression: The second candidate region is the area to the lower left of the trash can, and its boundary coordinates are expressed as follows: The third candidate region, which is the area below the right side of the trash can, has the following boundary coordinate expression: in, The boundary coordinates of the first candidate region. The boundary coordinates of the second candidate region. The boundary coordinates of the third candidate region. Let x be the x-coordinate of the top-left vertex of the bounding box of the trash can in the image data. Let be the y-coordinate of the top-left vertex of the bounding box of the trash can in the image data. Let the height of the bounding box of the trash can in the image data be denoted as . Let x be the x-coordinate of the extended boundary on the left side of the trash can. The vertical coordinate of the upper boundary of the area below the trash can. The width of the extended area to the left of the trash can. Let x be the x-coordinate of the right-side extended boundary of the trash can. The height of the area directly below the trash can. This refers to the height of the lower left and lower right areas of the trash can.

[0031] In the above formula, the parameters are defined as follows: in, For the floor function, The width of the image frame.

[0032] S22: For each candidate detection region, count the number of pixels in the region that meet the snow color feature conditions. The snow color feature conditions are that the hue component is less than the first hue threshold, the saturation component is less than the first saturation threshold, and the luminance component is greater than the first luminance threshold. S23: Calculate the ratio of the number of pixels that meet the snow color feature conditions to the total number of pixels in the region to obtain the snow judgment score. When the snow judgment score exceeds the preset snow judgment threshold, it is marked as a snow region, and the snow region marking result is obtained.

[0033] In steps S22 and S23, the present invention calculates respectively Snow judgment score , Snow judgment score , Snow judgment score The expressions are as follows: in To determine the feature score for snow, the expression is: in, This represents a pixel. After calculating the above score, a snow detection threshold of 0.7 is set, and a judgment is made. At that time, the judgment For snow, when At that time, the judgment For snow, when At that time, the judgment It is a snowy area.

[0034] S3: Divide the candidate detection areas identified as snow areas in the snow area identification results into grids to obtain multiple sub-regions.

[0035] In step S3, the snow area is divided into multiple sub-regions using a non-uniform grid division method. The number of rows and columns of the grid division is adaptively determined according to the geometric dimensions of the snow area, and the boundary coordinates of the multiple sub-regions are obtained by calculating the grid index coordinates.

[0036] Furthermore, in step S3, the present invention employs a non-uniform grid division method to spatially subdivide the detection area identified as snow. Specifically, the present invention divides the area width into 6 parts in the horizontal direction and the area height into 2 parts in the vertical direction, forming a grid structure of 2 rows and 6 columns, totaling 12 sub-regions.

[0037] Specifically, assuming the currently identified snow area is (The detection method for other cases is similar.) Divide the region into a 2*6 grid, taking 5 points of width and 1 point of height from the box, plus two vertices, to divide the entire image into 12 sub-blocks. The expression for the coordinates of any box is: in, The numbering of the 12 boxes. , , Indicates the first The coordinates of the box of each sub-block.

[0038] S4: Extract color feature parameters and texture feature parameters of multiple sub-regions, and use the feature combination scoring algorithm to determine the same-color contaminants in multiple sub-regions to obtain the detection results.

[0039] Step S4 further includes: S41: Extract color feature parameters from multiple sub-regions, and determine multiple color feature scores based on the color feature parameters.

[0040] Specifically, step S41 includes: S411: Calculate the mean difference between the red and green components, the mean difference between the red and blue components, and the mean difference between the blue and green components in each sub-region. Take the maximum absolute value of the multiple mean differences as the RGB channel mean difference feature. When the RGB channel mean difference feature exceeds the color difference threshold, record the RGB channel mean difference score of the current sub-region as 1.

[0041] Specifically, the expression for the mean difference score of the RGB channels is: in, For the first The difference score of the RGB channels of each sub-block.

[0042] S412: Calculate the average brightness value of all pixels in each sub-region. When the average brightness value is within the preset brightness range, record the brightness distribution score of the current sub-region as 1.

[0043] Specifically, the expression for the brightness distribution score is: in, For the first The brightness distribution score of each sub-block.

[0044] S413: Calculate the average saturation value of all pixels in each sub-region. When the average saturation value is within the preset saturation range, record the saturation distribution score of the current sub-region as 1.

[0045] Specifically, the expression for the saturation distribution score is: in, For the first The saturation distribution score of each sub-block.

[0046] S42: Extract texture feature parameters of multiple sub-regions, and obtain multiple texture feature scores based on the texture feature parameters.

[0047] Step S42 further includes: S421: Convert the image to a grayscale image and obtain the grayscale value of each pixel.

[0048] In step S421, the present invention converts the image into a grayscale image and simultaneously acquires each pixel. The grayscale coordinates are represented as .

[0049] S422: Calculate the mean gray value of all pixels in each sub-region, and calculate the variance of the gray value relative to the mean gray value. After normalizing the variance, compare it with the dispersion threshold. When the normalized variance exceeds the dispersion threshold, record the dispersion score of the current sub-region as 1.

[0050] Furthermore, comparing snow with pollutants of the same color (white garbage bags), the snow particles are uniform, while the white garbage bags have obvious wrinkles, and the corresponding pixel values ​​show different dispersion. Therefore, in step S422, this invention calculates the dispersion feature, which is expressed as: in Scoring based on the degree of dispersion. This represents the average grayscale value.

[0051] S423: Perform edge detection on the internal region of each sub-region using the gradient operator to obtain the gradient magnitude of multiple pixels. Mark the pixels whose gradient magnitude exceeds the edge intensity threshold as boundary points, and form a boundary domain from the boundary points. S424: Determine whether non-boundary points are surrounded by the boundary domain, and count the ratio of the number of non-boundary points surrounded by the boundary domain to the total number of pixels in the sub-region. When the ratio exceeds the enclosure degree threshold, record the spatial change rate score of the current sub-region as 1.

[0052] Since white garbage bags have distinct boundaries and corresponding differences in edge strength, in steps S423 to S424 of this invention, the spatial rate of change characteristic is first calculated, as follows: First The boundary value features of each pixel in the region are obtained and represented as follows: in, For pixels The horizontal gradient, For pixels The vertical gradient, For pixels The combined gradient strength, It is the theoretical maximum output of the operator under the condition of maximum contrast.

[0053] Next, the boundary criterion score for each pixel is obtained. , is represented as: in The first judgment threshold is calculated by taking the minimum value of the boundary value calculated based on the number of white garbage bags in the snow.

[0054] Subsequently, in All regional requirements are met. The points form the boundary domain Then calculate the boundary region score for each pixel. , is represented as: in, For the boundary domain The coordinates of a boundary point in the upper left of the center. For the boundary domain The coordinates of a boundary point in the lower left corner of the center. For the boundary domain The coordinates of a boundary point in the upper right corner. For the boundary domain The coordinates of a boundary point in the lower right of the center.

[0055] The expression for the corresponding spatial rate of change score is: in, The score is given for the rate of change in space.

[0056] S43: Summing multiple color feature scores and multiple texture feature scores to obtain a comprehensive criterion score; S44: When the comprehensive criterion score exceeds the judgment threshold, it is determined that there is a contaminant of the same color in the current sub-region, and the bounding box coordinates of the current sub-region are output as the location information of the contaminant of the same color to obtain the detection result; When the number of sub-regions with contaminants of the same color in the detection result reaches the warning trigger number, a warning signal is generated.

[0057] In steps S43 and S44, the present invention aims to determine whether white garbage bags exist in the area. First, a white garbage bag criterion score is calculated. The expression is: When the white garbage bag criterion score When the value is greater than 3, it is determined that there is a white trash bag in the area, and the area frame is returned to the front end as the white trash bag frame. Additionally, for example, when... When there are at least one area in the area containing white garbage bags, it is determined that... The presence of white garbage bags in the area triggers a garbage alert.

[0058] like Figure 2 As shown, the present invention also provides a system for detecting pollutants of the same color in snowy areas near trash cans, used to perform a method for detecting pollutants of the same color in snowy areas near trash cans as described in any of the above claims, including: Extraction module 100: used to acquire image data of the trash can and extract the location information of the trash can from the image data; Judgment module 200: is used to determine multiple candidate detection areas based on the location information of the trash can, and to determine the snow area by using a snow feature recognition algorithm to obtain the snow area identification result; Partitioning module 300: Used to divide the candidate detection areas identified as snow in the snow area identification results into grids to obtain multiple sub-regions; Detection module 400: Used to extract color feature parameters and texture feature parameters of multiple sub-regions, and to determine the same-color contaminants in multiple sub-regions through a feature combination scoring algorithm to obtain the detection results.

[0059] This invention solves the technical challenge of the high visual similarity between white garbage bags and snowy backgrounds by using color space conversion, snow area recognition, grid division, and multi-feature fusion. Without increasing hardware costs, it significantly reduces the false detection rate and false negative rate of garbage detection in snowy environments, improves detection accuracy and positioning precision, and provides effective technical support for the stable operation of intelligent sanitation systems in northern cities during the winter snowfall period.

[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting pollutants of the same color in snowy areas near trash cans, characterized in that, include: S1: Acquire image data of the trash can, and extract the location information of the trash can from the image data; S2: Based on the location information, multiple candidate detection areas are determined, and snow area identification is performed on the multiple candidate detection areas using a snow feature recognition algorithm to obtain the snow area identification result; S3: Divide the candidate detection areas identified as snow areas in the snow area identification results into grids to obtain multiple sub-regions; S4: Extract color feature parameters and texture feature parameters of multiple sub-regions, and use the feature combination scoring algorithm to determine the same-color contaminants in multiple sub-regions to obtain the detection results.

2. The method for detecting pollutants of the same color in snowy areas near trash cans according to claim 1, characterized in that, Step S1 is followed by: S11: Extract the RGB color components of each pixel in the image from the image data. The RGB color components include red, green and blue components. S12: Convert the RGB color components from the RGB color space to the HSV color space, and obtain the HSV color components corresponding to each pixel. The HSV color components include hue value, saturation value and brightness value.

3. The method for detecting pollutants of the same color in snowy areas near trash cans according to claim 2, characterized in that, Step S2 further includes: S21: Calculate the boundary coordinates of multiple candidate detection areas for the trash can based on the coordinate parameters; S22: For each candidate detection region, count the number of pixels in the region that meet the snow color feature conditions, wherein the snow color feature conditions are that the hue component is less than the first hue threshold, the saturation component is less than the first saturation threshold, and the brightness component is greater than the first brightness threshold. S23: Calculate the ratio of the number of pixels that meet the snow color feature conditions to the total number of pixels in the region to obtain the snow judgment score. When the snow judgment score exceeds the preset snow judgment threshold, it is marked as a snow region and the snow region identification result is obtained.

4. The method for detecting pollutants of the same color in snowy areas near trash cans according to claim 3, characterized in that, The multiple candidate detection regions in step S21 include: The first candidate region, which is the area directly below the trash can, has the following boundary coordinate expression: The second candidate region is the area to the lower left of the trash can, and its boundary coordinates are expressed as follows: The third candidate region, which is the area below the right side of the trash can, has the following boundary coordinate expression: in, The boundary coordinates of the first candidate region. The boundary coordinates of the second candidate region. The boundary coordinates of the third candidate region. Let x be the x-coordinate of the top-left vertex of the bounding box of the trash can in the image data. Let be the y-coordinate of the top-left vertex of the bounding box of the trash can in the image data. Let be the width of the bounding box of the trash can in the image data. Let x be the x-coordinate of the extended boundary on the left side of the trash can. The vertical coordinate of the upper boundary of the area below the trash can. The width of the extended area to the left of the trash can. Let x be the x-coordinate of the right-side extended boundary of the trash can. The height of the area directly below the trash can. This refers to the height of the lower left and lower right areas of the trash can.

5. The method for detecting pollutants of the same color in snowy areas near trash cans according to claim 1, characterized in that, In step S3, the snow area is divided into multiple sub-regions using a non-uniform grid division method. The number of rows and columns of the grid division is adaptively determined according to the geometric dimensions of the snow area, and the boundary coordinates of the multiple sub-regions are obtained by calculating the grid index coordinates.

6. The method for detecting pollutants of the same color in snowy areas near trash cans according to claim 1, characterized in that, Step S4 further includes: S41: Extract color feature parameters of multiple sub-regions, and determine multiple color feature scores based on the color feature parameters; S42: Extract texture feature parameters of multiple sub-regions, and determine multiple texture feature scores based on the texture feature parameters; S43: Summate the scores of multiple color features with the scores of multiple texture features to obtain a comprehensive criterion score; S44: When the comprehensive criterion score exceeds the judgment threshold, it is determined that there is a pollutant of the same color in the current sub-region. The bounding box coordinates of the current sub-region are output as the location information of the pollutant of the same color, and the detection result is obtained.

7. The method for detecting pollutants of the same color in snowy areas near trash cans according to claim 6, characterized in that, Step S44 is followed by: When the number of sub-regions containing the same color pollutant in the detection results reaches the warning trigger threshold, a warning signal is generated.

8. The method for detecting pollutants of the same color in snowy areas near trash cans according to claim 6, characterized in that, Step S41 specifically includes: S411: Calculate the mean difference between the red and green components, the mean difference between the red and blue components, and the mean difference between the blue and green components in each sub-region. Take the maximum absolute value of the multiple mean differences as the RGB channel mean difference feature. When the RGB channel mean difference feature exceeds the color difference threshold, record the RGB channel mean difference score of the current sub-region as 1. S412: Calculate the average brightness value of all pixels in each sub-region. When the average brightness value is within the preset brightness range, record the brightness distribution score of the current sub-region as 1. S413: Calculate the average saturation value of all pixels in each sub-region. When the average saturation value is within the preset saturation range, record the saturation distribution score of the current sub-region as 1.

9. A method for detecting pollutants of the same color in snowy areas near trash cans according to claim 6, characterized in that, Step S42 further includes: S421: Convert the image to a grayscale image and obtain the grayscale value of each pixel; S422: Calculate the mean gray value of all pixels in each sub-region, and calculate the variance of the gray value relative to the mean gray value. After normalizing the variance, compare it with the dispersion threshold. When the normalized variance exceeds the dispersion threshold, record the dispersion score of the current sub-region as 1. S423: Edge detection is performed on the internal region of each sub-region using a gradient operator to obtain: the gradient magnitude of multiple pixels. Pixels whose gradient magnitude exceeds the edge intensity threshold are marked as boundary points, and the boundary points constitute the boundary region. S424: Determine whether non-boundary points are surrounded by boundary regions, and calculate the ratio of the number of non-boundary points surrounded by boundary regions to the total number of pixels in the sub-region. When the ratio exceeds the enclosure threshold, the spatial change rate score of the current sub-region is recorded as 1.

10. A system for detecting contaminants of the same color in snowy areas near trash cans, used to perform a method for detecting contaminants of the same color in snowy areas near trash cans as described in any one of claims 1 to 9, characterized in that, include: Extraction module: used to acquire image data of the trash can and extract the location information of the trash can from the image data; Judgment module: Used to determine multiple candidate detection areas based on the location information of trash cans, and to determine the snow area by using a snow feature recognition algorithm to obtain the snow area identification result; The partitioning module is used to divide the candidate detection areas identified as snow in the snow area identification results into grids, resulting in multiple sub-regions; Detection module: Used to extract color feature parameters and texture feature parameters of multiple sub-regions, and to determine the same-color contaminants in multiple sub-regions through feature combination scoring algorithm to obtain detection results.