Calibration-free single-camera personnel positioning method and system, computer equipment and storage medium

Through the improved YOLO v8s model and Monodepth2 depth estimation model, combined with the radial basis function neural network, the problems of complicated camera calibration and high algorithm complexity in the existing technology have been solved, and personnel positioning under a single camera has been achieved, improving positioning Accuracy and real-time performance reduce costs and are suitable for a variety of application scenarios.

CN118537540APending Publication Date: 2024-08-23SHAANXI UNIV OF SCI & TECH +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410691604.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Among existing personnel positioning technologies, the three-dimensional reconstruction method based on depth cameras requires complex camera calibration and high algorithm complexity, resulting in poor real-time performance and high cost. It also requires recalibration when the camera position changes, making the process cumbersome.

Method used

A single-camera person positioning method that does not require calibration is used. Images are obtained through image input devices for filtering, noise reduction and pose calibration. The improved YOLO v8s model is used to detect human heads. It is combined with the Monodepth2 depth estimation model and radial basis function neural network to calculate the human body. Real world coordinates to realize personnel positioning.

Benefits of technology

It achieves accurate positioning of the human body without the need for camera calibration, is suitable for dense crowds and blocked environments, reduces computing resource consumption and deployment costs, and is suitable for areas such as personnel positioning, people flow distribution measurement and intelligent lighting control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537540A
    Figure CN118537540A
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and relates to a calibration-free single-camera personnel positioning method, which comprises the following steps of: acquiring an image, and performing filtering noise reduction and pose transformation to obtain a standard pose image; a trained improved YOLO v8s model is adopted to detect people in the standard pose image, a head detection anchor frame is obtained, the center pixel coordinate of a head in the head detection anchor frame is calculated, and the center pixel coordinate serves as a human body pixel coordinate; estimating a depth value from the human body to the image input device by using the trained depth estimation model; and inputting the human body pixel coordinates and the depth value from the human body to the camera image input device into the trained radial basis function neural network model to obtain the world coordinates of the human body in the space. According to the method, the camera does not need to be calibrated, and the human body can be accurately positioned as long as the head image is complete. The method can be applied to the fields of personnel positioning, people flow distribution measurement, intelligent illumination control, partitioned energy management and the like, and is wide in application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to a single-camera personnel positioning method, system, computer equipment and storage medium that do not require calibration. Background Art

[0002] With the development of Internet of Things technology, personnel positioning services have been widely used in various industries. In actual application scenarios, through personnel positioning methods, the real-time location, activity trajectory, regional control, dynamic warning, classification statistics and other application functions of personnel can be realized. Therefore, personnel positioning methods are widely used in smart elderly care, smart lighting, smart campus, etc., and have broad development prospects.

[0003] Nursing homes can use personnel positioning technology to ensure the safety of the elderly, improve the level of care, and at the same time improve service quality and work efficiency, reduce operating costs, and enhance competitiveness; in hospitals, personnel positioning technology can help medical staff grasp the patient's location in real time, thereby improving the rescue speed and treatment effect, and can also monitor the work of medical staff to provide data support for improving medical quality; in the intelligent lighting industry, by real-time detection of indoor personnel positions, LED lamps can be effectively controlled to achieve the purpose of energy-saving lighting and healthy lighting. For energy-saving lighting, through real-time detection to determine the distribution of human flow, so as to control the on and off of lamps, realize the effective use of energy, and achieve the energy-saving purpose of on-demand lighting. For healthy lighting, through the detection of personnel positions, the color temperature, illumination, brightness, spectrum and other indicators of LED lamps in various places can be adjusted in real time, greatly reducing the harm of blue light, reducing diseases such as weakness and myopia, making the light adapt to eye comfort, and relieving visual fatigue, so as to achieve healthy lighting.

[0004] At present, the mainstream personnel positioning technologies are divided into: visual positioning, infrared positioning, pole positioning, ultrasonic positioning, ultra-wideband positioning, etc. The demand for personnel positioning is mainly concentrated in relatively large public places such as airports, stations, exhibition centers, large supermarkets, and university campuses. In such places, cameras also have the functions of detecting the flow of people and monitoring the safety of the venue. Therefore, the personnel positioning technology based on visual positioning is more in line with the requirements of various scenarios.

[0005] In recent years, vision-based personnel positioning technology in public places has mostly focused on the three-dimensional reconstruction method using depth cameras to locate personnel. However, this method has the following defects when implemented:

[0006] First, the position of the camera is not fixed during the actual installation process. Especially when the camera is installed at a high height, the calibration becomes difficult and the calibration parameters are complicated. Even when the position of the camera changes due to uncertain factors, the calibration has to be performed again, which is a complicated and tedious process.

[0007] Second, although the 3D reconstruction method can achieve high-precision target positioning, the algorithm complexity of this method is relatively high, resulting in poor real-time performance of the algorithm;

[0008] Third, when using 3D reconstruction methods to locate personnel, depth cameras are generally used, or binocular cameras that can use parallax to solve depth. However, the cost of such cameras is relatively high and they are not suitable for use in engineering problems. Summary of the invention

[0009] The purpose of the present invention is to provide a single-camera personnel positioning method, system, computer equipment and storage medium that do not require calibration, which solves a series of problems caused by the existing complex algorithms that require camera calibration and three-dimensional reconstruction to achieve personnel positioning.

[0010] The present invention is achieved through the following technical solutions:

[0011] The present invention discloses a single-camera personnel positioning method that does not require calibration, comprising the following steps:

[0012] Step 1: Obtain an image and perform filtering and noise reduction processing to obtain a preprocessed image;

[0013] Step 2: Calibrate the preprocessed image and transform it into a standard pose image;

[0014] Step 3: Use the trained improved YOLO v8s model to detect people in the standard pose image, obtain the head detection anchor frame, and calculate the center pixel coordinates of the head in the head detection anchor frame, and use the center pixel coordinates as the human body pixel coordinates;

[0015] Step 4: Get the center pixel coordinates of the head in the head detection anchor frame, use the trained depth estimation model to calculate, and output the depth value of the spatial point corresponding to the center pixel coordinates as the depth information from the human body to the image input device;

[0016] Step 5: Use the trained radial basis function neural network model, take the human body pixel coordinates obtained in step 3 and the depth information from the human body to the image input device obtained in step 4 as input, output the real world coordinates of the person's head, and then obtain the actual coordinates of the human body.

[0017] Furthermore, in step 1, median filtering is used for preliminary filtering.

[0018] Further, step 2 specifically includes the following steps:

[0019] 2.1. Obtain the coordinate information of the four vertices of the roi of the reference image, and find the minimum bounding rectangle corresponding to this roi area in the preprocessed image, which is recorded as the ROI area;

[0020] 2.2. Perform mask processing outside the ROI area, and then perform ORB feature extraction in the ROI area to obtain the key points and descriptors of the ROI area of ​​the real-time acquired image;

[0021] 2.3. Obtain the key points and descriptors of the roi area of ​​the reference image;

[0022] The descriptor of the ROI area of ​​the real-time acquired image is violently matched with the descriptor of the ROI area of ​​the reference image to obtain the matching results of the two areas;

[0023] 2.4. By using the key points of the ROI area of ​​the real-time image and the key points of the ROI area of ​​the reference image, the affine transformation matrix M from the real-time image to the reference image is solved. M is called the calibration matrix.

[0024] 2.5. Through the calibration matrix M, the real-time acquired image is converted into the image corresponding to the standard posture of the camera to realize the image calibration.

[0025] Furthermore, in 2.3, the process of establishing the key points and descriptors of the reference image roi region is as follows:

[0026] After fixing the camera, collect an RGB image as the reference image, and the corresponding camera pose is the standard pose;

[0027] Determine a fixed area D within the camera's field of view, use it as the roi area, and record the coordinate information of the four vertices of the roi;

[0028] Mask processing is performed outside the roi area, ORB features are extracted from the image within the roi area, and key points and descriptors are stored.

[0029] Furthermore, in step 3, in the improved YOLO v8s model, in the Backbone part, the lightweight convolutional neural network ShuffleNet V2 is used as the backbone network to achieve preliminary feature extraction;

[0030] Add the CBAM attention mechanism module after the first and last convolutional layers of Backbone.

[0031] Furthermore, in step 4, Monodepth2 is used as the depth estimation model.

[0032] Furthermore, in step 5, the radial basis function of the radial basis function neural network model adopts a Gaussian function, and the formula is:

[0033]

[0034] In the formula, x mis the mth input sample, c i is the i-th center point, j is the number of nodes in the hidden layer, and n is the number of output samples or classifications;

[0035] The output of the radial basis function neural network model is:

[0036]

[0037] In the formula, ω represents the weight, p = 1, 2, ..., n.

[0038] The present invention also discloses a single-camera personnel positioning system that does not require calibration, comprising:

[0039] A filtering module is used to perform filtering and noise reduction processing on the acquired image to obtain a preprocessed image;

[0040] A posture calibration module is used to calibrate the preprocessed image and transform it into a standard posture image;

[0041] The human pixel coordinate calculation module uses the trained improved YOLO v8s model to detect people in standard pose images, obtain the head detection anchor frame, and calculate the center pixel coordinates of the head in the head detection anchor frame, and use the center pixel coordinates as the human pixel coordinates;

[0042] The human body depth information calculation module is used to obtain the central pixel coordinates of the human head in the head detection anchor frame, use the trained depth estimation model to calculate, and output the depth value of the space corresponding to the central pixel coordinates as the depth information from the human body to the image input device;

[0043] The output module adopts the trained radial basis function neural network model, takes the pixel coordinates of the human body and the depth information from the human body to the image input device as input, outputs the real world coordinates of the person's head, and obtains the actual coordinates of the human body.

[0044] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the single-camera personnel positioning method that does not require calibration are implemented.

[0045] The present invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the single-camera personnel positioning method that does not require calibration are implemented.

[0046] Compared with the prior art, the present invention has the following beneficial technical effects:

[0047] The present invention proposes a single-camera personnel positioning method that does not require calibration. First, an image is acquired using an image input device, and a preliminary filtering process is performed; by establishing an affine transformation matrix of a reference image and a real-time acquisition image, the real-time image is converted to a reference image and then subjected to subsequent processing; a trained improved YOLO v8s model is used to detect personnel in the image, a head detection anchor frame is obtained, and the center pixel coordinates of the head in the detection anchor frame are calculated as the human body pixel coordinates; a trained Monodepth2 depth estimation model is used to obtain the depth information of the human body; a trained radial basis function neural network is used to take the human body pixel coordinates and the human body depth information as input to obtain the real-world coordinates of the human body. The present invention uses a general network camera or camera for environments with dense crowds or obstacles that are easily blocked. No calibration of the camera is required. As long as the head image is complete, a relatively accurate positioning of the human body can be achieved. It can be applied to personnel positioning, crowd distribution measurement, intelligent lighting control, partitioned energy management and other fields, and has a wide range of uses.

[0048] Furthermore, the reasons for improving the YOLO v8s model are as follows: the YOLO v8s algorithm has a deeper network structure and more parameters, and the model is complex. Compared with other lightweight target detection algorithms, it has the problem of computing resource consumption, and the deployment cost in practical applications is high, so it needs to be lightweighted. In the Backbone part, the improved lightweight convolutional neural network ShuffleNet V2 is used as the backbone network to implement preliminary feature extraction, which can effectively reduce the amount of calculation and parameters; the CBAM attention mechanism module is added after the first convolution layer and the last convolution layer of the Backbone, so that the neural network pays more attention to the head information in the image, focusing on the feature acquisition of the head, thereby improving the feature extraction ability of the model.

[0049] Furthermore, the depth information of each pixel is predicted from the RGB image through the Monodepth2 model; the relative pose network is trained by inputting adjacent frame images, and the pose information is used for projection transformation to generate a reconstructed frame. The difference between the target frame and the reconstructed frame is calculated, and this difference is used as a training signal to achieve the purpose of self-supervised learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 Provide an overall flow chart for positioning single-camera personnel;

[0051] Figure 2 This is the improved YOLO v8s structure diagram;

[0052] Figure 3 Figure 2 is the deep network structure diagram of Monodepth2; Figure (a) is the network structure of the encoder; Figure (b) is the network structure of the decoder;

[0053] Figure 4 It is the structure diagram of radial basis function neural network;

[0054] Figure 5 This is the flow chart of real-time image pose calibration;

[0055] Figure 6 This is the improved YOLO v8s head detection effect diagram;

[0056] Figure 7 Figure 1 is the depth map of the Monodepth2 model; Figure (a) is the depth map output by the Monodepth2 depth estimation model in a laboratory environment; Figure (b) is the depth information corresponding to each pixel in this depth map;

[0057] Figure 8 Output result graph of radial basis function neural network;

[0058] Fig. 9 It is a feature matching effect diagram; Figure (a) is the image collected in real time; Figure (b) is the reference image;

[0059] Fig.10 Calibrate the effect diagram for real-time image acquisition;

[0060] Fig.11 Block diagram of a single-camera personnel positioning system that does not require calibration. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solution and advantages of the present invention more clear, the following is further described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the embodiments described are only part of the embodiments of the present invention, not all embodiments.

[0062] The components described and shown in the drawings and embodiments of the present invention may be arranged and designed in various configurations. Therefore, the detailed description of the embodiments of the present invention provided in the following drawings is not intended to limit the scope of the claimed invention, but merely represents a selected embodiment of the present invention. Based on the drawings and embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0063] It should be noted that the terms "comprises", "includes" or any other variations are intended to cover non-exclusive inclusion, so that a process, element, method, article or equipment that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to the process, element, method, article or equipment.

[0064] The features and performances of the present invention are further described in detail below in conjunction with the embodiments.

[0065] Generally speaking, a single camera cannot locate a person without depth information. The present invention achieves the purpose of single camera personnel positioning without the need to calibrate the camera by combining a personnel detection model, a depth estimation model, and a radial basis function neural network model.

[0066] like Figure 1 As shown, the present invention discloses a single-camera personnel positioning method that does not require calibration, comprising the following steps:

[0067] Step 1: Read a frame of RGB image from the camera or webcam regularly, and perform preliminary filtering and noise reduction processing to obtain a preprocessed image;

[0068] Specifically, a general network camera or webcam may be used and fixed at a certain position in the application scene space, or an existing monitoring network camera may be utilized.

[0069] Step 2: To avoid measurement errors caused by slight changes in the camera or camera pose, use reference image matching to generate the calibration pose matrix M, transform the image obtained by the camera or camera into a standard pose image using the M matrix, and then perform the following operations.

[0070] Step 3: Use the trained improved YOLO v8s model to detect people in the standard pose image, obtain the head detection anchor frame, and calculate the center pixel coordinates of the head in the head detection anchor frame, and use the center pixel coordinates as the human body pixel coordinates;

[0071] Step 4: Get the center pixel coordinates of the head in the head detection anchor frame, use the trained Monodepth2 depth estimation model, and output the depth value of the spatial point corresponding to the center pixel coordinates as the depth information from the human body to the image input device;

[0072] Step 5: Use the trained radial basis function neural network model, take the pixel coordinates of the human body obtained in step 2 and the depth information from the human body to the image input device obtained in step 4 as input, and output the real-world coordinates of the person's head, which can be regarded as the actual coordinates of the human body.

[0073] In step 1, median filtering is used for the preliminary filtering of the RGB image, and its neighborhood is set to 3×3 size. There are two reasons for this: first, the image is smoothed and denoised to eliminate the influence of noise; second, after median filtering, the median value of each pixel in the depth map within the 3×3 neighborhood can be obtained. When the depth value of the center point is obtained later, the influence of the pixels around this point can be taken into account, thereby ensuring the accuracy of the depth value at the center point pixel coordinates.

[0074] In step 3, the specific steps for training the improved YOLO v8s model are:

[0075] Step 3.1: Use the SCUT_HEAD large-scale head detection public dataset to merge Part A and Part B in the public dataset to expand the dataset and provide sufficient training data for model training;

[0076] Step 3.2: Create three folders: image, label, and dataset. Image is used to store images in jpg format. Label stores txt files corresponding to image information, including class, x_center, y_center, width, height format, representing the class, center point x, y coordinates, width and height of the image annotation. The dataset folder stores the automatically generated training set, test set, and validation set.

[0077] Step 3.3: Randomly divide the dataset into 70% training set, 20% validation set and 10% test set, generate test.txt, train.txt, val.txt files, and store them in the dataset folder.

[0078] Furthermore, the reasons for improving the YOLO v8s model are as follows: the YOLO v8s algorithm has a deeper network structure and more parameters, and the model is complex. Compared with other lightweight target detection algorithms, it has the problem of computing resource consumption and the deployment cost is high in practical applications, so it needs to be lightweighted.

[0079] Furthermore, if Figure 2 As shown in the figure, the YOLO v8s model is improved in the following two aspects:

[0080] (1) In the Backbone part, the improved lightweight convolutional neural network ShuffleNet V2 is used as the backbone network to implement preliminary feature extraction, which can effectively reduce the amount of calculation and the number of parameters;

[0081] ShuffleNet V2 contains two important units. The Shuffle-Net (1) basic unit splits the channels into two branches in any order. One branch does not perform any operation, and the other branch first performs a 1×1 convolution network to adjust the number of channels by conventional convolution. Then, two 3×3 depthwise separable convolutions are used to improve the receptive field, so that it can better extract features. Then, 1×1 convolution is applied again to adjust the number of channels so that the number of channels in the two branches is the same. The Shuffle-Net (2) basic unit downsampling unit includes two depthwise separable convolutions with a stride of 2, which can increase the receptive field, halve the size of the feature map, and double the number of channels. Finally, after channel shuffling, different channels are fully communicated and utilized.

[0082] (2) Add the CBAM attention mechanism module after the first convolutional layer and the last convolutional layer of Backbone, so that the neural network pays more attention to the head information in the image and focuses on acquiring the features of the head, thereby improving the feature extraction ability of the model.

[0083] Furthermore, the pixel coordinates of the center point of the head detection anchor box output by the improved YOLO v8s model can be regarded as the pixel coordinates of the person, that is, the pixel coordinates of the person are:

[0084] Center_x=round(detection[0]+detection[2] / 2)

[0085] Center_y=round(detection[1]+detection[3] / 2)

[0086] Where detection[0] and detection[1] are the x and y coordinates of the upper left corner of the head detection box, respectively. detection[2] and detection[3] are the width and height of the head detection box, respectively. The round function rounds the required value to the nearest integer.

[0087] In step 4, the reason for using the Monodepth2 depth estimation model is that the Monodepth2 model is a self-supervised monocular depth estimation method. By using a convolutional neural network, it can predict the depth information of each pixel from the RGB image. By inputting adjacent frame images, the relative pose network is trained, and the pose information is used for projection transformation to generate a reconstructed frame. The difference between the target frame and the reconstructed frame is calculated, and this difference is used as a training signal to achieve the purpose of self-supervised learning.

[0088] Further explanation of the Monodepth2 model: The Monodepth2 model consists of a deep network and a pose network. The deep network is based on the U-Net architecture and uses an encoder-decoder structure. The encoder is responsible for extracting features from the image, and the decoder maps these features to the depth space. Finally, the pose network is used to obtain the changes in the angle and position of the camera relative to the scene.

[0089] Furthermore, the Monodepth2 model uses the ResNet18 residual network as a deep encoder in the overall deep network architecture to reduce training and testing errors. Figure 3 As shown in (a), the RGB image first enters the Conv and BN layers for processing. The BN layer can normalize the input image to prevent the gradient from disappearing or exploding and speed up the training. Then it enters the Relu activation function and Maxpooling layer to compress the extracted features and simplify the network complexity. Layer1, Layer2, Layer3, and Layer4 have the same structure, all consisting of two residual blocks, and the activation function used inside is ELU. Figure 3 As shown in (b), the feature map output by the encoder is integrated and analyzed by the decoder. The decoding network structure is composed of 4 identical Upconv structures, which includes feature map fusion, multiple convolutional layers and upsampling process. The output of each Upconv uses the Sigmoid activation function, and the output result of the Sigmoid function in Upconv4 is converted into depth and constrained between 0.1 and 100 units. Finally, the image size output by Upconv4 is the same as the image size of the input image.

[0090] Furthermore, the pose network of the Monodepth2 model also includes encoding and decoding processes. Similar to the deep network, the encoder also uses the ResNet18 structure. In the pose encoding process, a pre-trained weight model is used to ensure that the numerical range of the single image entering the residual network after the convolution operation is the same, and the image features are finally output. The decoding network integrates the image features, first arranges the image features in rows, and performs multiple convolution operations. By scaling the matrix by 0.01, the axis angle matrix and the translation matrix are finally output, which can predict the translation and rotation of the camera position change.

[0091] Furthermore, the KITTI dataset is used to train the Monodepth2 model. In the present invention, a monocular mode of [-1, 0, 1] is used for training, where -1 represents the previous frame, 0 represents the current frame, and 1 represents the next frame.

[0092] In step 5, the radial basis function neural network model is used because the radial basis function neural network is suitable for solving complex nonlinear problems and can be used to approximate any continuous function. The radial basis function neural network can fit the nonlinear function of the input data through the radial basis function, and the output can be predicted based on this function.

[0093] Furthermore, the working principle of the radial basis function neural network is as follows: Figure 4 As shown in the figure, radial basis function neural network is usually divided into three layers, namely, input layer, hidden layer, and output layer. The input layer receives the original data; the hidden layer maps the input space to a high-dimensional space, and performs nonlinear transformation on the input original data through the radial basis function, so that the problem that is originally nonlinearly inseparable in the low-dimensional space becomes linearly separable in the high-dimensional space; the output layer performs linear combination to produce the final output.

[0094] The radial basis function in the present invention adopts a Gaussian function, and the formula is:

[0095]

[0096] In the formula, x m is the mth input sample, c i is the i-th center point, j is the number of nodes in the hidden layer, and n is the number of output samples or classifications. The output of the network can be obtained from the radial basis function neural network structure as follows:

[0097]

[0098] In the formula, ω represents the weight, p = 1, 2, ..., n.

[0099] Furthermore, the specific steps of radial basis function neural network model training are:

[0100] Step 5.1: Collect the RGB image of the person and process it to obtain the pixel coordinates and body depth information of the person;

[0101] Step 5.2: Keep the positions of the people unchanged and use a ruler to measure the actual coordinates of the center point of each person's head, which can represent the actual coordinates of the person;

[0102] Step 5.3: Repeat steps 5.1 to 5.2 to record more than 50 sets of pixel coordinates, human body depth information and actual coordinates of the person;

[0103] Step 5.3: Taking the pixel coordinates of the human body and the depth information of the human body as input and the coordinates of the position of the person in the world coordinate system as output, a radial basis function neural network model is trained;

[0104] Step 5.4: Train the radial basis function neural network with a training set to test set ratio of 7:3 until the test is qualified.

[0105] In step 2, the reason for calibrating the camera image is that the camera may be offset due to uncontrollable factors. For example, when the camera is installed on an unstable foundation, such as a loose wall or bracket, it may move due to wind or its own weight. Especially in outdoor environments, the camera may be offset due to extreme weather or other external forces. Once the camera is offset, the radial basis function neural network needs to be retrained, otherwise the output personnel coordinates will be biased. Therefore, the present invention corrects the captured image to the image corresponding to the standard posture of the camera and performs subsequent processing to avoid measurement errors caused by camera offset.

[0106] Furthermore, if Figure 5 As shown in Figure 2, the specific method for real-time image pose calibration is:

[0107] (1) Baseline RGB image preparation

[0108] ① After fixing the camera, collect an RGB image as the reference image, and the corresponding camera pose is the standard pose;

[0109] ② Determine a fixed area D within the camera's field of view, use it as the roi area, and record the roi coordinates;

[0110] ③ Perform mask processing outside the roi area, extract ORB features from the image within the roi area, and store key points and descriptors.

[0111] (2) Real-time RGB image acquisition

[0112] ① Collect RGB images in real time and obtain the ROI coordinate information of the reference image;

[0113] ② Find the circumscribed rectangle of this roi area, recorded as ROI, to prevent area D in the real-time image collected by the camera from crossing the original roi area due to movement;

[0114] ③ Perform mask processing outside the ROI area, and then perform ORB feature extraction within the ROI area.

[0115] (3) Feature matching between real-time collected images and reference images to achieve pose calibration of real-time collected images

[0116] ① Perform brute force matching on the descriptor of the ROI area of ​​the real-time acquired image and the descriptor of the ROI area of ​​the reference image to obtain the matching results of the two areas;

[0117] ② Through the key points of the two regions, solve the affine transformation matrix M (M is called the calibration matrix) from the real-time detection image to the reference image;

[0118] ③ Through the calibration matrix M, the real-time acquired image is converted into an image corresponding to the standard posture of the camera to realize the image calibration.

[0119] Furthermore, the calibration matrix M is an affine transformation matrix. According to the M matrix, the image can be translated and rotated to complete the image calibration. Assume that the linear transformation matrix is The translation vector is Then the M matrix can be expressed as:

[0120]

[0121] In the formula, a 00 、a 11 Determines the image scaling, a 01 、a 10 Determines the rotation angle of the image, b 00 、b 10 Determines how far to translate the image.

[0122] According to the linear transformation matrix A, the translation vector B and the original pixel coordinates (x, y), the pixel coordinates obtained after affine transformation are (x', y'), that is:

[0123]

[0124] like Figure 6 The figure below shows the effect of using the improved YOLO v8s head detection in a laboratory environment. The results show that in the case of easy occlusion in the laboratory, the improved YOLO v8s model can still accurately identify the head of a person, frame the head detection anchor frame, and mark the center pixel coordinates of the head. The center pixel coordinates are shown in the following table:

[0125] (Unit: px) Center pixel coordinates (x, y) 1 (865,773) 2 (217,435) 3 (678,424) 4 (1020,253) 5 (1345,271) 6 (806,258) 7 (653,129)

[0126] like Figure 7 (a) shows the depth map output by the Monodepth2 depth estimation model in a laboratory environment; Figure 7 (b) shows the depth information corresponding to each pixel in the depth map, from which the depth value of the person can be read.

[0127] like Figure 8 The following table shows the actual coordinates of each person predicted by the radial basis function neural network. The results show that the difference between the actual coordinates of each person relative to the ground measured by the ruler is within 200 mm, which can meet the positioning requirements of personnel in actual engineering applications. The following table shows the actual coordinates of the human body in the ground coordinate system and the actual coordinates of the human body relative to the ground predicted by the network when training the radial basis function network, and the variance is calculated.

[0128]

[0129] like Fig. 9 As shown in the figure, it is the effect of feature matching between the real-time collected image and the reference image in the laboratory environment. Fig. 9 (a) with Fig. 9 (b) The number and positions of people in the two pictures are different. Fig. 9 (b) is the reference image, the fixed area D is the blue light board, that is, the area framed by the purple rectangle is the ROI area of ​​the reference image; Fig. 9 (a) is the real-time captured image (the camera position is offset in the figure), and the purple rectangle is the ROI area, which is the area after the ROI is expanded to the minimum circumscribed rectangle.

[0130] like Fig.10 As shown, this is the image after posture calibration of the real-time laboratory image. It can be seen that the calibrated image is obviously closer to the field of view of the reference image, indicating that the image calibration is successful.

[0131] like Fig.11 As shown, the present invention also discloses a single-camera personnel positioning system that does not require calibration, including modules such as filtering, posture calibration, human body pixel coordinate calculation, human body depth information calculation and human body world coordinate output.

[0132] A filtering module is used to perform filtering and noise reduction processing on the image acquired by the camera to obtain a preprocessed image;

[0133] A posture calibration module is used to calibrate the preprocessed image and transform it into a standard posture image;

[0134] The human pixel coordinate calculation module uses the trained improved YOLO v8s model to detect people in standard pose images, obtain the head detection anchor frame, and calculate the center pixel coordinates of the head in the head detection anchor frame, and use the center pixel coordinates as the human pixel coordinates;

[0135] The human body depth information calculation module is used to obtain the center pixel coordinates of the human head in the head detection anchor frame, use the trained depth estimation model to calculate, and output the depth value of the space corresponding to the center pixel coordinates as the depth information from the human body to the camera;

[0136] The output module uses a trained radial basis function neural network model, takes the pixel coordinates of the human body and the depth information from the human body to the camera as input, and outputs the real-world coordinates of the person's head to obtain the actual coordinates of the human body.

[0137] The single-camera personnel positioning method without calibration disclosed in the present invention can be implemented in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention can be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0138] If the single-camera personnel positioning method that does not require calibration disclosed in the present invention is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals. The computer storage medium may be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid-state drives (SSDs), etc.).

[0139] In an exemplary embodiment, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the single-camera personnel positioning method that does not require calibration when executing the computer program. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.

[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A single-camera personnel positioning method that does not require calibration, characterized in that: The following steps are involved: Step 1: Obtain an image and perform filtering and noise reduction processing to obtain a preprocessed image; Step 2: Calibrate the preprocessed image and transform it into a standard pose image; Step 3: Use the trained improved YOLO v8s model to detect people in the standard pose image, obtain the head detection anchor frame, and calculate the center pixel coordinates of the head in the head detection anchor frame, and use the center pixel coordinates as the human body pixel coordinates; Step 4: Get the center pixel coordinates of the head in the head detection anchor frame, use the trained depth estimation model to calculate, and output the depth value of the spatial point corresponding to the center pixel coordinates as the depth information from the human body to the image input device; Step 5: Use the trained radial basis function neural network model, take the human body pixel coordinates obtained in step 3 and the depth information from the human body to the image input device obtained in step 4 as input, output the real world coordinates of the person's head, and then obtain the actual coordinates of the human body.

2. The method for locating personnel with a single camera without calibration according to claim 1, characterized in that: In step 1, median filtering is used for preliminary filtering.

3. The single-camera personnel positioning method that does not require calibration according to claim 1, characterized in that: Step 2 specifically includes the following steps: 2.

1. Obtain the coordinate information of the four vertices of the roi of the reference image, and find the minimum bounding rectangle corresponding to this roi area in the preprocessed image, which is recorded as the ROI area; 2.

2. Perform mask processing outside the ROI area, and then perform ORB feature extraction in the ROI area to obtain the key points and descriptors of the ROI area of ​​the real-time acquired image; 2.

3. Obtain the key points and descriptors of the roi area of ​​the reference image; The descriptor of the ROI area of ​​the real-time acquired image is violently matched with the descriptor of the ROI area of ​​the reference image to obtain the matching results of the two areas; 2.

4. By using the key points of the ROI area of ​​the real-time image and the key points of the ROI area of ​​the reference image, the affine transformation matrix M from the real-time image to the reference image is solved. M is called the calibration matrix. 2.

5. Through the calibration matrix M, the real-time acquired image is converted into the image corresponding to the standard posture of the camera to realize the image calibration.

4. The single-camera personnel positioning method that does not require calibration according to claim 3 is characterized in that: In 2.3, the process of establishing the key points and descriptors of the reference image roi area is as follows: After fixing the camera, collect an RGB image as the reference image, and the corresponding camera pose is the standard pose; Determine a fixed area D within the camera's field of view, use it as the roi area, and record the coordinate information of the four vertices of the roi; Mask processing is performed outside the roi area, ORB features are extracted from the image within the roi area, and key points and descriptors are stored.

5. The single-camera personnel positioning method that does not require calibration according to claim 1, characterized in that: In step 3, in the improved YOLO v8s model, in the Backbone part, the lightweight convolutional neural network ShuffleNet V2 is used as the backbone network to achieve preliminary feature extraction; Add the CBAM attention mechanism module after the first and last convolutional layers of Backbone.

6. The single-camera personnel positioning method that does not require calibration according to claim 1, characterized in that: In step 4, Monodepth2 is used as the depth estimation model.

7. The single-camera personnel positioning method that does not require calibration according to claim 1, characterized in that: In step 5, the radial basis function of the radial basis function neural network model adopts a Gaussian function, and the formula is: In the formula, x m is the mth input sample, c i is the i-th center point, j is the number of nodes in the hidden layer, and n is the number of output samples or classifications; The output of the radial basis function neural network model is: In the formula, ω represents the weight, p = 1, 2, ..., n.

8. A single-camera personnel positioning system that does not require calibration, characterized in that: include: A filtering module is used to perform filtering and noise reduction processing on the acquired image to obtain a preprocessed image; A posture calibration module is used to calibrate the preprocessed image and transform it into a standard posture image; The human pixel coordinate calculation module uses the trained improved YOLO v8s model to detect people in standard pose images, obtain the head detection anchor frame, and calculate the center pixel coordinates of the head in the head detection anchor frame, and use the center pixel coordinates as the human pixel coordinates; The human body depth information calculation module is used to obtain the central pixel coordinates of the human head in the head detection anchor frame, use the trained depth estimation model to calculate, and output the depth value of the space corresponding to the central pixel coordinates as the depth information from the human body to the image input device; The output module adopts the trained radial basis function neural network model, takes the pixel coordinates of the human body and the depth information from the human body to the image input device as input, outputs the real world coordinates of the person's head, and obtains the actual coordinates of the human body.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the single-camera personnel positioning method that does not require calibration are implemented as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the single-camera personnel positioning method without calibration as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Multi-camera human body recognition and positioning method and system, computer equipment, medium and program product

    CN118918613A

  • Dizziness lamp control method and system based on human body depth estimation and target detection

    CN120786770A

  • Dizziness lamp control method and system based on human body depth estimation and target detection

    CN120786770B

  • Monocular vision personnel positioning method and equipment for sheltered scene

    CN122530299A