Intelligent object counting method based on open source data set and Raspberry Pi
By using open source data sets and pre-trained convolutional neural network models on the Raspberry Pi platform for background separation and real-time detection, combined with Kalman filter and adaptive threshold technology, the problem of reduced accuracy and insufficient robustness of object counting in complex backgrounds is solved, and higher recognition accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411640326.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-04-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to accurately distinguish between target objects and background objects in complex background environments, resulting in a decrease in counting accuracy and poor robustness in scenarios with large dynamic changes.
The intelligent object counting method based on open source data sets and Raspberry Pi is adopted to perform background separation through pre-trained convolutional neural network model, combined with Canny edge detection and K-means clustering, and further optimize the tracking accuracy through Kalman filters, and use technologies such as adaptive thresholds and Gaussian hybrid models to process video stream data.
It effectively improves the accuracy and processing speed of object recognition, enhances the robustness of complex backgrounds and dynamically changing scenes, ensures that the background objects can still be accurately distinguished when the target objects are similar to those of the target objects, and avoids counting errors.
Smart Images

Figure CN119741507A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to an intelligent object counting method based on an open source data set and a Raspberry Pi. Background Art
[0002] In current technology, small computing platforms based on open source datasets and Raspberry Pi are widely used in the field of intelligent object counting. This method uses deep learning models to achieve real-time counting of objects in different environments through pre-training data to improve the accuracy and processing efficiency of object recognition. It is suitable for a variety of application scenarios such as warehouse management, intelligent monitoring, and traffic flow statistics. The main advantages of this method are its low hardware requirements, low development cost, and simple implementation, which is particularly suitable for the rapid deployment of small and medium-sized systems.
[0003] However, existing technologies have certain limitations in complex background environments. Specifically, when the background objects are similar to the target objects in color, shape or texture, it is difficult for the model to accurately distinguish the targets, resulting in reduced counting accuracy. In addition, in scenes with complex backgrounds or large dynamic changes, the existing methods are not robust to the targets. This limitation affects the reliability of the system in practical applications, especially in situations where highly accurate counting is required. Summary of the invention
[0004] The purpose of the present invention is to provide an intelligent object counting method based on an open source dataset and a Raspberry Pi, so as to solve the problem that when the background object and the target object are similar in color, shape or texture, it is difficult for the model to accurately distinguish the target, resulting in reduced counting accuracy; in addition, in scenes with complex backgrounds or large dynamic changes, the existing method has poor robustness to the target.
[0005] To achieve the above object, the present invention provides the following technical solution: an intelligent object counting method based on an open source data set and a Raspberry Pi, the method comprising:
[0006] S1, obtaining video stream data containing the target object;
[0007] S2. Perform background separation on the video stream data based on the pre-trained convolutional neural network model to reduce the confusion caused by the similar colors of the background objects and the target objects. Specifically, the video frame is input into the convolutional neural network model to obtain a preliminary feature map, and Canny edge detection is applied to the feature map to enhance the edge of the target object. The feature map is divided into foreground and background to complete background separation. The Canny edge detection formula is:
[0008]
[0009] Among them, G(x, t) represents the edge strength, Ix Represents the gradient of the image in the x direction, I y Represents the gradient of the image in the y direction, and x and y represent the pixel coordinates of the image;
[0010] The specific formula for dividing the feature map into foreground and background is:
[0011]
[0012] Among them, n represents the total number of feature points, x i represents the vector form of the i-th feature point, μ1 and μ2 represent the cluster centers, and ||x i -μ j || represents the i-th feature point and the j-th cluster center μ j The Euclidean distance of
[0013] S3, real-time detection and tracking of the separated target object;
[0014] S4, using Kalman filter to optimize the tracking accuracy of the target object;
[0015] S5. Count and record the number of detected target objects.
[0016] Preferably, the method further comprises:
[0017] The video stream data is further processed based on the color segmentation algorithm to enhance the contrast between the target object and the background object;
[0018] Extract key frames from video stream data for detailed analysis;
[0019] A Gaussian mixture model is applied to model the background to further separate the background from the target object;
[0020] Adaptive thresholding method is used to remove background noise.
[0021] Preferably, the further processing of the video stream data based on the color segmentation algorithm to enhance the contrast between the target object and the background object specifically includes:
[0022] Obtain color feature parameter C of the target object in the video stream data;
[0023] Based on the color characteristic parameter C of the target object, calculate the color mean B of the background;
[0024] Calculate the color contrast coefficient R = |C-B|, where R represents the color contrast;
[0025] When the color contrast coefficient R is greater than the set threshold T1, the corresponding area is determined as the target object area, otherwise it is determined as the background area.
[0026] Preferably, the method further comprises:
[0027] Further enhance the contrast of video stream data based on histogram equalization;
[0028] Use a high-pass filter to sharpen the image to improve detail clarity;
[0029] Perform median filtering to remove salt and pepper noise in the image;
[0030] Compare the processed image with the original image at pixel level and extract the difference.
[0031] Preferably, the step of further enhancing the contrast of the video stream data based on histogram equalization specifically includes:
[0032] Get the gray value distribution H of the image;
[0033] Calculate the cumulative distribution function CDF(x), where x represents the gray value;
[0034] Apply the cumulative distribution function CDF(x) to adjust the grayscale value, the formula is G(x)=CDF(x)×255, where G(x) represents the adjusted grayscale value;
[0035] When the cumulative distribution function CDF(x) is greater than the set threshold T2, the grayscale value is nonlinearly transformed.
[0036] Preferably, the method further comprises:
[0037] Further processing of video stream data based on adaptive binarization algorithm;
[0038] Apply a bilateral filter to smooth the image;
[0039] Detect edges using Laplace filter;
[0040] Combine edge detection results and background model for final target separation.
[0041] Preferably, the further processing of the video stream data based on the adaptive binarization algorithm specifically includes:
[0042] Get the pixel average value A and standard deviation S of the local window;
[0043] Calculate the binarization threshold T3 = A + k × S, where k is a constant, usually in the range of [0, 1];
[0044] For each pixel P in the window, if P ≥ T3, it is determined to be a foreground pixel, otherwise it is a background pixel;
[0045] When the window size is larger than the minimum window size Wmin In this case, the local threshold is recalculated.
[0046] Preferably, the further processing of the video stream data based on the adaptive binarization algorithm further includes the following steps:
[0047] Adjust the threshold of the local window based on a dynamic threshold update strategy;
[0048] Apply mean shift method to cluster pixels;
[0049] Use contour detection algorithm to extract the contour of the target object;
[0050] The target detection results are further optimized through morphological analysis of the contours.
[0051] Preferably, S3 includes:
[0052] Calculate the object motion vector between adjacent frames of the image. The specific formula is:
[0053] I(x,y,t)=I(x+Δx,y+Δy,t+t);
[0054] Where t represents time, x and y represent spatial coordinates in the image, Δx represents the position change of the object in the x direction, Δy represents the position change of the object in the y direction, Δt represents the time change, and I(x, y, t) represents the pixel intensity value at the coordinate (x, y) at time t.
[0055] It can be seen from the above technical solution that the present invention has the following beneficial effects:
[0056] The intelligent object counting method based on open source data set and Raspberry Pi obtains video stream data containing target objects, performs background separation processing on the video stream data based on a pre-trained convolutional neural network model to reduce confusion caused by the similar colors of background objects and target objects, detects and tracks the separated target objects in real time, optimizes the tracking accuracy of target objects using a Kalman filter, counts and records the number of detected target objects, and effectively improves the accuracy and processing speed of object recognition. The technology is suitable for a variety of scenarios such as warehouse management, intelligent monitoring, and traffic flow statistics. It has good versatility and can be flexibly applied to object counting needs in different environments. Using the Raspberry Pi, a small computing platform and an open source data set, the hardware requirements of the present invention are similar to those of the open source data set. The development cost is low, the system is simple and easy to use, and is particularly suitable for the rapid deployment and popularization of small and medium-sized application systems. The performance of the model in complex backgrounds is optimized, and the robustness to the target object is improved, so that when the background object is similar to the target object, it can still be accurately distinguished to avoid counting errors. By optimizing the complex background and dynamically changing scenes, the present invention can maintain a high recognition stability and accuracy, making it more reliable in situations where highly precise counting is required, and solves the problem of the prior art that when the background object is similar to the target object in color, shape or texture, the model is difficult to accurately distinguish the target, thereby resulting in reduced counting accuracy; in addition, in scenes with complex backgrounds or large dynamic changes, the existing method has poor robustness to the target. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] like Figure 1 As shown, the present invention provides a technical solution: an intelligent object counting method based on an open source data set and a Raspberry Pi comprises the following steps:
[0060] S1, obtaining video stream data containing the target object. This step collects video in real time through a camera and optimizes the frame rate and resolution during preprocessing to ensure a balance between computing performance and image clarity.
[0061] S2. Perform background segmentation on the video stream data based on a pre-trained convolutional neural network (CNN) model. The CNN model here can be fine-tuned from open source datasets (such as COCO or ImageNet) through transfer learning to adapt to specific target object detection tasks. The background segmentation step also includes color and brightness feature analysis to reduce confusion caused by background objects that are similar in color to the target object;
[0062] S3, real-time detection and tracking of the separated target objects, using a target detection algorithm (such as YOLO or SSD) for detection, and combining it with a target tracking algorithm (such as SORT or DeepSORT) to achieve tracking, so as to improve the timeliness and accuracy of detection;
[0063] S4. Use Kalman filter to optimize the tracking accuracy of the detected target object. Kalman filter can effectively reduce the recognition deviation caused by occlusion, target disappearance, etc.;
[0064] S5. The number of target objects detected each time is recorded by a counter, and the location information of each target object is stored in a database for subsequent analysis and use.
[0065] This implementation ensures accurate identification of target objects through background separation and tracking technology based on convolutional neural networks. With the help of pre-trained convolutional neural network models, the background and target objects can be quickly separated, reducing background interference. The accuracy of the target object counting results is ensured by optimizing each detection through the Kalman filter. This method improves the accuracy of detection during the target object counting process by introducing a convolutional neural network for background separation and using the Kalman filter to enhance tracking accuracy, which is particularly suitable for real-time processing needs. Combined with the pre-trained model of the open source data set, this method can also quickly adapt to different target object types, further improving detection flexibility.
[0066] S2. Perform background separation on the video stream data based on the pre-trained convolutional neural network model to reduce the confusion caused by the similar colors of the background objects and the target objects. Specifically, the video frame is input into the convolutional neural network model to obtain a preliminary feature map, and Canny edge detection is applied to the feature map to enhance the edge of the target object. The feature map is divided into foreground and background to complete background separation. The Canny edge detection formula is:
[0067]
[0068] Among them, G(x, y) represents the edge strength, I x Represents the gradient of the image in the x direction, I y Represents the gradient of the image in the y direction, and x and y represent the pixel coordinates of the image;
[0069] The specific formula for dividing the feature map into foreground and background is:
[0070]
[0071] Among them, n represents the total number of feature points, x i represents the vector form of the i-th feature point, μ1 and μ2 represent the cluster centers, and ||x i -μ j || represents the i-th feature point and the j-th cluster center μ j The Euclidean distance of
[0072] This implementation method uses a combination of convolutional neural network and Canny edge detection to effectively enhance the edge features of the target object, reduce the confusion between the target object and the background, and improve the recognition accuracy. By using K-means clustering to further separate the foreground and background, it can ensure the effective elimination of background interference and improve the reliability of target recognition. In addition, the video stream data processed by the above method is real-time and stable, and is suitable for target object detection in complex environments.
[0073] In a possible implementation, a smart object counting method based on an open source dataset and a Raspberry Pi further includes the following steps:
[0074] The video stream data is further processed based on the color segmentation algorithm to enhance the contrast between the target object and the background object, thereby improving the detection efficiency;
[0075] Extract key frames from the video stream. These frames can be calculated by frame difference method or optical flow method, which can significantly reduce duplicate data and improve processing efficiency;
[0076] Gaussian mixture model (GMM) is applied to model the background and identify the background and foreground changes in the video stream through the weighted average of multiple Gaussian distributions;
[0077] An adaptive thresholding method is used to remove background noise to keep the foreground intact.
[0078] In this embodiment, the contrast between the target object and the background is enhanced by the color segmentation algorithm, especially when the background and the target object are close in color. The Gaussian mixture model further separates the background and reduces misjudgment. The adaptive threshold method effectively filters out the background noise, ensuring the continuity and stability of the target object detection. This method combines color segmentation, Gaussian mixture model and adaptive threshold to make the detection system have strong robustness, especially under complex background conditions, which can effectively improve the accurate detection and counting of the target object.
[0079] In a possible implementation, the specific steps of further processing the video stream data based on the color segmentation algorithm to enhance the contrast between the target object and the background object include:
[0080] Obtaining color feature parameters C of the target object in the video stream data, for example, by counting feature values of RGB or HSV channels;
[0081] Calculate the background color mean B;
[0082] Calculate the color contrast coefficient R = |C-B|, where R represents the color contrast, to achieve more accurate area distinction;
[0083] When the color contrast coefficient R is greater than the set threshold T1, the corresponding area is determined as the target object area, otherwise it is determined as the background area.
[0084] By extracting the color parameters of the target object and comparing them with the background mean, the foreground and background areas can be dynamically determined. When the color contrast coefficient exceeds the set threshold, the target area is determined to ensure accurate identification of the target object. This color-based segmentation algorithm is particularly suitable for dealing with uneven lighting or situations where the target object and the background color are similar. This method can significantly enhance the separation effect of the target object and the background, especially when the target object and the background color are similar, ensuring the accuracy of detection. It improves the accuracy of detection and counting and reduces misjudgment caused by background interference.
[0085] In a possible implementation, further enhancing the contrast of video stream data based on histogram equalization includes the following steps:
[0086] The image is sharpened through a high-pass filter to enhance the clarity of image details;
[0087] Use median filtering to remove salt and pepper noise in the image to ensure detection accuracy;
[0088] The processed image is compared with the original image at the pixel level to extract the changed area.
[0089] Histogram equalization is used to enhance the overall contrast of the image. On this basis, high-pass filters and median filters are used to optimize image details and remove interference noise. Through pixel difference extraction, the changing area of the target object can be quickly locked to ensure the stability of subsequent detection. This method effectively improves the contrast and detail clarity of the image, making the target object more prominent. The application of median filtering reduces noise interference and further enhances the detection effect, which is particularly suitable for scenes with noise or light changes.
[0090] In a possible implementation, the specific steps of further enhancing the contrast of the video stream data based on histogram equalization include:
[0091] Get the gray value distribution H of the image;
[0092] Calculate the cumulative distribution function CDF(x), where x is the gray value;
[0093] Apply the cumulative distribution function to adjust the gray value, G(x) = CDF(x) × 255;
[0094] If CDF(x) is greater than the set threshold T2, a nonlinear transformation is performed on the grayscale value.
[0095] By calculating the cumulative distribution function and adjusting the grayscale distribution, this method effectively improves the local contrast of the image, so that the image can clearly show the outline of the target object even in complex scenes. After setting the threshold for nonlinear transformation, the details of the low-brightness area can be enhanced. This method significantly improves the image contrast and enhances the details of the low-brightness area, which helps to more accurately identify the target object and improve the accuracy of detection and counting.
[0096] In a possible implementation, the intelligent object counting method based on the open source dataset and the Raspberry Pi further includes the following steps:
[0097] The video stream data is processed based on an adaptive binarization algorithm to more clearly separate the foreground target from the complex background;
[0098] Use a bilateral filter to smooth the image to reduce noise while preserving edge details;
[0099] Use Laplace filter to detect edges and highlight the outlines of objects in the image;
[0100] The edge detection results are combined with the background model to further separate the target objects and improve the detection accuracy.
[0101] The adaptive binarization algorithm dynamically adjusts the binarization threshold according to the characteristics of different areas of the image, so that the target object can be accurately separated under different lighting conditions. The bilateral filter reduces the impact of background noise on detection by smoothing the image and maintaining the edge. The edge information of the image is extracted by the Laplace filter, the outline of the target object is clearly presented, and the separation is more accurate in combination with the background model. This method can accurately separate the target object in complex backgrounds and different lighting environments, effectively improving the detection accuracy and stability. The combined application of the bilateral filter and the Laplace filter ensures the clarity of the image edge and suppresses noise, which is conducive to improving the accuracy of object counting.
[0102] In a possible implementation, the specific steps of further processing the video stream data based on the adaptive binarization algorithm include:
[0103] Get the pixel average value A and standard deviation S of the local window;
[0104] Calculate the binarization threshold T3 = A + k × S, where k is a constant, usually in the range of [0,1];
[0105] For each pixel P in the window, if P ≥ T3, it is determined to be a foreground pixel, otherwise it is a background pixel;
[0106] When the window size is larger than the minimum window size W min In this case, the local threshold is recalculated.
[0107] This implementation is based on an adaptive binarization window mechanism, using the average value and standard deviation within the local window to dynamically calculate the threshold, thereby adapting to the uneven lighting in the scene. By setting the window size and adjusting the threshold, the target object and the background can be effectively separated, improving the accuracy of detection. The minimum size setting within the window can prevent threshold distortion caused by a window that is too small. This method can stably separate the foreground and background areas in scenes with uneven lighting, improving the accuracy of object detection. By dynamically adjusting the threshold, the detection system is more adaptable, especially for complex outdoor environments.
[0108] In a possible implementation manner, the specific steps of further processing the video stream data based on the adaptive binarization algorithm further include:
[0109] Adjust the threshold of the local window based on the dynamic threshold update strategy to adapt it to different lighting changes;
[0110] The mean shift method is used to cluster pixels to ensure that similar pixels are clustered into the same category;
[0111] Use contour detection algorithms to extract the contours of target objects, and further optimize the detection results through morphological analysis;
[0112] Filter out unqualified objects based on their contour morphology to ensure that only real target objects are recorded.
[0113] This implementation introduces dynamic threshold update based on adaptive binarization, and dynamically adjusts the threshold by analyzing local illumination and pixel distribution. The mean shift clustering step classifies pixels of similar color or brightness into the same category, effectively reducing the impact of noise. Contour detection is used to further extract the outer shape boundary of the target object, and morphological analysis is combined to filter out irrelevant objects, ultimately ensuring the accuracy of target detection. This method improves the system's adaptability to different illumination and complex backgrounds. The strategy of combining mean shift and contour detection significantly reduces the misjudgment rate and improves the accuracy and robustness of object counting. Morphological analysis helps to filter out pseudo-targets and improve the stability of detection results.
[0114] The S3 includes:
[0115] Calculate the object motion vector between adjacent frames of the image. The specific formula is:
[0116] I(x,y,t)=I(x+Δx,y+Δy,t+t);
[0117] Where t represents time, x and y represent spatial coordinates in the image, Δx represents the position change of the object in the x direction, Δy represents the position change of the object in the y direction, Δt represents the time change, and I(x, y, t) represents the pixel intensity value at the coordinate (x, y) at time t.
[0118] The working principle of this implementation is to track the movement of an object based on the change in pixel intensity of adjacent frame images. By calculating the displacement of the same object in space and time in adjacent image frames, the motion vector of the object can be obtained. Specifically, when the object moves in the image plane, its displacement in the x and y directions is Δx and Δy respectively, and the corresponding time change is Δt. Through the above formula, the position of the object at time t+Δt can be obtained, thereby identifying the motion trajectory of the object. This method relies on the similarity assumption of pixel intensity, that is, it is assumed that the pixel intensity of the same object will not change significantly in a short time, so the displacement of the object can be inferred by comparing the pixel intensity of the same coordinates in adjacent frames. This principle enables the system to complete motion detection with less computing resources on a low-cost Raspberry Pi platform, which is suitable for real-time object counting tasks.
[0119] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An intelligent object counting method based on open source dataset and Raspberry Pi, characterized in that: The method comprises: S1, obtaining video stream data containing the target object; S2. Perform background separation on the video stream data based on the pre-trained convolutional neural network model to reduce the confusion caused by the similar colors of the background objects and the target objects. Specifically, the video frame is input into the convolutional neural network model to obtain a preliminary feature map, and Canny edge detection is applied to the feature map to enhance the edge of the target object. The feature map is divided into foreground and background to complete background separation. The Canny edge detection formula is: Among them, G(x, y) represents the edge strength, I x Represents the gradient of the image in the x direction, I y Represents the gradient of the image in the y direction, and x and y represent the pixel coordinates of the image; The specific formula for dividing the feature map into foreground and background is: Among them, n represents the total number of feature points, x i represents the vector form of the i-th feature point, μ1 and μ2 represent the cluster centers, and ||x i -μ j || represents the i-th feature point and the j-th cluster center μ j The Euclidean distance of S3, real-time detection and tracking of the separated target object; S4, using Kalman filter to optimize the tracking accuracy of the target object; S5. Count and record the number of detected target objects.
2. The intelligent object counting method based on open source data set and Raspberry Pi according to claim 1, characterized in that: The method further comprises: The video stream data is further processed based on the color segmentation algorithm to enhance the contrast between the target object and the background object; Extract key frames from video stream data for detailed analysis; A Gaussian mixture model is applied to model the background to further separate the background from the target object; Adaptive thresholding method is used to remove background noise.
3. The intelligent object counting method based on open source data set and Raspberry Pi according to claim 2, characterized in that: The further processing of the video stream data based on the color segmentation algorithm to enhance the contrast between the target object and the background object specifically includes: Obtain color feature parameter C of the target object in the video stream data; Based on the color characteristic parameter C of the target object, calculate the color mean B of the background; Calculate the color contrast coefficient R = |C-B|, where R represents the color contrast; When the color contrast coefficient R is greater than the set threshold T1, the corresponding area is determined as the target object area, otherwise it is determined as the background area.
4. The intelligent object counting method based on open source data set and Raspberry Pi according to claim 1, characterized in that: The method further comprises: Further enhance the contrast of video stream data based on histogram equalization; Use a high-pass filter to sharpen the image to improve detail clarity; Perform median filtering to remove salt and pepper noise in the image; Compare the processed image with the original image at pixel level and extract the difference.
5. The intelligent object counting method based on open source data set and Raspberry Pi according to claim 4, characterized in that: The method of further enhancing the contrast of the video stream data based on histogram equalization specifically includes: Get the gray value distribution H of the image; Calculate the cumulative distribution function CDF(x), where x represents the gray value; Apply the cumulative distribution function CDF(x) to adjust the grayscale value, the formula is G(x)=CDF(x)×255, where G(x) represents the adjusted grayscale value; When the cumulative distribution function CDF(x) is greater than the set threshold T2, the grayscale value is nonlinearly transformed.
6. The intelligent object counting method based on open source data set and Raspberry Pi according to claim 1, characterized in that: The method further comprises: Further processing of video stream data based on adaptive binarization algorithm; Apply a bilateral filter to smooth the image; Detect edges using Laplace filter; Combine edge detection results and background model for final target separation.
7. The intelligent object counting method based on open source data set and Raspberry Pi according to claim 6, characterized in that: The further processing of the video stream data based on the adaptive binarization algorithm specifically includes: Get the pixel average value A and standard deviation S of the local window; Calculate the binarization threshold T3 = A + k × S, where k is a constant, usually in the range of [0, 1]; For each pixel P in the window, if P ≥ T3, it is determined to be a foreground pixel, otherwise it is a background pixel; When the window size is larger than the minimum window size W min In this case, the local threshold is recalculated.
8. The intelligent object counting method based on open source data set and Raspberry Pi according to claim 6, characterized in that: The further processing of the video stream data based on the adaptive binarization algorithm also includes the following steps: Adjust the threshold of the local window based on a dynamic threshold update strategy; Apply mean shift method to cluster pixels; Use contour detection algorithm to extract the contour of the target object; The target detection results are further optimized through morphological analysis of the contours.
9. The intelligent object counting method based on open source data set and Raspberry Pi according to claim 1, characterized in that: The S3 includes: Calculate the object motion vector between adjacent frames of the image. The specific formula is: I(x,y,t)=I(x+Δx,y+Δy,t+Δt); Where t represents time, x and y represent spatial coordinates in the image, Δx represents the position change of the object in the x direction, Δy represents the position change of the object in the y direction, Δt represents the time change, and I(x, y, t) represents the pixel intensity value at the coordinate (x, y) at time t.
Citation Information
Patent Citations
Video-based moving target detection and tracking method and system
CN112184759A
Object tracking counting method and device, computer equipment and storage medium
CN114519725A