Personnel behavior management method for hazardous chemicals laboratories based on pedestrian re-identification
By applying frame difference method and the pedestrian re-identification technology of Siamese network in hazardous chemical laboratories, the problem of pedestrian identification in the prior art is solved, stable and accurate pedestrian detection and behavior management are achieved, and the efficiency of laboratory safety management is improved.
Patent Information
- Application Number
- CN202410765141.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-06-14
AI Technical Summary
The prior art is sensitive to light and background changes in pedestrian recognition, resulting in unstable or inaccurate detection results, and the re-identification method has problems such as insufficient feature expression and low matching accuracy.
A method of personnel behavior management of hazardous chemical laboratory based on pedestrian re-identification is designed. Through the pre-processing of video image data and the application of pedestrian detection algorithm, pedestrian characteristic information is extracted, and pedestrian re-identification and tracking is used to achieve accurate behavioral analysis and management.
Through the frame difference method, the pedestrian motion trajectory and the feature learning of the Siamese network are detected, and stable and accurate pedestrian detection and re-identification are achieved, which can effectively manage the behavior of laboratory personnel and improve the accuracy and efficiency of laboratory safety management.
Smart Images

Figure CN118711213B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and laboratory safety, and more specifically, to a method for managing the behavior of personnel in a hazardous chemicals laboratory based on pedestrian re-identification. Background Art
[0002] Pedestrian re-identification technology, also known as pedestrian re-identification, is a technology that uses computer vision technology to determine whether there is a specific pedestrian in an image or video sequence. It is based on computer vision and machine learning methods, and extracts pedestrian appearance features such as clothing, body shape, face, etc. to construct pedestrian feature vectors, and uses similarity measurement algorithms to match pedestrians. Pedestrian re-identification technology is widely used in intelligent video surveillance, intelligent security and other fields. It aims to make up for the visual limitations of fixed cameras, and is combined with pedestrian detection and pedestrian tracking technology to achieve cross-device pedestrian image retrieval and recognition. Secondly, as a place involving high-risk and sensitive operations, hazardous chemical laboratories have extremely high requirements for the management of personnel behavior. With the increasing importance of laboratory safety management, the behavior management of laboratory personnel has become particularly important, especially in hazardous chemical laboratories. Because of the use of hazardous chemicals, real-time monitoring and accurate identification of laboratory personnel behavior are particularly important.
[0003] Existing pedestrian recognition technology is sensitive to factors such as lighting and background, and is easily affected by environmental changes, resulting in unstable or inaccurate detection results. In addition, the re-identification method relies on manually designed features or matching methods based on local features, which has problems such as insufficient feature expression and low matching accuracy. Summary of the invention
[0004] In order to overcome the shortcomings of the prior art, the present invention designs a behavior management method for hazardous chemicals laboratory personnel based on pedestrian re-identification.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0006] The method for managing the behavior of hazardous chemicals laboratory personnel based on pedestrian re-identification is characterized by comprising the following steps:
[0007] S1, collect video image data in the laboratory and pre-process it;
[0008] S2. Use a pedestrian detection algorithm to detect the preprocessed image data to obtain the position and contour information of the pedestrian;
[0009] S3, extracting features of the detected pedestrians, including human body contour, posture, and clothing features;
[0010] S4, using a pedestrian re-identification algorithm to identify and track the pedestrians after feature extraction, and obtain the identity information and movement trajectory of each pedestrian;
[0011] S5. Analyze and manage pedestrians’ behaviors based on their identity information and movement trajectories, including entering and leaving the laboratory and handling hazardous chemicals;
[0012] S6. Conduct real-time monitoring and early warning of personnel behavior in hazardous chemicals laboratories. When abnormal behavior is found, issue an alarm in a timely manner and take appropriate measures;
[0013] S7. Store personnel behavior data in the database and conduct regular data analysis and reporting to provide decision support for laboratory management.
[0014] Preferably, the step S2 uses a frame difference method, and the specific steps are as follows:
[0015] S21, converting the color images of two adjacent frames into grayscale images;
[0016] S22, for the input video data, read the video frame by frame, and use each frame as the input of the algorithm;
[0017] S23, calculating the difference between adjacent frames, applying a threshold operation to the frame difference image, marking pixels whose difference values exceed the threshold as foreground, and marking the remaining pixels as background;
[0018] S24, binarizing the difference image according to the characteristics of the difference image, setting pixels with difference values greater than a preset threshold to white 255, and setting the remaining pixels to black 0;
[0019] S26, performing morphological operation on the binarized frame difference image;
[0020] S27, detecting the position of the pedestrian, using connected region analysis to find the connected regions or contours in the frame difference image, where these regions correspond to the position of the pedestrian;
[0021] S28, extracting pedestrian contour information from the detected pedestrian area;
[0022] S29: Visualize the detected pedestrian position and contour information on the original image.
[0023] Preferably, the step S26 further comprises the following steps:
[0024] S261.1. Define a small circle with a radius of 1 cm as a structural element and traverse the image;
[0025] S261.2. Align the center of the structure element with the current pixel position and apply it to the image;
[0026] S261.3. After the position of the structural element is matched with the image, compare the pixel values of the area covered by the structural element with the corresponding area in the image;
[0027] S261.4. When all pixels in the area covered by the structure element are foreground, the current pixel is retained as the foreground; otherwise, the current pixel is converted to the background;
[0028] S261.5. Apply the structure element to the eroded image to perform a dilation operation on the image;
[0029] S261.6. Align the structure element with each pixel in the image. If the structure element overlaps with the target area, set the pixel as the foreground; otherwise, set the pixel as the background.
[0030] S261.5. Traverse the entire image and generate a new output image.
[0031] Preferably, the step S27 further comprises the following steps:
[0032] S27.1 uses the connected region analysis method to identify connected regions or wheels in the image. The findContours function is called on the binary image to obtain a set of contours. Each contour is a closed curve composed of points. An appropriate contour area threshold is selected to filter out contours that are too small and too large, and only the medium-sized contours corresponding to pedestrians are retained.
[0033] S27.2. Use the drawContours function to draw the contours on the original image and mark the circumscribed rectangle or ellipse of each contour;
[0034] S27.3. Calculate the centroid position of the contour, or the center position of the circumscribed rectangle or ellipse as an estimate of the pedestrian's position.
[0035] Preferably, the S28 further comprises the following steps:
[0036] S28.1. Use the findContours function to detect contours in a binary image. The findContours function returns the detected contours and the hierarchical relationship between them. A contour is composed of a series of points and usually represents the boundary of an object. The findContours function has three key parameters: input image, contour retrieval mode, and contour approximation method. The contour retrieval mode determines which contours will be retrieved, and the contour approximation method determines how the contour points are stored.
[0037] S28.2. Filter the detected contours according to actual needs, exclude some contours that do not meet the conditions by the area, perimeter or other features of the contours, and use the drawContours function to draw the filtered contours on the original image or a new blank image;
[0038] S28.3. Extract information that matches the characteristics of the pedestrian from each contour, including the contour's geometric features, area, perimeter, enclosing rectangle, minimum enclosing rectangle, and minimum enclosing circle.
[0039] Preferably, the step S3 further comprises the following steps:
[0040] S31, using SSD to detect the position of pedestrians in the image, and outputting the bounding box of pedestrians to determine the position of pedestrians;
[0041] S32. Use the key point detection model HRNet to detect the key points of pedestrians, including the head, shoulders, elbows and knees;
[0042] S33, based on the detected key points, use the posture estimation network to estimate the posture of the pedestrian, including standing, walking and running;
[0043] S34. Based on pedestrian detection, the U-Net image segmentation model is used to further extract the outline of pedestrians;
[0044] S35. Based on the detected human body contour and key points, various clothing features are extracted, including clothing color, texture, length and width.
[0045] Preferably, the step S4 uses a Siamese network, which includes the following steps:
[0046] S41. Use VGG to build two sub-networks with the same structure. The two sub-networks share weights and receive a pair of pedestrian images as input.
[0047] S42, mapping the input pedestrian image to a new feature space through a sub-network to form a representation of the input in the new space;
[0048] S43, using cosine similarity to calculate the similarity between two feature vectors;
[0049] S44, Triplet Loss is used as the loss function to promote the Siamese network learning to make the image feature representations of the same pedestrian closer and make the feature representations of different pedestrians farther away from each other;
[0050] S45, selecting anchor images, positive samples (belonging to the same pedestrian) and negative samples (belonging to different pedestrians) for training;
[0051] S46. Update the network weights through the back-propagation algorithm and gradient descent optimizer to minimize the loss function.
[0052] Preferably, the step S5 further comprises the following steps:
[0053] S51. Collecting pedestrian identity information through a database;
[0054] S52, using RFID electronic tags to collect pedestrian movement trajectory data in real time through their positioning function;
[0055] S53, defining different behavior categories in combination with the human body contour, posture, and clothing features obtained in step S3, and setting a threshold for each behavior category;
[0056] S54. Based on the identity information and movement trajectory of the pedestrian, combined with the set threshold, for each behavior category, the characteristic value of the pedestrian under that behavior is calculated and compared with the set threshold. If the characteristic value is greater than or equal to the threshold, the pedestrian's behavior is judged to be consistent with the category, and the time and place of the behavior are recorded. If the characteristic value is less than the threshold, the pedestrian's behavior is judged to be inconsistent with the category and the behavior is ignored.
[0057] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: the present invention designs a hazardous chemicals laboratory personnel behavior management method based on pedestrian re-identification, and detects the movement trajectory of pedestrians by comparing the differences between consecutive frames using the frame difference method, thereby achieving stable and accurate pedestrian detection. The Siamese network can effectively learn the feature representation of pedestrians and calculate the similarity between pedestrians in the feature space, thereby achieving accurate pedestrian re-identification. The Siamese network has an end-to-end training method and can make full use of data for feature learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived based on the provided drawings without paying any creative work.
[0059] Figure 1 A step-by-step diagram of the method for behavior management of hazardous chemicals laboratory personnel based on pedestrian re-identification. DETAILED DESCRIPTION
[0060] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;
[0061] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;
[0062] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0063] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0064] Example
[0065] Personnel behavior management method for hazardous chemicals laboratories based on pedestrian re-identification, such as Figure 1 As shown, the following steps are included:
[0066] S1, collect video image data in the laboratory and pre-process it;
[0067] S2. Use a pedestrian detection algorithm to detect the preprocessed image data to obtain the position and contour information of the pedestrian;
[0068] S3, extracting features of the detected pedestrians, including human body contour, posture, and clothing features;
[0069] S4, using a pedestrian re-identification algorithm to identify and track the pedestrians after feature extraction, and obtain the identity information and movement trajectory of each pedestrian;
[0070] S5. Analyze and manage pedestrians’ behaviors based on their identity information and movement trajectories, including entering and leaving the laboratory and handling hazardous chemicals;
[0071] S6. Conduct real-time monitoring and early warning of personnel behavior in hazardous chemicals laboratories. When abnormal behavior is found, issue an alarm in a timely manner and take appropriate measures;
[0072] S7. Store personnel behavior data in the database and conduct regular data analysis and reporting to provide decision support for laboratory management.
[0073] The step S2 uses the frame difference method, and the specific steps are as follows:
[0074] S21, converting the color images of two adjacent frames into grayscale images;
[0075] S22, for the input video data, read the video frame by frame, and use each frame as the input of the algorithm;
[0076] S23. Calculate the difference between adjacent frames, apply a threshold operation to the frame difference image, mark the pixels whose difference values exceed the threshold as foreground (the area where pedestrians appear), and mark the remaining pixels as background; by calculating the difference between adjacent frames, dynamically changing areas can be found, which are the locations of pedestrians. The threshold operation is used to mark the pixels whose difference values exceed the set threshold as foreground, indicating the area where pedestrians may appear. By analyzing the statistical characteristics of the video frame difference image, the distribution of pixel values or the mean of the difference values, a suitable threshold is determined.
[0077] S24, binarizing the difference image according to the characteristics of the difference image, setting pixels with difference values greater than a preset threshold to white 255, and setting the remaining pixels to black 0;
[0078] S26, performing morphological operation on the binarized frame difference image;
[0079] S27, detecting the position of the pedestrian, using connected region analysis to find the connected regions or contours in the frame difference image, where these regions correspond to the position of the pedestrian;
[0080] S28, extracting pedestrian contour information from the detected pedestrian area;
[0081] S29: Visualize the detected pedestrian position and contour information on the original image.
[0082] The step S26 further comprises the following steps:
[0083] S261.1. Define a small circle with a radius of 1 cm as a structural element and traverse the image;
[0084] S261.2. Align the center of the structure element with the current pixel position and apply it to the image;
[0085] S261.3. After the position of the structural element is matched with the image, compare the pixel values of the area covered by the structural element with the corresponding area in the image;
[0086] S261.4. When all pixels in the area covered by the structure element are foreground, the current pixel is retained as the foreground; otherwise, the current pixel is converted to the background;
[0087] S261.5. Apply the structure element to the eroded image to perform a dilation operation on the image;
[0088] S261.6. Align the structure element with each pixel in the image. If the structure element overlaps with the target area, set the pixel as the foreground; otherwise, set the pixel as the background.
[0089] S261.5. Traverse the entire image and generate a new output image.
[0090] The step S27 further comprises the following steps:
[0091] S27.1 uses the connected region analysis method to identify connected regions or wheels in the image. The findContours function is called on the binary image to obtain a set of contours. Each contour is a closed curve composed of points. An appropriate contour area threshold is selected to filter out contours that are too small and too large, and only the medium-sized contours corresponding to pedestrians are retained.
[0092] S27.2. Use the drawContours function to draw the contours on the original image and mark the circumscribed rectangle or ellipse of each contour;
[0093] S27.3. Calculate the centroid position of the contour, or the center position of the circumscribed rectangle or ellipse as an estimate of the pedestrian's position.
[0094] The S28 further comprises the following steps:
[0095] S28.1. Use the findContours function to detect contours in a binary image. The findContours function returns the detected contours and the hierarchical relationship between them. A contour is composed of a series of points and usually represents the boundary of an object. The findContours function has three key parameters: input image, contour retrieval mode, and contour approximation method. The contour retrieval mode determines which contours will be retrieved, and the contour approximation method determines how the contour points are stored.
[0096] S28.2. Filter the detected contours according to actual needs, exclude some contours that do not meet the conditions by the area, perimeter or other features of the contours, and use the drawContours function to draw the filtered contours on the original image or a new blank image;
[0097] S28.3. Extract information that matches the characteristics of the pedestrian from each contour, including the contour's geometric features, area, perimeter, enclosing rectangle, minimum enclosing rectangle, and minimum enclosing circle.
[0098] The S3 further comprises the following steps:
[0099] S31, using SSD to detect the position of pedestrians in the image, and outputting the bounding box of pedestrians to determine the position of pedestrians;
[0100] S32. Use the key point detection model HRNet to detect the key points of pedestrians, including the head, shoulders, elbows and knees;
[0101] S33, based on the detected key points, use the posture estimation network to estimate the posture of the pedestrian, including standing, walking and running;
[0102] S34. Based on pedestrian detection, the U-Net image segmentation model is used to further extract the outline of pedestrians; U-Net fuses the features of different levels in the encoder and decoder to make full use of multi-scale information and improve the accuracy of the segmentation results.
[0103] S35. Based on the detected human body contour and key points, various clothing features are extracted, including clothing color, texture, length and width.
[0104] The step S4 uses a Siamese network, which includes the following steps:
[0105] S41. Use VGG to build two sub-networks with the same structure. The two sub-networks share weights and receive a pair of pedestrian images as input.
[0106] S42, mapping the input pedestrian image to a new feature space through a sub-network to form a representation of the input in the new space;
[0107] S43, using cosine similarity to calculate the similarity between two feature vectors;
[0108] S44, Triplet Loss is used as the loss function to promote the Siamese network learning to make the image feature representations of the same pedestrian closer and make the feature representations of different pedestrians farther away from each other;
[0109] S45, selecting anchor images, positive samples (belonging to the same pedestrian) and negative samples (belonging to different pedestrians) for training;
[0110] S46. Update the network weights through the back-propagation algorithm and gradient descent optimizer to minimize the loss function.
[0111] Described step S5 further comprises the following steps:
[0112] S51. Collecting pedestrian identity information through a database;
[0113] S52, using RFID electronic tags to collect pedestrian movement trajectory data in real time through their positioning function;
[0114] S53, defining different behavior categories in combination with the human body contour, posture, and clothing features obtained in step S3, and setting a threshold for each behavior category;
[0115] S54. Based on the identity information and movement trajectory of the pedestrian, combined with the set threshold, for each behavior category, the characteristic value of the pedestrian under that behavior is calculated and compared with the set threshold. If the characteristic value is greater than or equal to the threshold, the pedestrian's behavior is judged to be consistent with the category, and the time and place of the behavior are recorded. If the characteristic value is less than the threshold, the pedestrian's behavior is judged to be inconsistent with the category and the behavior is ignored.
[0116] Behavior categories include entering the area, leaving the area, staying for a long time, abnormal speed behavior and frequent entry and exit behavior. The number of times pedestrians enter the laboratory area or the length of time they stay in the area is counted, the number of times pedestrians leave the laboratory area or the length of time they stay in the area is counted, the number of times pedestrians stay in the laboratory area for more than 30 minutes or the total stay time is recorded, the average speed of pedestrians in a specific area is calculated, if it exceeds 2m / s, it is considered to be abnormal speed behavior, and the number of times pedestrians enter and leave the laboratory area within a period of time is counted. If it exceeds the set threshold, it is considered to be frequent entry and exit behavior.
[0117] The beneficial effect of the technical solution of the present invention is that the present invention designs a hazardous chemicals laboratory personnel behavior management method based on pedestrian re-identification, and detects the movement trajectory of pedestrians by comparing the differences between consecutive frames using the frame difference method, thereby achieving stable and accurate pedestrian detection. The Siamese network can effectively learn the feature representation of pedestrians and calculate the similarity between pedestrians in the feature space, thereby achieving accurate pedestrian re-identification. The Siamese network has an end-to-end training method and can make full use of data for feature learning.
[0118] The same or similar reference numerals correspond to the same or similar components;
[0119] The terms used in the drawings to describe positional relationships are only used for illustrative purposes and should not be construed as limiting this patent;
[0120] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not limitations on the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made on the basis of the above description. It is not necessary and impossible to list all the implementation methods here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A behavior management method for hazardous chemicals laboratory personnel based on pedestrian re-identification, characterized in that: The following steps are involved: S1, collect video image data in the laboratory and pre-process it; S2. Use a pedestrian detection algorithm to detect the preprocessed image data to obtain the position and contour information of the pedestrian; S3, extracting features of the detected pedestrians, including human body contour, posture, and clothing features; The S3 further comprises the following steps: S31, using SSD to detect the position of pedestrians in the image, and outputting the bounding box of pedestrians to determine the position of pedestrians; S32. Use the key point detection model HRNet to detect the key points of pedestrians, including the head, shoulders, elbows and knees; S33, based on the detected key points, use the posture estimation network to estimate the posture of the pedestrian, including standing, walking and running; S34. Based on pedestrian detection, the U-Net image segmentation model is used to further extract the outline of pedestrians; S35, extracting various clothing features based on the detected human body contour and key points, including clothing color, texture, length and width; S4, using a pedestrian re-identification algorithm to identify and track the pedestrians after feature extraction, and obtain the identity information and movement trajectory of each pedestrian; The step S4 uses a Siamese network, which includes the following steps: S41. Use VGG to build two sub-networks with the same structure. The two sub-networks share weights and receive a pair of pedestrian images as input. S42, mapping the input pedestrian image to a new feature space through a sub-network to form a representation of the input in the new space; S43, using cosine similarity to calculate the similarity between two feature vectors; S44, Triplet Loss is used as the loss function to promote the Siamese network learning to make the image feature representations of the same pedestrian closer and make the feature representations of different pedestrians farther away from each other; S45, selecting anchor images, positive samples and negative samples for training; S46, update the weights of the network through the back-propagation algorithm and the gradient descent optimizer to minimize the loss function; S5. Analyze and manage pedestrians’ behaviors based on their identity information and movement trajectories, including entering and leaving the laboratory, handling hazardous chemicals, and abnormal postures; Described step S5 further comprises the following steps: S51. Collecting pedestrian identity information through a database; S52, using RFID electronic tags to collect pedestrian movement trajectory data in real time through their positioning function; S53, defining different behavior categories in combination with the human body contour, posture, and clothing features obtained in step S3, and setting a threshold for each behavior category; S54, according to the identity information and movement trajectory of the pedestrian, combined with the set threshold, for each behavior category, calculate the characteristic value of the pedestrian in the behavior category, and compare it with the set threshold; if the characteristic value is greater than or equal to the threshold, it is determined that the pedestrian's behavior meets the category, and the time and place of the behavior are recorded; if the characteristic value is less than the threshold, it is determined that the pedestrian's behavior does not meet the category, and the behavior is ignored; S6. Conduct real-time monitoring and early warning of personnel behavior in hazardous chemicals laboratories. When abnormal behavior is found, issue an alarm in a timely manner and take appropriate measures; S7. Store personnel behavior data in the database and conduct regular data analysis and reporting to provide decision support for laboratory management.
2. The method for managing the behavior of hazardous chemicals laboratory personnel based on pedestrian re-identification according to claim 1 is characterized in that: The step S2 uses the frame difference method, and the specific steps are as follows: S21, converting the color images of two adjacent frames into grayscale images; S22, for the input video data, read the video frame by frame, and use each frame as the input of the algorithm; S23, calculating the difference between adjacent frames, applying a threshold operation to the frame difference image, marking pixels whose difference values exceed the threshold as foreground, and marking the remaining pixels as background; S24, binarizing the difference image according to the characteristics of the difference image, setting pixels with difference values greater than a preset threshold to white 255, and setting the remaining pixels to black 0; S26, performing morphological operation on the binarized frame difference image; S27, detecting the position of the pedestrian, using connected region analysis to find the connected regions or contours in the frame difference image, where these regions correspond to the position of the pedestrian; S28, extracting pedestrian contour information from the detected pedestrian area; S29: Visualize the detected pedestrian position and contour information on the original image.
3. The method for managing the behavior of hazardous chemicals laboratory personnel based on pedestrian re-identification according to claim 2 is characterized in that: The step S26 further comprises the following steps: S261.
1. Define a small circle with a radius of 1 cm as a structural element and traverse the image; S261.
2. Align the center of the structure element with the current pixel position and apply it to the image; S261.
3. After the position of the structural element is matched with the image, compare the pixel values of the area covered by the structural element with the corresponding area in the image; S261.
4. When all pixels in the area covered by the structure element are foreground, the current pixel is retained as the foreground; otherwise, the current pixel is converted to the background; S261.
5. Apply the structure element to the eroded image to perform a dilation operation on the image; S261.
6. Align the structure element with each pixel in the image. If the structure element overlaps with the target area, set the pixel as the foreground; otherwise, set the pixel as the background. S261.
7. Traverse the entire image and generate a new output image.
4. The method for managing the behavior of hazardous chemicals laboratory personnel based on pedestrian re-identification according to claim 2 is characterized in that: The step S27 further comprises the following steps: S27.1 uses the connected region analysis method to identify connected regions or wheels in the image. The findContours function is called on the binary image to obtain a set of contours. Each contour is a closed curve composed of points. An appropriate contour area threshold is selected to filter out contours that are too small and too large, and only the medium-sized contours corresponding to pedestrians are retained. S27.
2. Use the drawContours function to draw the contours on the original image and mark the circumscribed rectangle or ellipse of each contour; S27.
3. Calculate the centroid position of the contour, or the center position of the circumscribed rectangle or ellipse as an estimate of the pedestrian's position.
5. The method for managing the behavior of hazardous chemicals laboratory personnel based on pedestrian re-identification according to claim 2 is characterized in that: The S28 further comprises the following steps: S28.
1. Use the findContours function to detect contours in the binary image. The findContours function returns the detected contours and their hierarchical relationships. S28.
2. Filter the detected contours according to actual needs, exclude some contours that do not meet the conditions by the area, perimeter or other features of the contours, and use the drawContours function to draw the filtered contours on the original image or a new blank image; S28.
3. Extract information that matches the characteristics of the pedestrian from each contour, including the contour's geometric features, area, perimeter, enclosing rectangle, minimum enclosing rectangle, and minimum enclosing circle.
Citation Information
Patent Citations
Method for real-time gait recognition and tracking
CN117238027A