Target object recognition and replacement method and system for advertisement exhibition images
By using image segmentation and convolutional neural network technology, the problem of distinguishing target objects from the background in advertising exhibition images has been solved, achieving high-precision target recognition and segmentation in complex backgrounds.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2026-03-17
AI Technical Summary
In complex backgrounds, the target object in an advertising exhibition image can easily be obscured by background textures, colors, or patterns, making it difficult to distinguish the target from the background and affecting the recognition effect.
By using image segmentation and convolutional neural networks, foreground targets and background regions in advertising exhibition images are identified, pixel difference metrics are calculated, difference pixels are labeled, connected regions are clustered, false foreground regions are removed, and a segmentation mask is constructed to accurately locate the target object.
It effectively reduces background interference, improves the accuracy and precision of target recognition, can accurately extract foreground targets in complex backgrounds, reduces noise interference, and ensures clear separation of target areas.
Smart Images

Figure CN119693697B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data processing, and in particular to a method and system for identifying and replacing target objects in advertising and exhibition images. Background Technology
[0002] In today's society, the advertising industry is booming, and billboards of all sizes can be seen everywhere. Advertising is a means of publicity that uses a certain form of media to publicly and widely convey information to the public for a specific purpose. Setting up billboards in public places with high traffic is a common form of publicity.
[0003] In advertising exhibitions, target objects often appear against very complex backgrounds. Dynamic elements, cluttered objects, and changing lighting in the background can all interfere with the identification of the target object. The complexity of the background increases the difficulty of target identification, making the target object seem to blend into the background. In some scenarios, the background itself may even contain other target information. Summary of the Invention
[0004] This invention aims to solve the problem that in complex backgrounds, target objects may be obscured by the texture, color, or pattern of the background, making it difficult to distinguish the target from the background in an image. It provides a method and system for target object identification and replacement in advertising exhibition images.
[0005] The present invention employs the following technical means to solve the technical problem:
[0006] This invention provides a method for identifying and replacing target objects in advertising exhibition images, comprising:
[0007] Based on the pre-uploaded advertising display image, corresponding image data is identified from the advertising display image, wherein the image data specifically includes foreground target data and background data;
[0008] Determine whether the image data detects a preset color overlap;
[0009] If so, the advertising display image is segmented, corresponding region information is divided in the image data, the pixel difference measure between the pixel value of the current image frame and the preset background model is calculated from the region information, and the difference pixels of the region information are marked according to the pixel difference measure. The region information specifically includes the target region and the background region.
[0010] Determine whether the neighborhood information of the differing pixels can be continuously matched;
[0011] If not, the differing pixels are clustered into connected regions, and isolated pixels that are not adjacent are detected in the connected regions. Based on the isolated pixels, pseudo-foreground regions in the connected regions are identified, and regions to be filtered whose area value is less than a preset number of pixels in the pseudo-foreground regions are removed.
[0012] Furthermore, before the step of segmenting the advertising display image and dividing the corresponding region information in the image data, the method further includes:
[0013] A pre-defined convolutional neural network is used to extract the hierarchical features of the advertisement display image, and corresponding candidate regions are generated based on the hierarchical features. Specifically, the hierarchical features include shape, texture, and color.
[0014] Determine whether the candidate region matches a preset region category, wherein the region category specifically includes the target's category label and location;
[0015] If so, a segmentation mask corresponding to the candidate region is constructed through a preset mask branch. The segmentation mask is aligned with the preset target bounding box of the advertising exhibition image, and the target bounding box is combined with the segmentation mask. Based on the alignment result and the combination result, pixel-level segmentation of each target object in the advertising exhibition image is performed.
[0016] Furthermore, the step of marking the difference pixels of the region information according to the pixel difference metric further includes:
[0017] Based on the preset feature dynamics of the advertising exhibition image, the difference threshold for the pixel difference measurement is constructed;
[0018] Determine whether the pixel difference metric exceeds the preset pixel difference threshold;
[0019] If so, then according to the pixel difference metric, each pixel that is significantly different from the background is marked, and the pixels are classified into foreground pixels and background pixels. By applying a preset weighted average to the foreground pixels and the background pixels, the current image change of the advertising display image is dynamically updated.
[0020] Furthermore, the step of clustering the differing pixels into connected regions and detecting non-adjacent isolated pixels within the connected regions further includes:
[0021] Based on the preset neighborhood relationship of the difference pixels, neighborhood detection is performed on the pixels in the connected region to verify the connection relationship of the pixels. Specifically, the neighborhood relationship includes horizontal, vertical and diagonal adjacency.
[0022] Determine whether the connection relationship conforms to the neighborhood relationship;
[0023] If so, the pixel is expanded by applying a preset structural element to obtain a foreground pixel that overlaps with the pixel. The foreground area of the advertising exhibition image is dynamically updated based on the foreground pixel. Specifically, the structural element includes square, circle and cross shapes.
[0024] Furthermore, the step of determining whether the image data detects a preset color overlap also includes:
[0025] The color features of each pixel are extracted from the image data, and the color features are compared with a preset target color range to calculate the color overlap of each pixel.
[0026] Determine whether the color overlap reaches a preset threshold;
[0027] If so, the foreground pixel corresponding to the color overlap is identified, and the corresponding foreground region is marked from the image data based on the foreground pixel.
[0028] Furthermore, the step of determining whether the neighborhood information of the differing pixels can be continuously matched also includes:
[0029] Based on the pre-divided local regions of the advertising exhibition image, the mean and variance of the difference pixels are calculated;
[0030] Determine whether the mean and variance detect preset fluctuations;
[0031] If so, the corresponding noise features are identified from the difference pixels, the difference threshold is dynamically adjusted according to the noise features, and the falsely detected noise regions are removed based on the difference threshold. Specifically, the noise features include Gaussian noise, salt-and-pepper noise, and speckle noise.
[0032] Furthermore, the step of identifying corresponding image data from the pre-uploaded advertising display image further includes:
[0033] A preset target detection algorithm is applied to identify the target object category in the advertising exhibition image, wherein the target object category specifically includes products, text, and brand logos;
[0034] Determine whether the target object category possesses preset advertising elements, wherein the advertising elements specifically include patterns, backgrounds, and texture features;
[0035] If so, then based on the advertising elements, the target object category is matched to a preset advertising theme, and the advertising display image is divided into the corresponding advertising category according to the advertising theme. Specifically, the advertising theme includes company logo, brand identity and product icon, and the advertising category includes product advertisement, promotional advertisement and brand advertisement.
[0036] This invention also provides a target object recognition and replacement system for advertising exhibition images, comprising:
[0037] The recognition module is used to identify corresponding image data from the pre-uploaded advertising display image, wherein the image data specifically includes foreground target data and background data;
[0038] The judgment module is used to determine whether the image data detects a preset color overlap;
[0039] An execution module is configured to, if so, segment the advertising display image, divide the corresponding region information in the image data, calculate the pixel difference measure between the pixel value of the current image frame and the preset background model from the region information, and mark the difference pixels of the region information according to the pixel difference measure, wherein the region information specifically includes the target region and the background region.
[0040] The second judgment module is used to determine whether the neighborhood information of the difference pixels can be continuously matched.
[0041] The second execution module is used to, if not, cluster the difference pixels into connected regions, detect non-adjacent isolated pixels in the connected regions, identify pseudo-foreground regions in the connected regions based on the isolated pixels, and remove the areas to be filtered in the pseudo-foreground regions whose area value is less than a preset number of pixels.
[0042] Furthermore, it also includes:
[0043] The extraction module is used to extract the hierarchical features of the advertising exhibition image by applying a preset convolutional neural network, and generate corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color;
[0044] The third judgment module is used to determine whether the candidate region matches the preset region category, wherein the region category specifically includes the target's category label and location;
[0045] The third execution module is used to construct a segmentation mask corresponding to the candidate region through a preset mask branch if the condition is met, align the segmentation mask with the preset target bounding box of the advertising exhibition image, combine the target bounding box with the segmentation mask, and divide each target object in the advertising exhibition image into pixel-level segments based on the alignment result and the combination result.
[0046] Furthermore, the execution module also includes:
[0047] The construction unit is used to construct the difference threshold of the pixel difference measurement based on the preset feature dynamics of the advertising exhibition image;
[0048] The judgment unit is used to determine whether the pixel difference measurement exceeds the preset pixel difference threshold;
[0049] The execution unit is configured to, if so, mark each pixel that is significantly different from the background according to the pixel difference metric, classify the pixels into foreground pixels and background pixels, and dynamically update the current image change of the advertisement display image by applying a preset weighted average to the foreground pixels and the background pixels.
[0050] This invention provides a method and system for identifying and replacing target objects in advertising exhibition images, which has the following beneficial effects:
[0051] This invention segments advertising images into foreground target regions and background regions, effectively reducing interference between the target and the background. Especially in complex backgrounds, it can extract the target region and the background region separately, thereby improving the accuracy of subsequent target recognition. At the same time, by calculating the difference between the pixel values of the current image frame and the preset background model, it can accurately determine which regions belong to the foreground target and which regions belong to the background. Furthermore, by marking the difference pixels in the region information, it can accurately locate the foreground target region in the image, thus avoiding interference from complex backgrounds on the target region. Attached Figure Description
[0052] Figure 1 This is a flowchart illustrating an embodiment of the target object identification and replacement method for advertising exhibition images according to the present invention.
[0053] Figure 2 This is a structural block diagram of an embodiment of the target object recognition and replacement system for advertising exhibition images of the present invention. Detailed Implementation
[0054] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The realization of the purpose, functional features, and advantages of the invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings.
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] Reference Appendix Figure 1 The target object identification and replacement method for an advertising exhibition image according to one embodiment of the present invention includes:
[0057] S1: Based on the pre-uploaded advertising display image, identify the corresponding image data from the advertising display image, wherein the image data specifically includes foreground target data and background data;
[0058] S2: Determine whether the image data detects a preset color overlap;
[0059] S3: If so, the advertising display image is segmented, corresponding region information is divided in the image data, the pixel difference measure between the pixel value of the current image frame and the preset background model is calculated from the region information, and the difference pixel points of the region information are marked according to the pixel difference measure. The region information specifically includes the target region and the background region.
[0060] S4: Determine whether the neighborhood information of the difference pixels can be continuously matched;
[0061] S5: If not, cluster the difference pixels into connected regions, detect non-adjacent isolated pixels in the connected regions, identify pseudo foreground regions in the connected regions based on the isolated pixels, and remove the areas to be filtered in the pseudo foreground regions whose area value is less than a preset number of pixels.
[0062] In this embodiment, the system identifies corresponding image data from pre-uploaded advertising display images. This image data specifically includes foreground target data and background data. The system then determines whether these image data detect a pre-defined color overlap, and executes corresponding steps accordingly. For example, if the system determines that no pre-defined color overlap is detected in the image data, it considers that the color distribution between the foreground target and the background in the image has no significant similarity, and the target and background can be clearly distinguished. The system will then directly perform target recognition and target region extraction without complex color overlap processing, and can rely more heavily on other features for target extraction. For example, by optimizing the shape, structure, and location of objects, image segmentation, edge detection, and morphological operations can be used to further optimize target extraction and classification. Simple thresholding, region growing, or connected component detection methods can be employed to directly extract foreground target regions from images without the need for complex color matching or overlap detection techniques. This allows for rapid identification and separation of target regions, enabling further target analysis or feature extraction. For instance, when the system detects pre-defined color overlap in the image data, it considers a significant similarity in color distribution between the foreground target and the background. The system then segments the advertising image, dividing the image data into corresponding regions. The system comprises a target region and a background region. It calculates the pixel difference metric between the pixel values of the current image frame and a pre-defined background model from this region information. Based on different pixel difference metrics, it marks the difference pixels in the region information. By calculating the difference metric between each pixel value in the image data and the pre-defined background model, the system can further quantify the difference between the target and the background. This process helps to identify the target region more accurately, even if there is color overlap between the target and the background, by measuring the difference. This is especially helpful when the background and target colors are similar. Furthermore, marking the difference pixels helps the system accurately extract the target region, particularly when the background and target colors are similar. Different pixels serve as the boundary between the target and the background, accurately distinguishing foreground targets from the background. By marking these differing pixels, the system can filter out noise or irrelevant areas with similar colors to the background, reducing false detections. Furthermore, in cases of color overlap, the system relies on calculating the differences between pixels and the background model to distinguish the differences between the target area and the background in detail, overcoming the limitations of traditional simple color-matching methods. Through these meticulous steps, the system can not only identify the background area but also accurately locate the target, ensuring the accuracy of target detection even when the background and target colors are similar. The system then determines whether the neighborhood information of the differing pixels can be continuously matched to execute the corresponding steps.For example, when the system determines that the neighborhood information of the differing pixels can be continuously matched, the system considers the differing pixels in the image to form a coherent, continuous region. This region typically represents a foreground target, rather than noise or isolated points in the background. The system labels these continuous regions as foreground target regions. This step is crucial for target recognition and extraction. Through connected component analysis, these differing pixels are clustered into connected regions, which can more accurately delineate the boundaries of the target region, further improving the accuracy of target recognition. Simultaneously, target tracking is performed. The system can track these continuous regions across multiple image frames, maintaining target recognition. This step is particularly important in video surveillance or real-time advertising displays, and allows for deeper analysis, such as target size analysis, shape analysis, and color analysis, to further extract target feature information. This is highly valuable for applications such as advertising display and target monitoring. Conversely, when the system determines that the neighborhood information of the differing pixels cannot be continuously matched, the system considers the differing pixels in the image to be discontinuous, possibly belonging to background noise or isolated points. The system clusters these differing pixels into connected regions and detects targets within these connected regions. For non-adjacent isolated pixels, based on the isolated pixels at different positions, the system identifies pseudo-foreground regions within connected regions and removes areas within these pseudo-foreground regions whose area value is smaller than a pre-set number of pixels. The system further identifies pseudo-foreground regions (such as isolated small areas) by clustering these dissimilar pixels into connected regions. This effectively removes meaningless noise, ensuring the remaining target area is unaffected by noise. This step avoids false identification and missed identification, improving the accuracy of target detection. Simultaneously, through clustering and removing small pseudo-foreground regions, the system maintains strong robustness even in noisy environments. Even when the target area overlaps with or is similar to the background, the system can still accurately separate and identify the target, reducing background interference and improving the stability of image processing. Furthermore, by clustering connected regions and removing isolated noise pixels, the system can extract the target area more accurately. This step, by eliminating irrelevant small areas and noise, ensures that only coherent target areas are retained, helping to improve the accuracy of target recognition and segmentation. Accurate identification of the target area provides higher-quality input data for subsequent analysis (such as target classification, tracking, and segmentation).
[0063] It should be noted that the advertising display image is segmented, and corresponding region information is divided in the image data. The pixel difference metric between the pixel value of the current image frame and the preset background model is calculated from the region information. A specific example is as follows:
[0064] Suppose there is an advertising display image with a simple blue wall as the background (background) and a red billboard as the advertising content (foreground target); the goal of the system is to separate the advertising content (foreground target) from the background (blue wall).
[0065] First, the image needs to be segmented to separate the foreground and background regions. Here, we use a simple thresholding method as an example:
[0066] Background area: Blue wall, RGB value (0,0,255);
[0067] Foreground target area: billboard, RGB value is (255,0,0);
[0068] For this image, the goal of segmentation is to separate the wall from the billboard. This is achieved by setting a threshold, for example, a threshold of 200 for the red channel. When the red channel value of a pixel is greater than 200, it is considered a foreground object (red billboard); otherwise, it belongs to the background (blue wall).
[0069] If a pixel in the image has an RGB value of (255,0,0), which is part of the red billboard, it will be classified as the foreground area; if a pixel has an RGB value of (0,0,255), which is part of the background wall, it will be classified as the background area.
[0070] Then, the pixel difference metric is calculated, which calculates the color difference of each pixel to determine whether it belongs to the foreground target or the background area. The difference metric can be calculated in different ways, such as using the absolute difference method and Euclidean distance.
[0071] Absolute difference method:
[0072] Calculate the difference between the RGB value of each pixel in the current image frame and the background model; assume the background model has been set to blue RGB values (0,0,255);
[0073] For the billboard area, the pixel RGB value is (255,0,0). We compare it with the background model (0,0,255), and the difference is |255-0|+|0-0|+|0-255|=255+0+255=510. If the difference is greater than the set threshold (e.g., 100), the pixel is marked as a foreground target.
[0074] For the background region, the pixel RGB value is (0,0,255). When compared with the background model (0,0,255), the difference is |0-0|+|0-0|+|255-255|=0+0+0=0. If the difference is less than the set threshold (e.g., 100), the pixel is marked as background.
[0075] Euclidean distance method:
[0076] Euclidean distance is used to calculate pixel differences, especially when the color variations in the image are complex, as Euclidean distance can provide a more accurate measure of differences.
[0077] For the billboard area, the pixel RGB value is (255, 0, 0). When compared with the background model (0, 0, 255), the Euclidean distance is calculated as √[(255-0)²+(0-0)²+(0-255)²]=√(65025+0+65025)=√130050≈360.52. If the Euclidean distance exceeds a set threshold (e.g., 200), the pixel is marked as a foreground target.
[0078] For the background region, the pixel RGB value is (0,0,255). It is compared with the background model (0,0,255). The Euclidean distance is √[(0-0)²+(0-0)²+(255-255)²]=√(0+0+0)=0. If the Euclidean distance is less than the set threshold (e.g., 200), the pixel is marked as background.
[0079] The system then distinguishes between the target and the background. Using the aforementioned difference measurement, the system successfully differentiates the foreground target from the background. The specific results are as follows:
[0080] Foreground target (billboard): Because the color of the billboard is significantly different from the background (the difference between red and blue is very large), the difference measurement of most pixels will exceed the set threshold (e.g., 510 or 360.52), and therefore it is identified as a foreground target area;
[0081] Background area (wall): The background wall is blue, which is the same color as the background model, so its difference measure is very small (0) and it is marked as the background area;
[0082] Finally, after segmentation and difference measurement processing, the system was able to accurately separate the billboard area from the background wall area and mark them as different regions. This laid the foundation for subsequent image analysis (such as target recognition and object tracking). Ultimately, it was found that the red of the billboard and the blue of the background have obvious differences, so their difference measurement values are high and they can be easily identified as foreground targets. The blue of the background area is similar to the preset background model, with a difference measurement of 0, and is identified as the background.
[0083] In summary, by segmenting the advertising exhibition image into foreground and background regions and using color thresholding or other methods, the billboard and background wall are distinguished. At the same time, by calculating the difference between the current pixel and the preset background model (using absolute difference or Euclidean distance), the system can determine which pixels belong to the foreground target and which belong to the background region. Furthermore, through difference measurement, the foreground target (billboard) and the background (blue wall) are accurately separated, providing a clear region division for subsequent processing.
[0084] It should be added that the differing pixels are clustered into connected regions, and isolated pixels that are not adjacent are detected in the connected regions. A specific example is as follows:
[0085] There is an advertising exhibition image containing a red billboard (foreground target) and some blue background; due to the possibility of textures or cluttered patterns in the background, there may also be some noise in the image (such as isolated blue pixels).
[0086] First, the system calculates the pixel difference; for example:
[0087] Assuming the background color is blue (RGB: 0,0,255) and the foreground of the billboard is red (RGB: 255,0,0), the system checks the color value of each pixel one by one and calculates the difference with the background model; pixels whose pixel values differ from the background by more than a set threshold (i.e., the red billboard part) are marked as difference pixels;
[0088] The system then clusters the differing pixels into connected regions. Using a connected region analysis algorithm, the system clusters these differing pixels into one or more connected regions. Assume the foreground (red billboard) in the image consists of the following differing pixels:
[0089] Pixel A: Red;
[0090] Pixel B: Red;
[0091] Pixel C: Red;
[0092] Pixel D: Red;
[0093] Pixel E: Blue (background);
[0094] Pixel F: Red;
[0095] Pixel G: Blue (background);
[0096] Pixel H: Red;
[0097] These red difference pixels (A, B, C, D, F, H) belong to the same connected region, representing the foreground area of the billboard; the blue pixels (E and G) are considered the background area.
[0098] The system then detects isolated pixels. Within these connected regions, the system checks whether any isolated pixels exist. Suppose the system finds that pixel D is only adjacent to one pixel, while the rest of the red pixel regions are relatively closely connected, making pixel D appear "isolated".
[0099] Finally, isolated pixels are removed. The system removes isolated pixels based on a preset area threshold (for example, areas with an area less than 10 pixels are considered noise). Since pixel D is isolated and its area is less than the threshold, it is considered noise and is therefore removed.
[0100] In summary, in the above example, the system ultimately identified the foreground region of the billboard and removed irrelevant noise or isolated pixels, thus successfully separating the foreground region of the billboard (composed of pixels A, B, C, F, and H) while accurately preserving the background (blue area). Through clustering of differential pixels and removal of isolated pixels, the system effectively solved the problem of noise interference in complex backgrounds and successfully separated the foreground target and background in the advertising exhibition image.
[0101] In this embodiment, before step S3, which involves segmenting the advertising display image and dividing the corresponding region information from the image data, the method further includes:
[0102] S301: Apply a preset convolutional neural network to extract the hierarchical features of the advertising exhibition image, and generate corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color;
[0103] S302: Determine whether the candidate region matches a preset region category, wherein the region category specifically includes the target's category label and location;
[0104] S303: If so, construct a segmentation mask corresponding to the candidate region through a preset mask branch, align the segmentation mask with the preset target bounding box of the advertising exhibition image, and combine the target bounding box with the segmentation mask. Based on the alignment result and the combination result, divide each target object in the advertising exhibition image into pixel-level segments.
[0105] In this embodiment, the system uses a pre-defined convolutional neural network to extract hierarchical features from the advertising display image. These hierarchical features specifically include shape, texture, and color. Based on these features, corresponding candidate regions are generated. The system then determines whether these candidate regions match a pre-defined region category, which includes the target's category label and location, to execute corresponding steps. For example, if the system determines that a candidate region generated from the hierarchical features does not match a pre-defined region category, the system considers the candidate region to not contain the target, or the contained target does not match the expected category. The system then adjusts the output threshold of the convolutional neural network and improves the quality of the candidate regions through an optimization algorithm, using more... To enhance the robustness of target features, features such as multi-scale features or adaptive convolutional networks commonly used in deep learning are employed. Non-maximum suppression methods are used to remove redundant or overlapping candidate regions, ensuring that each candidate region corresponds to only one target category. Multi-task learning is introduced, combining location regression and category recognition tasks to improve the model's accuracy in location and category matching. Furthermore, if the model cannot effectively match category labels under specific environments or conditions (such as uneven lighting or angle changes), the adaptability to diverse targets can be enhanced by increasing the training dataset under different environmental conditions. For example, when the system determines that the candidate region generated by the hierarchical features matches a pre-defined region category, then… The system considers the candidate region to be compatible with expectations. It then constructs a segmentation mask corresponding to the candidate region using pre-defined mask branches. This segmentation mask is aligned with the pre-defined target bounding box of the advertising image, and the target bounding box is combined with the segmentation mask. Based on the alignment and combination results, pixel-level segmentation of each target object in the advertising image is achieved. By aligning the generated candidate region with the target bounding box and combining it with the segmentation mask, the system can achieve pixel-level target segmentation. This means that the target can not only be accurately identified but also its shape and boundary in the image can be precisely determined, ensuring more refined and accurate separation between the target object and the background. Furthermore, the combination of the segmentation mask and the target bounding box... This helps refine the classification results of candidate regions. By aligning the segmentation mask with the target bounding box, the system can further refine the position and shape of the target, optimize the detection results, and thus provide more accurate classification and positioning information. Furthermore, by generating a segmentation mask based on a pre-defined mask branch and aligning it with the target bounding box, the system can quickly and accurately segment the target, which not only improves the segmentation accuracy but also reduces redundant calculations, giving the system better real-time performance. By refining the pixel-level segmentation of the target, the system can not only perform static target recognition but also provide accurate data support for subsequent target tracking. In the real-time display of advertising exhibitions, accurate target segmentation can effectively help track and analyze the behavior and changes of the target.
[0106] It should be noted that a pre-defined convolutional neural network is used to extract hierarchical features from the advertisement display image, and corresponding candidate regions are generated based on these hierarchical features. A specific example is as follows:
[0107] Suppose we have an image of an advertising exhibition containing multiple billboards, exhibits, and other visitors; the goal of the system is to extract features from this image using a convolutional neural network to generate candidate regions for further billboard identification.
[0108] Input Image and Convolutional Neural Network (CNN) Feature Extraction: First, the input image is fed into a pre-trained CNN. Assume the image size is 800×600 pixels and contains multiple objects, including billboards and exhibits. The advertising and exhibition image contains brightly colored billboards with many details, such as text, logos, and patterns on the billboards, while the background is cluttered with exhibits and audience members. Each layer of the CNN extracts features at different levels through convolutional operations.
[0109] The first convolutional layer extracts low-level features from the image, such as edges and lines. These low-level features may not be able to distinguish billboards, but they are the basis for recognizing more complex images.
[0110] Intermediate convolutional layers: As the convolutional network progresses, it begins to learn more complex shapes and textures; for example, the rectangular edges of billboards, font shapes, and even the unique color patterns of billboards; at this point, the network is already able to recognize some features of the billboards, such as straight edges and fonts.
[0111] Advanced feature layers: Deeper convolutional layers (such as those in VGGNet or ResNet) can extract the overall structural features of the billboard, including specific text, logos, and background patterns on the billboard.
[0112] Then, the feature map generates candidate regions. The CNN generates candidate regions through hierarchical feature maps. A candidate region is a region in the image that may contain the target object. Based on different features (such as color, shape, texture, etc.), the system generates several candidate boxes.
[0113] Feature map: The high-level convolutional layers of CNN (such as the last few layers of ResNet) generate a feature map of size 50×50, where each point represents the features of a small region in the image; each point contains a feature vector of that region, which describes information such as the color, texture, and shape of that region;
[0114] Generate candidate regions: Based on the feature map, the system uses a **Region Proposal Network (RPN)** to generate candidate regions. The RPN generates multiple possible candidate boxes at each location on the feature map using a sliding window approach. Each candidate box has a score, indicating the probability that it contains the target. For example, the system might generate multiple candidate boxes for the area where the billboard is located, and the score of each box represents the confidence that the billboard is likely to be located in that area. If the billboard is located in the center of the image, the RPN might generate several candidate boxes in the center of the image, which may include part or the entire area of the billboard.
[0115] After selecting candidate regions and generating multiple candidate regions, the system will filter out the region most likely to contain the target based on the confidence score of each candidate box; if the candidate box has a high score, it means that the region is very likely to contain the billboard.
[0116] Candidate box filtering: The system filters based on confidence scores, removing low-score regions and retaining only high-confidence candidate boxes; for example, the system filters out a rectangular region located in the center of the image, which has a high confidence score and may contain a billboard; other low-confidence regions may only contain the background or other irrelevant objects.
[0117] Then, the system verifies the matching between the region and the target category. It will determine whether these candidate regions match the pre-defined target category, such as whether a candidate region is a "billboard".
[0118] Category matching: The system verifies whether each candidate box contains a billboard based on the preset target category label; if the features of a candidate region match the features of a billboard (e.g., rectangular shape, text, color), then the system considers the region to match the target category;
[0119] Example: Suppose a candidate bounding box is located in the center of an image, and the texture, color, shape, and other features of that region match the characteristics of a billboard; the system will consider this region to be a billboard and may label the candidate region as the "billboard" category;
[0120] Finally, the system outputs candidate regions, including all regions that meet the criteria. These candidate regions may include billboards or other targets, depending on the category matching results.
[0121] Candidate region output: The output candidate region can be a part or the entire area of the billboard in the image. The system can assign a category label and location information to each candidate region. Assuming that the candidate region in the central part of the image is identified as a billboard, the system will output the location, shape and category label of the region (such as "billboard").
[0122] In summary, convolutional neural networks automatically extract hierarchical features from advertising exhibition images, avoiding the hassle of manual feature design. They can automatically identify features such as the shape, texture, and color of billboards. Furthermore, the candidate region generation method based on deep learning is more accurate than traditional image processing methods (such as sliding windows and HOG features), and can better identify targets in complex backgrounds. Even if the advertising exhibition image contains multiple complex objects or has a cluttered background, the system can accurately identify the billboard target through the generated candidate regions.
[0123] It should be noted that a segmentation mask corresponding to the candidate region is constructed through a preset mask branch. The segmentation mask is then aligned with the preset target bounding box of the advertisement display image, and the target bounding box is combined with the segmentation mask. A specific example is as follows:
[0124] Suppose we have an advertising exhibition image containing multiple billboards and other elements; the goal of the system is to use a convolutional neural network (CNN) to extract hierarchical features of the image, then generate segmentation masks for the billboards through candidate regions, and perform target segmentation.
[0125] First, hierarchical features are extracted and candidate regions are generated. A pre-defined convolutional neural network (such as ResNet, VGG, etc.) is used to extract features from the advertising exhibition image. Through the convolutional layers of the network, the hierarchical features of the image (such as shape, texture, color, etc.) will be extracted. These hierarchical features will help the network generate potential target regions.
[0126] Suppose the extracted feature map contains information such as billboards, other signs, and background; the image resolution is 800×600 pixels, containing multiple billboards, each with different patterns and text; through a Region Proposal Network (RPN) or other candidate region generation algorithms, the network will propose multiple candidate regions (bounding boxes), which may include billboards, background, and other objects;
[0127] For example, suppose the network proposes the following candidate regions:
[0128] Candidate region 1: bounding box (100, 150) to (200, 250), this is a billboard;
[0129] Candidate region 2: bounding box (300, 400) to (500, 600), this is another billboard;
[0130] Candidate region 3: bounding box (600, 700) to (700, 800), which is a background region;
[0131] Subsequently, a segmentation mask is generated through a mask branch. Based on object detection, an accurate segmentation mask also needs to be generated. The mask branch generates a corresponding mask for each candidate region. For each candidate region (e.g., candidate region 1), the network will generate a corresponding segmentation mask based on the features of that region. Assuming that the mask generated for the billboard corresponding to candidate region 1 is a 28×28 binary image (the mask size is usually smaller than the candidate box), the billboard part is marked as 1 and the other part is marked as 0.
[0132] For example, the generated mask might look like this:
[0133] Pixels within the billboard area are marked as 1;
[0134] The background area outside the billboard is marked as 0;
[0135] Mask diagram (28×28): 00000000000000000000000000000000 00000011111111111111111110000000 00000111111111111111111111000000 00000111111111111111111111000000 00000111111111111111111111000000 00000111111111111111111111000000 00000111111111111111111111000000 00000011111111111111111110000000 00000000000000000000000000000000
[0145] The 28×28 mask mentioned above is marked as 1 in the billboard area and 0 in other background areas;
[0146] Align the segmentation mask with the target bounding box. The resulting segmentation mask is 28×28 pixels in size, while the actual target area (billboard) may be larger than the mask. In order to accurately apply the segmentation mask to the image, the mask needs to be scaled and aligned with the actual target area according to the bounding box of the candidate area. Assuming that the bounding box of candidate area 1 is (100,150) to (200,250), we can know that the actual location of the billboard is this area.
[0147] Next, the mask is scaled to the size of the bounding box. Here, a 28×28 mask needs to be enlarged to a size of 100×100 (assuming the target area is this size). This scaling process uses an interpolation algorithm (such as bilinear interpolation) to ensure image continuity. After scaling, the mask will cover the billboard area in the image. The scaled mask might look like this (this is a simplified illustration):
[0148] Scaling up the mask (100×100): 0000000000000000000000000000000000 0000001111111111111111111100000000 0000011111111111111111111110000000 0000011111111111111111111111000000 0000011111111111111111111111000000 0000011111111111111111111111000000 0000011111111111111111111110000000 0000001111111111111111111100000000 0000000000000000000000000000000000
[0158] This mask represents the precise outline of the billboard, scaled down to match the target area;
[0159] Finally, the target bounding box and the segmentation mask are combined. Specifically, the combination operation is to cover the actual location of the target in the image with the scaled mask to achieve accurate segmentation of the target. The scaled mask is covered with the area where the billboard is located (e.g., the area from (100,150) to (200,250) in the advertising exhibition image), and this mask is combined with the pixels of the target bounding box to generate a pixel-level segmentation map of the billboard. The final image will display the accurate segmentation of the billboard, with the background part as 0 and the billboard part as 1.
[0160] Assuming the original advertisement image is 800×600 pixels in size, with the billboard area between (100,150) and (200,250), after the above steps, the system will generate a 100×100 segmentation mask for the billboard area and cover it at the corresponding position, thus achieving pixel-level segmentation of the billboard area.
[0161] Billboard area: marked as 1;
[0162] Background area: marked as 0;
[0163] In summary, the above process is repeatedly applied to each target in the image (such as other billboards, displays, etc.) to ensure that each target region is accurately segmented. This detailed process demonstrates how to generate segmentation masks for candidate regions through mask branches, align and combine the masks with the target bounding boxes, thereby achieving accurate segmentation of targets in advertising exhibition images. This process can effectively improve the accuracy of image segmentation, especially when dealing with complex backgrounds and targets, ensuring clear separation between targets and backgrounds.
[0164] In this embodiment, step S3, which marks the difference pixels of the region information according to the pixel difference metric, further includes:
[0165] S31: Based on the preset feature dynamics of the advertising exhibition image, construct the difference threshold for the pixel difference measurement;
[0166] S32: Determine whether the pixel difference measurement exceeds the preset pixel difference threshold;
[0167] S33: If so, then according to the pixel difference metric, mark each pixel that is significantly different from the background, classify the pixels into foreground pixels and background pixels, and dynamically update the current image change of the advertising display image by applying a preset weighted average to the foreground pixels and the background pixels.
[0168] In this embodiment, the system constructs a difference threshold for pixel difference measurement based on pre-defined feature dynamics of the advertising exhibition image. The system then determines whether these pixel difference measurements exceed the difference threshold to execute corresponding steps. For example, if the system determines that the pixel difference measurement does not exceed the difference threshold, it considers the pixels in the current region to be very close to the background model, making it difficult to distinguish the target from the background. The system ignores these regions where the pixel difference measurement does not exceed the difference threshold and does not mark them as foreground targets, avoiding misidentification of the background as a target. It continues to calculate the difference measurement of other regions to ensure more accurate target region identification. Simultaneously, it adjusts the threshold parameter, appropriately lowering the threshold to enhance the ability to identify subtle differences, thereby improving the detection accuracy of foreground targets. Furthermore, it introduces more features, such as motion information, texture information, and color histograms, to further verify whether the region belongs to the foreground target. Conversely, if the system determines that the pixel difference measurement exceeds the difference threshold, it considers the pixels in the current region to be separable from the background model. The system then marks each pixel that is significantly different from the background based on the pixel difference measurement and divides these pixels into... The system categorizes foreground and background pixels and dynamically updates the current image changes of the advertising display image by applying a pre-defined weighted average to the foreground and background pixels. By clearly distinguishing between foreground and background, the system reduces the risk of misidentification. For example, if the color or texture of the advertising content in the image differs significantly from the background, the system can accurately identify the advertising area instead of misjudging the background as the target. Furthermore, when updating foreground and background pixels through weighted averaging, the background model can dynamically adjust as the image changes. This allows the system to cope with dynamic changes in the environment of the advertising display image, such as changes in lighting or movement of background objects, maintaining accurate target identification. Through the classification and weighted averaging of foreground pixels, the system can not only identify the target but also refine the boundaries of the foreground area. The weighted averaging allows the system to smooth the transition between foreground and background, avoiding misjudgments or unclear boundaries caused by abrupt pixel differences. By accurately labeling foreground pixels and dynamically updating the background, the system can reduce unnecessary computation, focusing only on processing the foreground area. This not only improves detection accuracy but also processing speed, making it suitable for real-time or high-frequency updated advertising display systems.
[0169] It should be noted that, based on the pixel difference metric, pixels that are significantly different from the background are marked and classified into foreground pixels and background pixels. A preset weighted average is then applied to the foreground pixels and the background pixels to dynamically update the current image changes of the advertisement display image. A specific example is as follows:
[0170] Suppose there is an advertising display image with a gray wall as the background. The advertising content displayed on the display board is updated regularly. The color of the advertising content may be similar to the color of the background wall, and the display board has different textures and text content.
[0171] Assuming the wall color is light gray and the background texture is stable, in the first few frames, the system analyzes the advertising display image to construct a background model, which includes the wall color and texture. The system extracts each pixel from the advertising display image and calculates the difference between that pixel value and the background model. Assuming a pixel is red, this pixel differs significantly from the light gray background wall, so this pixel will be marked as a "foreground pixel".
[0172] If a pixel is light gray, and this pixel is very close to the gray in the background model, it will be marked as a "background pixel"; marking foreground pixels and background pixels:
[0173] Foreground pixels: Text, images, and other areas that are not part of the background in the advertisement content will be marked as foreground pixels;
[0174] Background pixels: Areas not covered by walls and billboards will be marked as background;
[0175] For example, the red text on the advertising board (such as "Special Offer") is significantly different from the light gray background wall, so the red text area will be marked as a foreground pixel; while the gray border on the advertising board is similar in color to the background wall, so it will be marked as a background pixel.
[0176] Once the background pixels in an image are identified, the system updates the background model using a weighted average. For example, if the gray in the wall area becomes slightly darker in some image frames, the system adjusts the average gray value in the background model based on the background pixels in the new image frames. This weighted average update ensures that the background model can adapt to changes in the environment and avoid misidentification of the background due to changes in lighting or other factors.
[0177] By separating foreground and background pixels, the system can accurately identify target areas in advertising boards. For example, if the red text on the advertising board differs significantly in color from the background wall, the system can accurately identify the red text area. Meanwhile, the pixels in the background wall area remain unchanged, thus maintaining stability.
[0178] Suppose the advertising content on the billboard changes, for example, from "Summer Sale" to "Autumn New Arrivals"; because the background model has been dynamically updated based on previous frames, the foreground pixels of the new advertising content (such as new font color, text style, etc.) can be accurately detected and separated from the background; even if the color of the billboard partially overlaps with the color of the background wall, the system can still accurately identify the new content of the billboard through the updated background model, avoiding misidentifying the advertising content as background; therefore, in advertising exhibitions, the content on the billboard will be changed periodically, for example, from "Summer Promotion" to "Autumn New Arrivals"; although the color of the advertising content and the color of the background wall are somewhat similar, the text, patterns, and other elements on the billboard have unique texture and color characteristics; the system achieves accurate target recognition and segmentation through the following steps:
[0179] By calculating the pixel differences between the advertising content and the background wall, the system identifies the areas of difference between the advertising board and the background wall; the foreground is the content on the advertising board, and the background is the wall and other static areas; as the lighting changes or other minor changes occur, the background model is adjusted by weighted averaging so that the background color and texture can adapt to environmental changes; even if the content on the advertising board changes, the system accurately identifies the new content on the advertising board through the updated background model, ensuring accurate detection of the advertising target.
[0180] In summary, the above example demonstrates how the system can effectively handle the similarity between the foreground and background in advertising exhibition images through dynamic background model updates and accurate foreground detection. This enables accurate target detection and segmentation. Even if the color of the advertising content is similar to the background color, the system can still ensure accurate identification of the advertising content by marking the foreground pixels and updating the background model.
[0181] In this embodiment, the differential pixel points are clustered into connected regions, and step S5, which detects non-adjacent isolated pixel points in the connected regions, further includes:
[0182] S51: Based on the preset neighborhood relationship of the difference pixels, perform neighborhood detection on the pixels in the connected region to verify the connection relationship of the pixels, wherein the neighborhood relationship specifically includes horizontal, vertical and diagonal adjacency;
[0183] S52: Determine whether the connection relationship conforms to the neighborhood relationship;
[0184] S53: If so, then apply a preset structural element to expand the pixel to obtain a foreground pixel that overlaps with the pixel, and dynamically update the foreground area of the advertising exhibition image according to the foreground pixel, wherein the structural element specifically includes square, circle and cross shape.
[0185] In this embodiment, the system performs neighborhood detection on pixels in a connected region based on pre-defined neighborhood relationships for the differing pixels. These neighborhood relationships specifically include horizontal, vertical, and diagonal adjacency. The system verifies the connectivity of these pixels and then determines whether the connectivity conforms to the pre-defined neighborhood relationships to execute corresponding steps. For example, if the system determines that the connectivity of these pixels does not conform to the pre-defined neighborhood relationships, it considers the segmentation of certain targets to be discontinuous, causing some pixels to be incorrectly marked as isolated points. Since these isolated points do not conform to the preset connectivity relationships, the system filters out small regions by setting a minimum region area threshold. If the area of a connected region is less than this threshold... If a pixel does not conform to the neighborhood relationship during connected component detection, it can be treated as noise or an isolated point and removed from the target region. Alternatively, it can be merged into a neighboring region. The target boundary can be readjusted through recursive search or graph cut algorithms (such as image segmentation methods) to correct erroneous segmentation. Furthermore, by fusing multiple detection methods (such as color, texture, and shape features) and comprehensively considering the connectivity relationships of different features, the system can effectively identify which are targets and which are background, avoiding misidentifying background noise as foreground. For example, when the system determines that the connectivity relationships of these pixels conform to pre-defined neighborhood relationships, the system... The system assumes that pixels are continuous and interconnected, with no isolated points. It then expands these pixels using pre-defined structural elements, including squares, circles, and intersections, to obtain foreground pixels that overlap with them. The foreground region of the advertisement image is dynamically updated based on these overlapping foreground pixels. By determining that the pixel connections conform to preset neighborhood rules, the system can identify the continuity of the target region. This means that the foreground target in the image is spatially continuous and will not be mis-segmented or broken due to noise or isolated points. This processing ensures that the target region completely covers the advertisement content, avoiding erroneous target separation and loss. Simultaneously, the expansion operation... By expanding the foreground pixels to adjacent pixel areas, the edges of the target area become more defined. This is especially important for complex backgrounds in images, as complex backgrounds may contain textures, patterns, or colors similar to the target area, which may be misidentified as foreground. Different structural elements (square, circle, cross) are suitable for different image features. For example, the square structural element is suitable for regular rectangular or square targets, the circle structural element is suitable for circular targets, and the cross structural element is suitable for complex target shapes or areas with irregular edges. By flexibly applying different structural elements, the system can dynamically adjust the dilation strategy according to the shape and characteristics of the target to ensure accurate segmentation of the target area.
[0186] It should be noted that the pixel is expanded by applying a preset structuring element to obtain a foreground pixel that overlaps with the pixel. The foreground region of the advertisement display image is then dynamically updated based on the foreground pixel. A specific example is as follows:
[0187] Suppose we have an advertising display image with a city street scene background and a large billboard containing multiple texts, icons, and product images. The billboard's color and some areas of the background may be similar, and the boundaries of the advertising content are not always clearly visible. Therefore, object detection algorithms may encounter difficulties and fail to perfectly segment the target area and the background. To solve this problem, the system applies a dilation operation to enhance the clarity of the foreground area.
[0188] The image shows a billboard advertising "Buy One Get One Free" along with a product icon. The background is a city street scene, with some streets in colors similar to the billboard. A shadow falls on the top of the billboard, making the boundaries of the text and icon less clear. Using a convolutional neural network (CNN), the system identified the billboard area. The initially identified target area included the text and icon, but due to the shadow and similar background colors, the edges of some text and icons were not clearly defined.
[0189] First, a dilation operation is performed. Assume the system uses a square structuring element, 3x3 in size (a 3x3 matrix). This structuring element is applied to every pixel in the billboard area. Within the billboard area, the square structuring element scans the entire foreground region. Whenever the structuring element overlaps with a pixel, that pixel and its neighboring pixels are marked as foreground pixels. This means that if a pixel is part of the billboard, and its surrounding pixels are background or occluded (e.g., in shadow), the dilation operation "expands" that pixel into the surrounding area. Through this expansion, the billboard's boundaries are smoothly and significantly widened, filling any gaps.
[0190] The dilation operation fills in any small gaps that might otherwise exist; for example, if the end of the billboard text is not detected completely due to shadows or color transitions, the dilation operation will expand its edges to ensure that the end of the text is included in the foreground area; the pixel area around the icon is also expanded to ensure that the icon is not misjudged as the background because its background color is similar to it.
[0191] Then, the foreground pixels that overlap with the original pixels are obtained. After the dilation operation is completed, the boundaries of the billboard are smoother, and the areas of the advertising text and icons become more complete. After dilation, the area that overlaps with the original foreground pixels is considered to be the newly added foreground area. At this time, the icons, text and other elements in the billboard are redefined as part of the foreground area.
[0192] The expanded foreground area covers more pixels, making the advertisement content stand out more; these newly added foreground pixels can help the system accurately distinguish the advertisement content from the background in subsequent processing, especially in the image segmentation stage.
[0193] The system then dynamically updates the foreground region of the advertising display image. After inflation, the foreground region of the advertising display image is dynamically updated; the previously incomplete billboard boundaries are now "filled," ensuring clearer boundaries between advertising text, icons, and the background; that is, the foreground region of the billboard becomes more coherent and the boundaries are clearer, ensuring that every detail of the advertising content is accurately extracted; for example, the text "buy one get one free" becomes more complete after inflation, the details of the advertising icon are not disturbed by the background, and the influence of the shadow is reduced; in subsequent image segmentation, the system can more easily extract the advertising content from the background and avoid misidentification.
[0194] In summary, by applying dilation to the billboard area, the foreground region in the image is expanded and enhanced, especially in areas with blurred boundaries or those interfered with by shadows or backgrounds of similar colors. The dilation operation ensures that all parts of the billboard (text, icons, and images) can be accurately extracted, avoiding confusion between the background and the advertising content, and improving the accuracy of subsequent object detection and image processing. The dynamically updated foreground region makes the advertising content clearer and more prominent in the image, contributing to more efficient advertising recognition and display.
[0195] In this embodiment, step S2, which determines whether the image data detects a preset color overlap, further includes:
[0196] S21: Extract the color features of each pixel from the image data, compare the color features with a preset target color range, and calculate the color overlap of each pixel;
[0197] S22: Determine whether the color overlap reaches a preset threshold;
[0198] S23: If so, identify the foreground pixel corresponding to the color overlap, and mark the corresponding foreground region from the image data based on the foreground pixel.
[0199] In this embodiment, the system extracts the color features of each pixel from the image data, compares these color features with a pre-defined target color range to calculate the color overlap of each pixel, and then determines whether the color overlap reaches a pre-defined threshold to execute corresponding steps. For example, when the system determines that the color features of each pixel do not reach the pre-defined threshold, the system considers that these pixels in the image have a large difference from the predetermined target color range, which may indicate that these pixels belong to the background or do not conform to the target color features. The system will further check other features (such as texture, shape, etc.), combine edge detection, shape analysis and other features to confirm the shape and boundary of the target, apply other types of feature matching or background modeling to the region where the pixel is located, and re-segment or recalibrate the target detection model of the entire region to gradually converge to a more suitable target region. The color range is appropriately widened or the threshold is adjusted to adjust the target color range and increase the threshold to include more pixels that may belong to the target region. For example, when the system determines that the color features of each pixel reach the pre-defined threshold, the system will consider... These pixels in the image are almost identical to the predetermined target color. The system identifies foreground pixels with low concentrations of these colors and marks the corresponding foreground regions from the image data based on these foreground pixels. By comparing color features, the system can accurately identify foreground regions in the image that match the target color. For example, if a part of an advertising image is a preset red area and the color features of that area match the threshold, the system will identify these pixels as foreground. This precise color matching helps to efficiently locate the target area and avoids interference from irrelevant backgrounds. At the same time, through strict color threshold restrictions, the system can reduce the probability of misidentification. Only when the color of a pixel matches the characteristics of the target color will it be marked as a foreground pixel. This effectively avoids confusion with the background or other irrelevant objects, ensuring that the target area is accurately segmented. Based on the identification of foreground pixels, the system can effectively delineate the target area and further perform pixel-level segmentation. This means that the target (such as advertising slogans, products, or specific elements) in the advertising exhibition image can be accurately extracted, providing accurate basic data for subsequent analysis or processing (such as content recognition, target tracking, etc.).
[0200] In this embodiment, step S4, which determines whether the neighborhood information of the differing pixels can be continuously matched, further includes:
[0201] S41: Based on the pre-divided local regions of the advertising exhibition image, calculate the mean and variance of the difference pixels;
[0202] S42: Determine whether the mean and variance have detected preset fluctuations;
[0203] S43: If so, the corresponding noise features are identified from the difference pixels, the difference threshold is dynamically adjusted according to the noise features, and the falsely detected noise regions are removed according to the difference threshold. The noise features specifically include Gaussian noise, salt-and-pepper noise, and speckle noise.
[0204] In this embodiment, the system calculates the mean and variance of the difference pixels based on pre-defined local regions of the advertising exhibition image. It then determines whether the mean and variance detect a pre-defined fluctuation to execute corresponding steps. For example, if the system determines that the mean and variance of the difference pixels do not detect a pre-defined fluctuation, it considers these difference pixels to be free of noise. The system continues to monitor other potentially changing regions. By expanding the detection range, the system can detect changes in other regions, ensuring complete foreground target detection. Simultaneously, these stable regions are treated as background regions, ignoring their influence on foreground detection and avoiding invalid calculations, thus improving efficiency. This is because the system does not need to repeatedly process background regions. Furthermore, although the difference pixels in this region do not show significant fluctuations, the system can still further verify the presence of foreground targets in the region using other features (such as shape, texture, and edges). If necessary, the detection of foreground targets can be enhanced. For example, if the system determines that the mean and variance of the difference pixels detect a pre-defined fluctuation, it considers these difference pixels to be free of noise. The system identifies corresponding noise features from these difference pixels, specifically including Gaussian noise. The system dynamically adjusts the difference threshold based on different noise characteristics, including Gaussian noise, salt-and-pepper noise, and speckle noise, and removes falsely detected noise regions accordingly. By identifying and removing noise regions, the system effectively eliminates the impact of Gaussian noise, salt-and-pepper noise, and speckle noise on foreground detection, helping to improve the accuracy of image segmentation and avoid misclassifying noise as foreground targets or incorrect background regions. Furthermore, by dynamically adjusting the difference threshold according to different noise characteristics, the system can more accurately adapt to different types of noise. For areas with strong noise, the system can appropriately relax the threshold to reduce the possibility of noise being misclassified as foreground, while for clearer areas, the system can strictly enforce the threshold limit to ensure more accurate foreground detection. After noise processing, the distinction between background and foreground in the image becomes clearer, and the system can more accurately identify foreground target regions, avoiding false detections or missed detections. Especially in complex advertising and exhibition images, noise can easily affect the accurate identification of targets. Timely noise removal helps accurate target segmentation better cope with dynamically changing environments or other external interferences, improving robustness. Even if the image contains a certain degree of noise, the system can still accurately extract the target region and dynamically adjust the strategy to ensure efficient and stable target detection and segmentation.
[0205] It should be noted that the mean and variance of the differing pixels are calculated based on the pre-divided local regions of the advertising exhibition image, as shown in the following example:
[0206] Suppose there is an advertising display image containing multiple billboards, passersby, and a background; the billboards have different colors from the background. The goal of the system is to identify the difference between the billboards (foreground targets) and the background by calculating the pixel differences in each local region of the image.
[0207] Assume the image resolution is 500x500 pixels, and we divide it into a 10x10 grid, with each local region being 50x50 pixels in size;
[0208] First, the image is divided into regions. The 500x500 image is divided into 10 rows and 10 columns, resulting in 100 local regions. Each local region is 50x50 pixels in size. For example, the pixel position of the first local region is (0:50, 0:50), the position of the second region is (50:100, 0:50), and so on.
[0209] Assuming a background model has been predefined, this model represents the background using an average background color value; the background color may be light blue or gray, depending on the actual color of the image background.
[0210] Then, the differences between the differing pixels are calculated. For each local region, the difference between each pixel and the background model is calculated. Assume that in a certain local region, the background is gray, while the billboard in that region is reddish. Assume the image color values are based on the RGB model, with each pixel's RGB value ranging from 0 to 255. For example, in a 50x50 local region, some pixels' RGB values are as follows:
[0211] Background pixels (gray background): (128, 128, 128)
[0212] Advertising board pixels (foreground): (200, 50, 50)
[0213] For each pixel, the difference metric can be obtained by calculating its Euclidean distance to the background model; for example, for (200,50,50) and (128,128,128), the difference of that pixel can be calculated:
[0214]
[0215] The result was a difference measure of approximately 160.85.
[0216] Calculate the mean and variance. Within this local region, calculate the mean and variance of all differing pixels. Assuming this region contains 50x50=2500 pixels, after calculating the difference measure, we obtain an array of difference values for all pixels in this region (example section):
[0217] Difference measure = [160.85, 150.12, 140.60, ..., 180.45, 155.60, 145.25]
[0218] Calculate the mean (average difference):
[0219]
[0220] Assume the calculated mean is 160;
[0221] Calculate the variance (the degree of dispersion of the variance values):
[0222]
[0223] Assume the calculated variance is variance = 4000;
[0224] The system then assesses fluctuations. Assuming the preset threshold is: when the mean is greater than 100 and the variance is greater than 1000, the area is considered to have a large difference from the background, meaning that the area may contain foreground objects. In this example, the mean is 160 and the variance is 4000, both of which exceed the threshold. Therefore, the system considers the local area to be a foreground area, which may contain billboards.
[0225] Finally, the system marks this local region as the foreground region and further processes it, such as performing object detection or segmentation; if the mean and variance of other regions are small, they may be considered as background regions.
[0226] In summary, through the above steps, the system can calculate the mean and variance based on the pixel differences in local areas, assess whether the area is significantly different from the background, and determine whether the area may be a foreground target area by setting a threshold. Furthermore, it can process the target and background in the advertising exhibition image to achieve automated target detection and segmentation.
[0227] In this embodiment, step S1, which identifies corresponding image data from pre-uploaded advertising display images, further includes:
[0228] S11: Apply a preset target detection algorithm to identify the target object category in the advertising exhibition image, wherein the target object category specifically includes products, text, and brand logos;
[0229] S12: Determine whether the target object category has preset advertising elements, wherein the advertising elements specifically include pattern, background and texture features;
[0230] S13: If so, then based on the advertising element, the target object category is matched to the preset advertising theme, and the advertising display image is divided into the corresponding advertising category according to the advertising theme. The advertising theme specifically includes company logo, brand identity and product icon, and the advertising category specifically includes product advertisement, promotional advertisement and brand advertisement.
[0231] In this embodiment, the system applies a pre-defined target detection algorithm to identify target object categories in advertising display images. Target object categories specifically include products, text, and brand logos. The system then determines whether these target object categories possess pre-defined advertising elements, which specifically include patterns, backgrounds, and texture features, and executes corresponding steps accordingly. For example, when the system determines that a target object category in an advertising display image does not possess pre-defined advertising elements, the system considers the target object to have low relevance to the advertisement or not be a key component of the advertisement. The system removes these target objects from the advertisement detection results without further advertising element analysis to avoid affecting the accuracy of subsequent advertisement content recognition. Simultaneously, the system further processes occluded parts in the image, attempting to complete missing advertising element information through image restoration and image filling techniques, thereby improving the accuracy of advertising element recognition. Furthermore, the system re-examines the classification rules and model training data of the target detection algorithm, potentially requiring algorithm optimization and adjustment of target object classification accuracy to reduce misidentification. For example, when the system determines that a target object category in an advertising display image possesses pre-defined advertising elements, this... The system will determine if the target object is highly relevant to the advertisement. Based on these advertising elements, the system will match the target object category to a pre-defined advertising theme. The advertising theme specifically includes company logos, brand identifiers, and product icons. Based on different advertising themes, the system categorizes the displayed images into corresponding advertising categories, including product advertisements, promotional advertisements, and brand advertisements. By accurately identifying advertising elements, the system can better understand the advertising content in the image, avoiding misidentification of non-advertising elements as advertisements. Advertising elements act as strong identifying markers, helping the system distinguish between advertising and non-advertising areas, ensuring the accuracy of target object identification. Furthermore, by matching advertising elements to advertising themes, the system can classify advertisements more meticulously. Advertisements can be subdivided into different categories, such as product advertisements, promotional advertisements, and brand advertisements. This not only identifies the advertising content but also understands the purpose and type of the advertisement. Furthermore, classifying the displayed images according to advertising categories (such as product advertisements, promotional advertisements, and brand advertisements) provides accurate classification data for subsequent advertising effectiveness analysis, trend analysis, and consumer response analysis. This hierarchical advertising analysis provides the foundational data for evaluating advertising effectiveness.
[0232] Reference Appendix Figure 2 A target object recognition and replacement system for advertising exhibition images according to one embodiment of the present invention includes:
[0233] The recognition module 10 is used to identify corresponding image data from the pre-uploaded advertising exhibition image, wherein the image data specifically includes foreground target data and background data;
[0234] The judgment module 20 is used to determine whether the image data detects a preset color overlap;
[0235] The execution module 30 is configured to, if so, segment the advertising display image, divide the corresponding region information in the image data, calculate the pixel difference measure between the pixel value of the current image frame and the preset background model from the region information, and mark the difference pixels of the region information according to the pixel difference measure, wherein the region information specifically includes the target region and the background region.
[0236] The second judgment module 40 is used to determine whether the neighborhood information of the difference pixels can be continuously matched.
[0237] The second execution module 50 is used to, if not, cluster the difference pixels into connected regions, detect non-adjacent isolated pixels in the connected regions, identify pseudo foreground regions in the connected regions based on the isolated pixels, and remove the areas to be filtered in the pseudo foreground regions whose area value is less than a preset number of pixels.
[0238] In this embodiment, the recognition module 10 identifies corresponding image data from pre-uploaded advertising exhibition images. The image data specifically includes foreground target data and background data. Then, the judgment module 20 determines whether these image data detects a pre-defined color overlap, and executes corresponding steps accordingly. For example, if the system determines that no pre-defined color overlap is detected in the image data, the system considers that the color distribution between the foreground target and the background in the image has no significant similarity, and the target and background can be clearly distinguished. The system will directly perform target recognition and target region extraction without complex color overlap processing, and can rely more heavily on other features for target identification. Target extraction, such as shape, structure, and location, is further optimized through image segmentation, edge detection, and morphological operations. Simple thresholding, region growing, or connected component detection methods can be used to directly extract foreground target regions from the image without the need for complex color matching or overlap detection techniques. This allows for rapid identification and separation of target regions, enabling further target analysis or feature extraction. For example, when the system detects pre-defined color overlap in the image data, the execution module 30 considers a significant similarity in color distribution between the foreground target and the background. The system then segments the advertising exhibition image, dividing the image data into corresponding regions. The information specifically includes target and background regions. From this region information, a pixel difference metric is calculated between the pixel values of the current image frame and a pre-defined background model. Based on different pixel difference metrics, the system marks the differing pixels in the region information. By calculating the difference metric between each pixel value in the image data and the pre-defined background model, the system can further quantify the difference between the target and the background. This process helps to identify the target region more accurately, even if there is color overlap between the target and the background, by measuring the difference. This is especially helpful when the background and target colors are similar. Furthermore, marking the differing pixels helps the system accurately extract the target region, particularly when the background and target colors are similar. Pixels serve as the boundary between the target and the background, accurately distinguishing between foreground targets and background. By marking difference pixels, the system can filter out noise or irrelevant areas with similar background colors, reducing false detections. Furthermore, in cases of color overlap, the system relies on calculating the differences between pixels and the background model to distinguish the differences between the target area and the background in detail, overcoming the limitations of traditional simple color-matching methods. Through these meticulous steps, the system can not only identify the background area but also accurately locate the target, ensuring the accuracy of target detection even when the background and target colors are similar. Then, the second judgment module 40 determines whether the neighborhood information of the difference pixels can be continuously matched to execute the corresponding steps.For example, when the system determines that the neighborhood information of the differing pixels can be continuously matched, the system considers the differing pixels in the image to form a coherent and continuous region. This region usually represents a foreground target, rather than noise or isolated points in the background. The system will label these continuous regions as a foreground target region. This step is crucial for target recognition and extraction. Through connected component analysis, these differing pixels are clustered into connected regions, which can more accurately delineate the boundary of the target region, further improving the accuracy of target recognition. Simultaneously, target tracking is performed. The system can track these continuous regions across multiple image frames, maintaining target recognition. This step is particularly important in video surveillance or real-time advertising displays, and deeper analysis is performed, such as target size analysis, shape analysis, and color analysis, to further extract the target's feature information. This is very valuable for applications such as advertising display and target monitoring. Conversely, when the system determines that the neighborhood information of the differing pixels cannot be continuously matched, the second execution module 50 will consider the differing pixels in the image to be discontinuous, possibly belonging to noise or isolated points in the background. The system will cluster these differing pixels into various connected regions. The system detects isolated, non-adjacent pixels and identifies pseudo-foreground regions within connected regions based on these isolated pixels. It then removes areas within these pseudo-foreground regions whose area is smaller than a pre-defined number of pixels. By clustering these dissimilar pixels into connected regions, the system further identifies pseudo-foreground regions (such as isolated small areas). This effectively removes meaningless noise, ensuring the remaining target area is unaffected by noise. This step avoids false and missed detections, improving the accuracy of target detection. Furthermore, through clustering and removing small pseudo-foreground regions, the system maintains strong robustness even in noisy environments. Even when the target area overlaps with or is similar to the background, the system can still accurately separate and identify the target, reducing background interference and improving image processing stability. By clustering connected regions and removing isolated noise pixels, the system can extract the target area more accurately. This step, by eliminating irrelevant small areas and noise, ensures that only coherent target areas are retained, contributing to improved accuracy in target recognition and segmentation. Accurate target area identification provides higher-quality input data for subsequent analyses (such as target classification, tracking, and segmentation).
[0239] In this embodiment, it also includes:
[0240] The extraction module is used to extract the hierarchical features of the advertising exhibition image by applying a preset convolutional neural network, and generate corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color;
[0241] The third judgment module is used to determine whether the candidate region matches the preset region category, wherein the region category specifically includes the target's category label and location;
[0242] The third execution module is used to construct a segmentation mask corresponding to the candidate region through a preset mask branch if the condition is met, align the segmentation mask with the preset target bounding box of the advertising exhibition image, combine the target bounding box with the segmentation mask, and divide each target object in the advertising exhibition image into pixel-level segments based on the alignment result and the combination result.
[0243] In this embodiment, the system uses a pre-defined convolutional neural network to extract hierarchical features from the advertising display image. These hierarchical features specifically include shape, texture, and color. Based on these features, corresponding candidate regions are generated. The system then determines whether these candidate regions match a pre-defined region category, which includes the target's category label and location, to execute corresponding steps. For example, if the system determines that a candidate region generated from the hierarchical features does not match a pre-defined region category, the system considers the candidate region to not contain the target, or the contained target does not match the expected category. The system then adjusts the output threshold of the convolutional neural network and improves the quality of the candidate regions through an optimization algorithm, using more... To enhance the robustness of target features, features such as multi-scale features or adaptive convolutional networks commonly used in deep learning are employed. Non-maximum suppression methods are used to remove redundant or overlapping candidate regions, ensuring that each candidate region corresponds to only one target category. Multi-task learning is introduced, combining location regression and category recognition tasks to improve the model's accuracy in location and category matching. Furthermore, if the model cannot effectively match category labels under specific environments or conditions (such as uneven lighting or angle changes), the adaptability to diverse targets can be enhanced by increasing the training dataset under different environmental conditions. For example, when the system determines that the candidate region generated by the hierarchical features matches a pre-defined region category, then… The system considers the candidate region to be compatible with expectations. It then constructs a segmentation mask corresponding to the candidate region using pre-defined mask branches. This segmentation mask is aligned with the pre-defined target bounding box of the advertising image, and the target bounding box is combined with the segmentation mask. Based on the alignment and combination results, pixel-level segmentation of each target object in the advertising image is achieved. By aligning the generated candidate region with the target bounding box and combining it with the segmentation mask, the system can achieve pixel-level target segmentation. This means that the target can not only be accurately identified but also its shape and boundary in the image can be precisely determined, ensuring more refined and accurate separation between the target object and the background. Furthermore, the combination of the segmentation mask and the target bounding box... This helps refine the classification results of candidate regions. By aligning the segmentation mask with the target bounding box, the system can further refine the position and shape of the target, optimize the detection results, and thus provide more accurate classification and positioning information. Furthermore, by generating a segmentation mask based on a pre-defined mask branch and aligning it with the target bounding box, the system can perform target segmentation quickly and accurately. This not only improves segmentation accuracy but also reduces redundant calculations, giving the system better real-time performance. By refining the pixel-level segmentation of the target, the system can not only perform static target recognition but also provide accurate data support for subsequent target tracking. In the real-time display of advertising exhibitions, accurate target segmentation can effectively help track and analyze the behavior and changes of the target.
[0244] In this embodiment, the execution module further includes:
[0245] The construction unit is used to construct the difference threshold of the pixel difference measurement based on the preset feature dynamics of the advertising exhibition image;
[0246] The judgment unit is used to determine whether the pixel difference measurement exceeds the preset pixel difference threshold;
[0247] The execution unit is configured to, if so, mark each pixel that is significantly different from the background according to the pixel difference metric, classify the pixels into foreground pixels and background pixels, and dynamically update the current image change of the advertisement display image by applying a preset weighted average to the foreground pixels and the background pixels.
[0248] In this embodiment, the system constructs a difference threshold for pixel difference measurement based on pre-defined feature dynamics of the advertising exhibition image. The system then determines whether these pixel difference measurements exceed the difference threshold to execute corresponding steps. For example, if the system determines that the pixel difference measurement does not exceed the difference threshold, it considers the pixels in the current region to be very close to the background model, making it difficult to distinguish the target from the background. The system ignores these regions where the pixel difference measurement does not exceed the difference threshold and does not mark them as foreground targets, avoiding misidentification of the background as a target. It continues to calculate the difference measurement of other regions to ensure more accurate target region identification. Simultaneously, it adjusts the threshold parameter, appropriately lowering the threshold to enhance the ability to identify subtle differences, thereby improving the detection accuracy of foreground targets. Furthermore, it introduces more features, such as motion information, texture information, and color histograms, to further verify whether the region belongs to the foreground target. Conversely, if the system determines that the pixel difference measurement exceeds the difference threshold, it considers the pixels in the current region to be separable from the background model. The system then marks each pixel that is significantly different from the background based on the pixel difference measurement and divides these pixels into... The system categorizes foreground and background pixels and dynamically updates the current image changes of the advertising display image by applying a pre-defined weighted average to the foreground and background pixels. By clearly distinguishing between foreground and background, the system reduces the risk of misidentification. For example, if the color or texture of the advertising content in the image differs significantly from the background, the system can accurately identify the advertising area instead of misjudging the background as the target. Furthermore, when updating foreground and background pixels through weighted averaging, the background model can dynamically adjust as the image changes. This allows the system to cope with dynamic changes in the environment of the advertising display image, such as changes in lighting or movement of background objects, maintaining accurate target identification. Through the classification and weighted averaging of foreground pixels, the system can not only identify the target but also refine the boundaries of the foreground area. The weighted averaging allows the system to smooth the transition between foreground and background, avoiding misjudgments or unclear boundaries caused by abrupt pixel differences. By accurately labeling foreground pixels and dynamically updating the background, the system can reduce unnecessary computation, focusing only on processing the foreground area. This not only improves detection accuracy but also processing speed, making it suitable for real-time or high-frequency updated advertising display systems.
[0249] In this embodiment, the second execution module further includes:
[0250] The verification unit is used to perform neighborhood detection on pixels in the connected region based on the preset neighborhood relationship of the difference pixels, and to verify the connection relationship of the pixels, wherein the neighborhood relationship specifically includes horizontal, vertical and diagonal adjacency;
[0251] The second judgment unit is used to determine whether the connection relationship conforms to the neighborhood relationship;
[0252] The second execution unit is configured to, if so, apply a preset structuring element to expand the pixel to obtain a foreground pixel overlapping the pixel, and dynamically update the foreground region of the advertising exhibition image based on the foreground pixel, wherein the structuring element specifically includes square, circle and cross shapes.
[0253] In this embodiment, the system performs neighborhood detection on pixels in a connected region based on pre-defined neighborhood relationships for the differing pixels. These neighborhood relationships specifically include horizontal, vertical, and diagonal adjacency. The system verifies the connectivity of these pixels and then determines whether the connectivity conforms to the pre-defined neighborhood relationships to execute corresponding steps. For example, if the system determines that the connectivity of these pixels does not conform to the pre-defined neighborhood relationships, it considers the segmentation of certain targets to be discontinuous, causing some pixels to be incorrectly marked as isolated points. Since these isolated points do not conform to the preset connectivity relationships, the system filters out small regions by setting a minimum region area threshold. If the area of a connected region is less than this threshold... If a pixel does not conform to the neighborhood relationship during connected component detection, it can be treated as noise or an isolated point and removed from the target region. Alternatively, it can be merged into a neighboring region. The target boundary can be readjusted through recursive search or graph cut algorithms (such as image segmentation methods) to correct erroneous segmentation. Furthermore, by fusing multiple detection methods (such as color, texture, and shape features) and comprehensively considering the connectivity relationships of different features, the system can effectively identify which are targets and which are background, avoiding misidentifying background noise as foreground. For example, when the system determines that the connectivity relationships of these pixels conform to pre-defined neighborhood relationships, the system... The system assumes that pixels are continuous and interconnected, with no isolated points. It then expands these pixels using pre-defined structural elements, including squares, circles, and intersections, to obtain foreground pixels that overlap with them. The foreground region of the advertisement image is dynamically updated based on these overlapping foreground pixels. By determining that the pixel connections conform to preset neighborhood rules, the system can identify the continuity of the target region. This means that the foreground target in the image is spatially continuous and will not be mis-segmented or broken due to noise or isolated points. This processing ensures that the target region completely covers the advertisement content, avoiding erroneous target separation and loss. Simultaneously, the expansion operation... By expanding the foreground pixels to adjacent pixel areas, the edges of the target area become more defined. This is especially important for complex backgrounds in images, as complex backgrounds may contain textures, patterns, or colors similar to the target area, which may be misidentified as foreground. Different structural elements (square, circle, cross) are suitable for different image features. For example, the square structural element is suitable for regular rectangular or square targets, the circle structural element is suitable for circular targets, and the cross structural element is suitable for complex target shapes or areas with irregular edges. By flexibly applying different structural elements, the system can dynamically adjust the dilation strategy according to the shape and characteristics of the target to ensure accurate segmentation of the target area.
[0254] In this embodiment, the determination module further includes:
[0255] The calculation unit is used to extract the color features of each pixel from the image data, compare the color features with a preset target color range, and calculate the color overlap of each pixel.
[0256] The third judgment unit is used to determine whether the color overlap reaches a preset threshold.
[0257] The third execution unit is used to identify the foreground pixel corresponding to the color overlap if the color overlap is true, and mark the corresponding foreground region from the image data based on the foreground pixel.
[0258] In this embodiment, the system extracts the color features of each pixel from the image data, compares these color features with a pre-defined target color range to calculate the color overlap of each pixel, and then determines whether the color overlap reaches a pre-defined threshold to execute corresponding steps. For example, when the system determines that the color features of each pixel do not reach the pre-defined threshold, the system considers that these pixels in the image have a large difference from the predetermined target color range, which may indicate that these pixels belong to the background or do not conform to the target color features. The system will further check other features (such as texture, shape, etc.), combine edge detection, shape analysis and other features to confirm the shape and boundary of the target, apply other types of feature matching or background modeling to the region where the pixel is located, and re-segment or recalibrate the target detection model of the entire region to gradually converge to a more suitable target region. The color range is appropriately widened or the threshold is adjusted to adjust the target color range and increase the threshold to include more pixels that may belong to the target region. For example, when the system determines that the color features of each pixel reach the pre-defined threshold, the system will consider... These pixels in the image are almost identical to the predetermined target color. The system identifies foreground pixels with low concentrations of these colors and marks the corresponding foreground regions from the image data based on these foreground pixels. By comparing color features, the system can accurately identify foreground regions in the image that match the target color. For example, if a part of an advertising image is a preset red area and the color features of that area match the threshold, the system will identify these pixels as foreground. This precise color matching helps to efficiently locate the target area and avoids interference from irrelevant backgrounds. At the same time, through strict color threshold restrictions, the system can reduce the probability of misidentification. Only when the color of a pixel matches the characteristics of the target color will it be marked as a foreground pixel. This effectively avoids confusion with the background or other irrelevant objects, ensuring that the target area is accurately segmented. Based on the identification of foreground pixels, the system can effectively delineate the target area and further perform pixel-level segmentation. This means that the target (such as advertising slogans, products, or specific elements) in the advertising exhibition image can be accurately extracted, providing accurate basic data for subsequent analysis or processing (such as content recognition, target tracking, etc.).
[0259] In this embodiment, the second determination module further includes:
[0260] The second calculation unit is used to calculate the mean and variance of the difference pixels based on the pre-divided local regions of the advertising exhibition image;
[0261] The fourth judgment unit is used to determine whether the mean and the variance have detected preset fluctuations;
[0262] The fourth execution unit is configured to, if so, identify the corresponding noise features from the difference pixels, dynamically adjust the difference threshold according to the noise features, and remove falsely detected noise regions based on the difference threshold. Specifically, the noise features include Gaussian noise, salt-and-pepper noise, and speckle noise.
[0263] In this embodiment, the system calculates the mean and variance of the difference pixels based on pre-defined local regions of the advertising exhibition image. It then determines whether the mean and variance detect a pre-defined fluctuation to execute corresponding steps. For example, if the system determines that the mean and variance of the difference pixels do not detect a pre-defined fluctuation, it considers these difference pixels to be free of noise. The system continues to monitor other potentially changing regions. By expanding the detection range, the system can detect changes in other regions, ensuring complete foreground target detection. Simultaneously, these stable regions are treated as background regions, ignoring their influence on foreground detection and avoiding invalid calculations, thus improving efficiency. This is because the system does not need to repeatedly process background regions. Furthermore, although the difference pixels in this region do not show significant fluctuations, the system can still further verify the presence of foreground targets in the region using other features (such as shape, texture, and edges). If necessary, the detection of foreground targets can be enhanced. For example, if the system determines that the mean and variance of the difference pixels detect a pre-defined fluctuation, it considers these difference pixels to be free of noise. The system identifies corresponding noise features from these difference pixels, specifically including Gaussian noise. The system dynamically adjusts the difference threshold based on different noise characteristics, including Gaussian noise, salt-and-pepper noise, and speckle noise, and removes falsely detected noise regions accordingly. By identifying and removing noise regions, the system effectively eliminates the impact of Gaussian noise, salt-and-pepper noise, and speckle noise on foreground detection, helping to improve the accuracy of image segmentation and avoid misclassifying noise as foreground targets or incorrect background regions. Furthermore, by dynamically adjusting the difference threshold according to different noise characteristics, the system can more accurately adapt to different types of noise. For areas with strong noise, the system can appropriately relax the threshold to reduce the possibility of noise being misclassified as foreground, while for clearer areas, the system can strictly enforce the threshold limit to ensure more accurate foreground detection. After noise processing, the distinction between background and foreground in the image becomes clearer, and the system can more accurately identify foreground target regions, avoiding false detections or missed detections. Especially in complex advertising and exhibition images, noise can easily affect the accurate identification of targets. Timely noise removal helps accurate target segmentation better cope with dynamically changing environments or other external interferences, improving robustness. Even if the image contains a certain degree of noise, the system can still accurately extract the target region and dynamically adjust the strategy to ensure efficient and stable target detection and segmentation.
[0264] In this embodiment, the identification module further includes:
[0265] The recognition unit is used to apply a preset target detection algorithm to identify the target object category in the advertising exhibition image, wherein the target object category specifically includes products, text and brand logos;
[0266] The fifth judgment unit is used to determine whether the target object category has preset advertising elements, wherein the advertising elements specifically include pattern, background and texture features;
[0267] The fifth execution unit is configured to, if so, match the target object category to a preset advertising theme based on the advertising element, and classify the advertising display image into a corresponding advertising category according to the advertising theme. Specifically, the advertising theme includes a company logo, brand identity, and product icon, and the advertising category includes product advertising, promotional advertising, and brand advertising.
[0268] In this embodiment, the system applies a pre-defined target detection algorithm to identify target object categories in advertising display images. Target object categories specifically include products, text, and brand logos. The system then determines whether these target object categories possess pre-defined advertising elements, which specifically include patterns, backgrounds, and texture features, and executes corresponding steps accordingly. For example, when the system determines that a target object category in an advertising display image does not possess pre-defined advertising elements, the system considers the target object to have low relevance to the advertisement or not be a key component of the advertisement. The system removes these target objects from the advertisement detection results without further advertising element analysis to avoid affecting the accuracy of subsequent advertisement content recognition. Simultaneously, the system further processes occluded parts in the image, attempting to complete missing advertising element information through image restoration and image filling techniques, thereby improving the accuracy of advertising element recognition. Furthermore, the system re-examines the classification rules and model training data of the target detection algorithm, potentially requiring algorithm optimization and adjustment of target object classification accuracy to reduce misidentification. For example, when the system determines that a target object category in an advertising display image possesses pre-defined advertising elements, this... The system will determine if the target object is highly relevant to the advertisement. Based on these advertising elements, the system will match the target object category to a pre-defined advertising theme. The advertising theme specifically includes company logos, brand identifiers, and product icons. Based on different advertising themes, the system categorizes the displayed images into corresponding advertising categories, including product advertisements, promotional advertisements, and brand advertisements. By accurately identifying advertising elements, the system can better understand the advertising content in the image, avoiding misidentification of non-advertising elements as advertisements. Advertising elements act as strong identifying markers, helping the system distinguish between advertising and non-advertising areas, ensuring the accuracy of target object identification. Furthermore, by matching advertising elements to advertising themes, the system can classify advertisements more meticulously. Advertisements can be subdivided into different categories, such as product advertisements, promotional advertisements, and brand advertisements. This not only identifies the advertising content but also understands the purpose and type of the advertisement. Furthermore, classifying the displayed images according to advertising categories (such as product advertisements, promotional advertisements, and brand advertisements) provides accurate classification data for subsequent advertising effectiveness analysis, trend analysis, and consumer response analysis. This hierarchical advertising analysis provides the foundational data for evaluating advertising effectiveness.
[0269] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An object recognition and replacement method for advertising display images, characterized by, The method comprises the following steps: Based on the pre-uploaded advertising exhibition image, the corresponding image data is identified from the advertising exhibition image, wherein the image data specifically comprises foreground target data and background data; Determine whether the image data detects a preset color overlap, wherein the color overlap is specifically the color overlap degree of each pixel; If yes, the advertising exhibition image is segmented, the corresponding region information is divided in the image data, the pixel difference degree of the pixel points of the current image frame and the preset background model is calculated from the region information, and the difference pixel points of the region information are marked according to the pixel difference degree of the pixel points. Determine whether the neighborhood information of the difference pixel points can be continuously matched; If not, the difference pixel points are clustered into each connected region, non-adjacent isolated pixel points are detected in the connected region, and the pseudo-foreground region in the connected region is identified according to the isolated pixel points, and the area value of the pseudo-foreground region is less than the preset pixel number. Wherein, before the step of segmenting the advertising exhibition image and dividing the corresponding region information in the image data, it further comprises: Applying a preset convolutional neural network to extract hierarchical features of the advertising exhibition image, and generating corresponding candidate regions based on the hierarchical features, wherein the hierarchical features specifically include shape, texture and color; Determine whether the candidate region matches the preset region belonging category, wherein the region belonging category specifically includes the category label and position of the target; If yes, a segmentation mask corresponding to the candidate region is constructed through a preset mask branch, the segmentation mask is aligned with a preset target bounding box of the advertising exhibition image, and the target bounding box is combined with the segmentation mask, and according to the alignment result and the combination result, the pixel-level segmentation of each target object in the advertising exhibition image is divided.
2. The target object recognition replacement method of an advertisement exhibition image according to claim 1, characterized by, In the step of marking the difference pixel points of the region information according to the pixel difference degree, it further comprises: Based on the preset feature dynamics of the advertising exhibition image, a difference threshold of the pixel difference degree is constructed; Determine whether the pixel difference degree exceeds the preset pixel difference threshold; If yes, according to the pixel difference degree, each pixel point with significant difference from the background is marked, the pixel points are classified into foreground pixels and background pixels, and the current image change of the advertising exhibition image is dynamically updated by applying a preset weighted average to the foreground pixels and the background pixels.
3. The target object recognition and replacement method for advertising exhibition images according to claim 1, characterized in that, In the step of clustering the difference pixel points into each connected region and detecting non-adjacent isolated pixel points in the connected region, it further comprises: Based on the preset neighborhood relationship of the difference pixel points, the neighborhood of the pixels in the connected region is detected to verify the connection relationship of the pixels, wherein the neighborhood relationship specifically includes horizontal, vertical and diagonal adjacent; Determine whether the connection relationship conforms to the neighborhood relationship; If yes, a preset structural element is applied to expand the pixel to obtain a foreground pixel overlapping the pixel, and a foreground area of the advertising exhibition image is dynamically updated according to the foreground pixel, wherein the structural element specifically includes a square, a circle and a cross.
4. The target object recognition and replacement method for advertising exhibition images according to claim 1, characterized in that, The step of judging whether the image data detects a preset color overlap further includes: color features of each pixel are extracted from the image data, the color features are compared with a preset target color range, and color overlap degrees of the each pixel are calculated; whether the color overlap degrees reach a preset threshold is judged; if yes, a foreground pixel corresponding to the color overlap degrees is identified, and a corresponding foreground area is marked from the image data based on the foreground pixel.
5. The target object recognition and replacement method for advertising exhibition images according to claim 1, characterized in that, The step of judging whether the neighborhood information of the difference pixel point can be continuously matched further includes: based on a local area pre-divided from the advertising exhibition image, a mean value and a variance of the difference pixel point are calculated; whether the mean value and the variance detect a preset fluctuation is judged; if yes, a corresponding noise feature is identified from the difference pixel point, a difference threshold is dynamically adjusted according to the noise feature, and a misdetected noise area is removed according to the difference threshold, wherein the noise feature specifically includes a Gaussian noise, a salt and pepper noise and a speckle noise.
6. The target object recognition and replacement method for advertising exhibition images according to claim 1, characterized in that, The step of identifying corresponding image data from the advertising exhibition image based on the pre-uploaded advertising exhibition image further includes: a preset target detection algorithm is applied to identify a target object category in the advertising exhibition image, wherein the target object category specifically includes a product, a text and a brand logo; whether the target object category has a preset advertising element is judged, wherein the advertising element specifically includes a pattern, a background and a texture feature; if yes, the target object category is matched to a preset advertising theme based on the advertising element, and the advertising exhibition image is divided into a corresponding advertising category according to the advertising theme, wherein the advertising theme specifically includes a company logo, a brand logo and a product icon, and the advertising category specifically includes a product advertisement, a promotion advertisement and a brand advertisement.
7. An advertisement exhibition image target object recognition replacement system characterized by comprising: It includes: an identification module configured to identify corresponding image data from a pre-uploaded advertising exhibition image, wherein the image data specifically includes foreground target data and background data; a judgment module configured to judge whether the image data detects a preset color overlap, wherein the color overlap specifically refers to color overlap degrees of each pixel; an execution module configured to, if yes, perform image segmentation on the advertising exhibition image, divide corresponding area information in the image data, calculate a pixel difference degree of a pixel point of a current image frame from a pixel value of the pixel point and a preset background model from the area information, and mark a difference pixel point of the area information according to the pixel difference degree of the pixel point, wherein the area information specifically includes a target area and a background area; a second judgment module configured to judge whether neighborhood information of the difference pixel point can be continuously matched; and a third judgment module configured to judge whether the neighborhood information of the difference pixel point can be continuously matched. The second execution module is configured to, if not, cluster the difference pixels into respective connected regions, detect non-adjacent isolated pixels in the connected regions, identify a false foreground region in the connected regions according to the isolated pixels, and remove a to-be-filtered region with an area value less than a preset pixel number in the false foreground region. The method further comprises the following steps: The extraction module is configured to extract hierarchical features of the advertising exhibition image by using a preset convolutional neural network, and generate a corresponding candidate region based on the hierarchical features, wherein the hierarchical features specifically include shape, texture, and color. The third judgment module is configured to judge whether the candidate region matches a preset region belonging category, wherein the region belonging category specifically includes a category label and a position of a target. The third execution module is configured to, if yes, construct a segmentation mask corresponding to the candidate region by using a preset mask branch, align the segmentation mask with a preset target bounding box of the advertising exhibition image, combine the target bounding box with the segmentation mask, and divide pixel-level segmentation of respective target objects in the advertising exhibition image according to an alignment result and a combination result.
8. The target object recognition and replacement system for advertising display images of claim 7, wherein, The execution module further comprises: The construction unit is configured to construct a difference threshold of the pixel difference measurement based on a preset feature dynamics of the advertising exhibition image. The judgment unit is configured to judge whether the pixel difference measurement exceeds the preset pixel difference threshold. The execution unit is configured to, if yes, mark respective pixels with significant difference from the background according to the pixel difference measurement, classify the pixels into foreground pixels and background pixels, and update a current image change of the advertising exhibition image by using a preset weighted average dynamic on the foreground pixels and the background pixels.
Citation Information
Patent Citations
Improved visual background extraction based movement target detection method
CN104392468A
Image processing method and apparatus, mobile terminal, and computer readable storage medium
CN108961302A