A traffic analysis method and system based on face recognition
By combining Gaussian filtering preprocessing of facial images with global and local face recognition algorithms, facial feature information is extracted, which solves the problem of inability to accurately analyze traffic in existing technologies and implements a more accurate early warning solution.
Patent Information
- Application Number
- CN202510110269.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-01-23
AI Technical Summary
The existing traffic analysis based on face recognition cannot use appropriate face recognition algorithms to extract facial feature information according to image characteristics, resulting in the inability to provide accurate early warning solutions, especially when the regional traffic is too large.
The Gaussian smoothing filtering method is used to preprocess the face image, and the global and local face recognition algorithms are combined to extract feature information. The class label is obtained through Gabor filter and extraction block technology, and traffic analysis is performed to provide an early warning plan.
In the case of incomplete facial images, it is possible to extract feature information by setting the corresponding facial recognition algorithm, provide a more accurate traffic warning solution, and improve the accuracy of analysis and the effectiveness of warning.
Smart Images

Figure CN120088829B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a traffic analysis method and system based on face recognition. Background Art
[0002] With the development of image recognition technology, facial recognition technology has been applied to identity authentication, secure payment, security monitoring, traffic analysis and other aspects; the use of facial recognition technology for traffic analysis has been widely used in large shopping malls, scenic spots, amusement parks and other areas, providing strong data support for improving operational efficiency, enhancing security and improving user experience.
[0003] In the existing technology, the traffic analysis process based on facial recognition only uses facial recognition technology to analyze and count traffic and provide corresponding early warning solutions. When the traffic in the area is too large, it is impossible to use appropriate facial recognition algorithms to extract facial feature information based on image characteristics, and to perform traffic analysis based on relevant population characteristics to provide accurate early warning solutions. Summary of the Invention
[0004] The purpose of the present invention is to provide a traffic analysis method and system based on face recognition to solve the above-mentioned problems existing in the prior art.
[0005] The specific application is as follows:
[0006] A traffic analysis method based on face recognition is characterized in that it includes the following steps: Step 1: obtaining real-time video clips of a specific area and extracting several face images from the video clips; Step 2: preprocessing the face images; Step 3: judging whether the face images are complete, obtaining a first image and a second image, and obtaining feature information and class labels of the first image and the second image; Step 4: performing traffic analysis based on the feature information and class labels of the first image and the second image; Step 5: providing an early warning plan based on the traffic analysis results.
[0007] The second step: pre-processing the facial image includes using a Gaussian smoothing filtering method to perform a weighted average operation on the data points in the facial image area, eliminating high-frequency noise components, and analyzing the facial image.
[0008] Analyzing the facial image includes: using two wavelet transforms to process the real and imaginary parts of the facial image in parallel, separating the frequency subbands of the facial image to form a Hilbert transform pair, and performing Fourier transform on the Hilbert transform pair to obtain a processed facial image.
[0009] The step three of determining whether the facial image is complete, obtaining the first image and the second image, and obtaining feature information and class labels of the first image and the second image includes:
[0010] Determining whether the pre-processed facial image is complete to obtain a first image of a global facial image and a second image of a local facial image;
[0011] A global face recognition algorithm is used on the first image to extract features of the first image using a Gabor filter, and a first classifier is used to find a class label for the first image;
[0012] The second image adopts a local face recognition algorithm, performs feature extraction on the second image through extraction block technology, and uses a second classifier to find the class label of the second image.
[0013] The first image uses a global face recognition algorithm, extracts features of the first image using a Gabor filter, and uses a first classifier to find a class label for the first image, including:
[0014] Applying a Gabor filter to the first image and performing a convolution operation with the first image yields a set of coefficients for each pixel of the first image. The coefficients contain feature information of the first image at different scales and directions. Based on its characteristics in the spatial frequency domain, the filter accurately captures the texture details and shape features of the face, forming a high-dimensional feature vector. Dimensionality reduction is performed using principal component analysis to retain the main features of the data and remove redundant information, thereby obtaining a global feature vector for the first image.
[0015] The Gabor filter is a Gaussian kernel function modulated by a sinusoidal plane wave and is expressed as:
[0016]
[0017] Among them, ξ s,o (x, y) represents the Gaussian kernel function of the pixel coordinates (x, y) in the first image, s and o represent the scale and direction parameters respectively, and f s represents a frequency parameter related to scale, δ represents a spatial aspect ratio, x' and y' are coordinates after transformation related to direction, x'=xsinθ+ycosθ, y'=-xsinθ+ycosθ, and θ represents the direction of the filter; extracting features from the first image using a Gabor filter bank to obtain a set of coefficients for each pixel of the first image, and reducing the dimension of the feature vector using principal component analysis;
[0018] A classification model is constructed by using the global feature vector of the first image as the input of the first classifier, and the global feature vector of the first image is quickly classified according to its predetermined hidden layer weights and randomly generated hidden nodes to determine the first image class label.
[0019] The second image is subjected to a local face recognition algorithm, and features of the second image are extracted by using a block extraction technique. The second classifier is used to find a class label of the second image, which includes:
[0020] Applying a block extraction technique to the second image, analyzing phase information in a window of the second image at a selected frequency to perform phase quantization, obtaining local facial details, and performing a partitioning process on the second image to divide the second image, which has a size of pixels, into sub-blocks of appropriate sizes;
[0021] For each pixel in the second image, compute the short-time Fourier transform of the surrounding pixel neighborhood:
[0022]
[0023] Wherein, α, β represent spatial positions, u, v represent spatial frequencies, x1, y1 represent pixel coordinates of the second image, b(x1, y1) represents the original image intensity, and R(x1-α, y1-β) represents the window function at the pixel coordinate (x1-α, y1-β);
[0024] In the frequency domain, since the point spread function has specific characteristics in the low frequency band under the presence of occlusion, the phase analysis of the short-time Fourier transform of the specific low-frequency point is performed to obtain a fuzzy-insensitive result, and the real and imaginary parts of the frequency coefficients are binary quantized to convert them into a binary mode;
[0025] Partitioning the second image, dividing the face image of pixel size into sub-blocks of appropriate size, using an exhaustive search to determine non-overlapping and equally sized square blocks of pixels, wherein for each sub-block, the pixel value is determined by the pixel at the corresponding position in the original image, and a histogram is assigned to each image sub-block by using the decimal value of the second image pixel;
[0026] A histogram is assigned to each sub-block, and the histogram is used as input to the second classifier to construct a specific vector and dictionary. The coefficient vector is determined based on the structured data, the coefficient most relevant to the target category is screened out, and the residual calculation is performed to determine the class label to which it belongs.
[0027] The fourth step of obtaining feature information and class labels of the first and second images and performing traffic analysis includes:
[0028] Counting the class labels of the first image and the second image, merging the traffic data of the first image and the second image with the same class label, and obtaining the classified categories and traffic data of each category in the specific area;
[0029] According to the classified categories in the specific area and the traffic data under each category, the traffic data under each category is counted, the label category in the specific area and the traffic corresponding to the category are obtained, the traffic threshold is set, and the threshold is compared.
[0030] The setting of the flow threshold and the comparison of the threshold include:
[0031] When the flow data in the specific area is greater than a first threshold, the categories and flow data under each category are recorded to obtain flow analysis results and provide an early warning plan;
[0032] When the flow data in the specific area is less than a first threshold, recording the category and the flow data under each category;
[0033] When the traffic data under the category is less than a second threshold, the category and the traffic data under each category are recorded to obtain a traffic analysis result;
[0034] When the traffic data under the category is greater than a second threshold, the category and the traffic data under each category are recorded to obtain a traffic analysis result and provide an early warning plan;
[0035] The step five of providing an early warning plan based on the traffic analysis results includes: pushing a visual prompt window to relevant personnel to remind them to pay attention to traffic data and providing traffic control suggestions.
[0036] A traffic analysis system based on face recognition, used to implement the above-mentioned traffic analysis method based on face recognition, the system includes: a data acquisition module, a data preprocessing module, a feature extraction module, a traffic analysis module and a traffic warning module;
[0037] The data acquisition module obtains real-time video clips of a specific area and extracts several facial images from the video clips; the data preprocessing module preprocesses the facial images; the feature extraction module determines whether the facial images are complete, obtains a first image and a second image, and obtains feature information and class labels of the first and second images; the traffic analysis module performs traffic analysis based on the feature information and class labels of the first and second images; and the traffic warning module provides a warning plan based on the traffic analysis results.
[0038] Compared with the prior art, the embodiments of the present invention achieve the following beneficial effects:
[0039] The present invention obtains real-time video clips of a specific area, extracts several facial images from the video clips, pre-processes them, determines whether the facial images are complete, obtains a first image and a second image, obtains feature information and class labels of the first and second images, performs traffic analysis, and provides an early warning solution based on the traffic analysis results. When acquiring facial images, facing the situation that facial image acquisition may be incomplete, this application sets a corresponding facial recognition algorithm based on the characteristics of the facial image to extract facial feature information, sets a global facial recognition algorithm to perform feature extraction of complete facial images, sets a local facial recognition algorithm to perform feature extraction of incomplete facial images, and obtains class labels of facial images. Based on the relevant category features, traffic analysis is performed to provide a more accurate early warning solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flow chart of a traffic analysis method based on face recognition provided by an embodiment of the present invention;
[0041] Figure 2 This is a flow chart of setting a flow threshold and performing threshold comparison according to an embodiment of the present invention;
[0042] Figure 3 This is a schematic diagram of a traffic analysis system based on face recognition provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The present invention will be described in detail below with reference to the accompanying drawings.
[0044] Example 1
[0045] like Figure 1 As shown, the present application provides a traffic analysis method based on face recognition, comprising the following steps: Step 1: Acquire a real-time video clip of a specific area, and extract a number of face images from the video clip; Step 2: Preprocess the face images; Step 3: Determine whether the face images are complete, obtain a first image and a second image, and obtain feature information and class labels of the first image and the second image; Step 4: Perform traffic analysis based on the class labels of the first image and the second image; Step 5: Provide an early warning plan based on the traffic analysis results.
[0046] In the step one, the acquired facial image is used reasonably and legally; in the step two, the facial image is preprocessed, including using a Gaussian smoothing filtering method, performing a weighted average operation on the data points within the facial image area, eliminating high-frequency noise components, and analyzing the facial image.
[0047] Specifically, Gaussian filtering, as a linear smoothing technology, is based on performing weighted averaging operations on data points in a region to eliminate high-frequency noise components. Its advantage is that it can better preserve the original characteristic structure information of the point cloud data while ensuring effective denoising.
[0048] Analyzing the facial image includes: using two wavelet transforms to process the real and imaginary parts of the facial image in parallel, separating the frequency subbands of the facial image to form a Hilbert transform pair, and performing Fourier transform on the Hilbert transform pair to obtain a processed facial image.
[0049] The wavelet transform consists of two scaling functions φ h (t),φ g (t) and four wavelet basis functions ψ h,i (t), ψ g,i (t), where i = 1, 2, the wavelet basis function is offset by a units to form a Hilbert transform pair, the formula is as follows:
[0050]
[0051] Among them, ψ h,i (t), ψ g,i (t) represents the wavelet basis function associated with time t, where i = 1, 2, H[·] represents the Hilbert transform pair, and a is a constant representing the offset unit;
[0052] Analyze scaling functions and wavelet basis functions,
[0053]
[0054] Among them, h0(m) is a low-pass filter, h1(m) and h2(m) are high-pass filters; g0(m) is a low-pass filter, g1(m) and g2(m) are high-pass filters; the low-pass filter corresponds to two scaling functions φ h (t),φ g (t), the high-pass filter corresponds to the four wavelet basis functions ψ h,i (t), ψ g,i (t), where i = 1, 2;
[0055] In order to satisfy the Hilbert transform pair constraint, the Hilbert transform pair ψ g,1 (t)=H[ψ h,1 (t)],ψ g,2 (t)=H[ψ h,2 (t)] is Fourier transformed,
[0056]
[0057] Among them, h,i(ω), Ψ g,i (ω) is the Fourier transform of the wavelet basis function, i = 1, 2, j is the imaginary unit, ω is the normalized circular frequency, ω∈[-π, π].
[0058] The step three: judging whether the facial image is complete, obtaining a first image and a second image, and acquiring feature information and class labels of the first image and the second image include: judging whether the preprocessed facial image is complete, obtaining a first image of a global facial image and a second image of a local facial image; using a global facial recognition algorithm for the first image, performing feature extraction of the first image through a Gabor filter, and using a first classifier to search for the class label of the first image; using a local facial recognition algorithm for the second image, performing feature extraction of the second image through an extraction block technology, and using a second classifier to search for the class label of the second image.
[0059] The first image uses a global face recognition algorithm, extracts features of the first image using a Gabor filter, and uses a first classifier to find a class label for the first image, including:
[0060] Applying a Gabor filter to the first image and performing a convolution operation with the first image yields a set of coefficients for each pixel of the first image. The coefficients contain feature information of the first image at different scales and directions. Based on its characteristics in the spatial frequency domain, the filter accurately captures the texture details and shape features of the face, forming a high-dimensional feature vector. Dimensionality reduction is performed using principal component analysis to retain the main features of the data and remove redundant information, thereby obtaining a global feature vector for the first image.
[0061] Specifically, the Gabor filter is a Gaussian kernel function modulated by a sinusoidal plane wave, expressed as:
[0062]
[0063] Among them, ξ s,o (x, y) represents the Gaussian kernel function of the pixel coordinates (x, y) in the first image, s and o represent the scale and direction parameters respectively, and f s represents a frequency parameter related to scale, δ represents a spatial aspect ratio, x' and y' are coordinates after transformation related to direction, x'=xsinθ+ycosθ, y'=-xsinθ+ycosθ, θ represents the direction of the filter, which determines the filter's choice of texture direction; extracting features from the first image using a Gabor filter bank to obtain a set of coefficients for each pixel of the first image, and reducing the dimension of the feature vector using principal component analysis;
[0064] Using the global feature vector of the first image as input to the first classifier to build a classification model, and quickly classifying the global feature vector of the first image based on its predetermined hidden layer weights and randomly generated hidden nodes to determine the first image class label;
[0065] Specifically, the first classifier is composed of an input layer, a hidden layer and an output layer, and the global feature vector of the first input image is Z=[Z1, Z2...Z n ], the number of neurons in the input layer is equal to the feature dimension n of the input sample, the hidden layer has L neurons, F(·) is the activation function of the hidden layer, the weight matrix from the input layer to the hidden layer is W, the bias vector of the hidden layer is b, and the output matrix H of the hidden layer is:
[0066] H n,l =F(ω l ·Z n +b l )
[0067] Among them, ω l is the lth column of the weight matrix W, b l is the lth element of the bias vector b;
[0068] The target weight of the output layer is:
[0069]
[0070] Among them, λ represents the target weight of the output layer, T is the target output matrix, is the transpose of the output matrix.
[0071] The second image is subjected to a local face recognition algorithm, and features of the second image are extracted by using a block extraction technique. The second classifier is used to find a class label of the second image, which includes:
[0072] Applying a block extraction technique to the second image, analyzing phase information in a window of the second image at a selected frequency to perform phase quantization, obtaining local facial details, and performing a partitioning process on the second image to divide the second image, which has a size of pixels, into sub-blocks of appropriate sizes;
[0073] Specifically, for each pixel in the second image, the short-time Fourier transform of the surrounding pixel neighborhood is calculated:
[0074]
[0075] Wherein, α, β represent spatial positions, u, v represent spatial frequencies, x1, y1 represent pixel coordinates of the second image, b(x1, y1) represents the original image intensity, and R(x1-α, y1-β) represents the window function at the pixel coordinate (x1-α, y1-β);
[0076] In the frequency domain, since the point spread function has specific characteristics in the low frequency band under the presence of occlusion, the phase analysis of the short-time Fourier transform of the specific low-frequency point is performed to obtain a fuzzy-insensitive result, and the real and imaginary parts of the frequency coefficients are binary quantized to convert them into a binary mode;
[0077] Partitioning the second image, dividing the face image of pixel size into sub-blocks of appropriate size, using an exhaustive search to determine non-overlapping and equally sized square blocks of pixels, wherein for each sub-block, the pixel value is determined by the pixel at the corresponding position in the original image, and a histogram is assigned to each image sub-block by using the decimal value of the second image pixel;
[0078] Assigning a histogram to each of the sub-blocks, using the histogram as input to construct a specific vector and dictionary for the second classifier, determining a coefficient vector based on the structured data, screening out the coefficient most relevant to the target category, performing residual calculation, and determining the class label to which it belongs;
[0079] Specifically, for each of the sub-blocks b rc , and compare it with the sample set of all categories Association, where each category sample set consists of multiple samples of that category, and by connecting all category sample sets, the entire sample library dictionary of the block can be obtained;
[0080] Solve the minimization problem l1 to determine the coefficient vector and encode the category label of the sub-block;
[0081] l1: at the same time
[0082] in, represents the determined coefficient vector, Represents sub-block b rc The coefficient vector of It is represented as a sub-block of samples of the kth class, and ε is a constant;
[0083] Sub-block for the k-th class sample With sample set and coefficient vector The reconstructed results are compared to calculate the residual:
[0084]
[0085] in, Represents a sub-block The residual, represents the coefficient vector associated with the selection category;
[0086] Determine the category of the second image Where d(r,c) represents the category.
[0087] The fourth step of performing traffic analysis based on the feature information and class labels of the first and second images includes:
[0088] Counting the class labels of the first image and the second image, merging the traffic data of the first image and the second image with the same class label, and obtaining the classified categories and traffic data of each category in the specific area;
[0089] like Figure 2 As shown, according to the classified categories in the specific area and the traffic data under each category, the traffic data under each category is counted, the label category in the specific area and the traffic corresponding to the category are obtained, the traffic threshold is set, and the threshold is compared.
[0090] The setting of the flow threshold and the comparison of the thresholds include: when the flow data in the specific area is greater than a first threshold, recording the category and the flow data under each category, obtaining a flow analysis result, and providing an early warning plan; when the flow data in the specific area is less than the first threshold, recording the category and the flow data under each category; when the flow data under the category is less than a second threshold, recording the category and the flow data under each category, obtaining a flow analysis result; when the flow data under the category is greater than the second threshold, recording the category and the flow data under each category, obtaining a flow analysis result, and providing an early warning plan;
[0091] The step five of providing an early warning plan based on the traffic analysis results includes: pushing a visual prompt window to relevant personnel to remind them to pay attention to traffic data and providing traffic control suggestions.
[0092] Specifically, when the flow rate in a specific area exceeds the threshold, the visualization window can display the personnel label categories in the current area, the flow data under each category, and the control plan guidance. The visualization window shows that the flow rate in area A exceeds the threshold, and attention should be paid to the protection of the current area;
[0093] When the traffic in a specific area does not exceed the threshold, further analysis is conducted to determine whether a certain category of traffic data in the current area exceeds the threshold, and an early warning plan is given. For example, the visualization window shows that the traffic data with the label category of children in area B exceeds the threshold, prompting staff to pay attention to the key protection of children in the current area.
[0094] like Figure 3 As shown, the present application provides a traffic analysis system based on face recognition, which is used to implement the above-mentioned traffic analysis method based on face recognition. The system includes: a data acquisition module, a data preprocessing module, a feature extraction module, a traffic analysis module and a traffic warning module;
[0095] The data acquisition module obtains real-time video clips of a specific area and extracts several facial images from the video clips; the data preprocessing module preprocesses the facial images; the feature extraction module determines whether the facial images are complete, obtains a first image and a second image, and obtains feature information and class labels of the first and second images; the traffic analysis module performs traffic analysis based on the feature information and class labels of the first and second images; and the traffic warning module provides a warning plan based on the traffic analysis results.
[0096] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0097] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Accordingly, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the invention.
[0098] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.
Claims
1. A traffic analysis method based on face recognition, characterized in that: The following steps are involved: Step 1: Obtain a real-time video clip of a specific area and extract several face images from the video clip; Step 2: preprocessing the face image; Step 3: Determine whether the facial image is complete, obtain the first image and the second image, and acquire feature information and class labels of the first image and the second image; The step three includes: Determining whether the pre-processed facial image is complete to obtain a first image of a global facial image and a second image of a local facial image; A global face recognition algorithm is used on the first image to extract features of the first image using a Gabor filter, and a first classifier is used to find a class label for the first image; Applying a Gabor filter to the first image and performing a convolution operation with the first image yields a set of coefficients for each pixel of the first image. The coefficients contain feature information of the first image at different scales and directions. Based on its characteristics in the spatial frequency domain, the filter accurately captures the texture details and shape features of the face, forming a high-dimensional feature vector. Dimensionality reduction is performed using principal component analysis to retain the main features of the data and remove redundant information, thereby obtaining a global feature vector for the first image. The Gabor filter is a Gaussian kernel function modulated by a sinusoidal plane wave and is expressed as: Among them, ξ s,o (x, y) represents the Gaussian kernel function of the pixel coordinates (x, y) in the first image, s and o represent the scale and direction parameters respectively, and f s represents the frequency parameter related to the scale, δ represents the spatial aspect ratio, and x ’ and y ’ are coordinates after transformation related to direction, x'=xsinθ+ycosθ, y'=-xsinθ+ycosθ, where θ represents the direction of the filter; performing feature extraction on the first image using a Gabor filter bank to obtain a set of coefficients for each pixel of the first image, and reducing the dimension of the feature vector using principal component analysis; Using the global feature vector of the first image as input to the first classifier to build a classification model, and quickly classifying the global feature vector of the first image based on its predetermined hidden layer weights and randomly generated hidden nodes to determine the first image class label; The second image uses a local face recognition algorithm to extract features of the second image through a block extraction technique, and uses a second classifier to find a class label for the second image; Applying a block extraction technique to the second image, analyzing phase information in a window of the second image at a selected frequency to perform phase quantization and obtain local facial details, performing a partitioning process on the second image to divide the second image, which is sized as pixels, into sub-blocks of appropriate sizes; and assigning a histogram to each image sub-block by using decimal values of the pixels of the second image; Assigning a histogram to each of the sub-blocks, using the histogram as input to construct a specific vector and dictionary for the second classifier, determining a coefficient vector based on the structured data, screening out the coefficient most relevant to the target category, performing residual calculation, and determining the class label to which it belongs; Step 4: Perform traffic analysis based on the feature information and class labels of the first and second images; Step 5: Provide an early warning plan based on the traffic analysis results.
2. The traffic analysis method based on face recognition according to claim 1 is characterized in that: The second step: pre-processing the facial image includes using a Gaussian smoothing filtering method to perform a weighted average operation on the data points in the facial image area, eliminating high-frequency noise components, and analyzing the facial image.
3. The traffic analysis method based on face recognition according to claim 2 is characterized in that: Analyzing the facial image includes: using two wavelet transforms to process the real and imaginary parts of the facial image in parallel, separating the frequency subbands of the facial image to form a Hilbert transform pair, and performing Fourier transform on the Hilbert transform pair to obtain a processed facial image.
4. The traffic analysis method based on face recognition according to claim 1, characterized in that: The second image is subjected to a local face recognition algorithm, and features of the second image are extracted by using a block extraction technique. The second classifier is used to find a class label of the second image, which includes: For each pixel in the second image, compute the short-time Fourier transform of the surrounding pixel neighborhood: Wherein, α, β represent spatial positions, u, v represent spatial frequencies, x1, y1 represent pixel coordinates of the second image, b(x1, y1) represents the original image intensity, and R(x1-α, y1-β) represents the window function at the pixel coordinate (x1-α, y1-β); In the frequency domain, since the point spread function in the presence of occlusion has specific characteristics in the low-frequency band, phase analysis is performed on the short-time Fourier transform of the specific low-frequency point to obtain a blur-insensitive result, and the real and imaginary parts of the frequency coefficients are binary quantized to convert them into binary modes; the second image is partitioned, and the face image of pixel size is divided into sub-blocks of appropriate size. Non-overlapping and equal-sized pixel square blocks are determined through exhaustive search. For each sub-block, its pixel value is determined by the pixel at the corresponding position of the original image.
5. The traffic analysis method based on face recognition according to claim 1 is characterized in that: The fourth step of obtaining feature information and class labels of the first and second images and performing traffic analysis includes: Counting the class labels of the first image and the second image, merging the traffic data of the first image and the second image with the same class label, and obtaining the classified categories and traffic data of each category in the specific area; According to the classified categories in the specific area and the traffic data under each category, the traffic data under each category is counted, the label category in the specific area and the traffic corresponding to the category are obtained, the traffic threshold is set, and the threshold is compared.
6. The traffic analysis method based on face recognition according to claim 5 is characterized in that: The setting of the flow threshold and the comparison of the threshold include: When the flow data in the specific area is greater than a first threshold, the categories and flow data under each category are recorded to obtain flow analysis results and provide an early warning plan; When the flow data in the specific area is less than a first threshold, recording the category and the flow data under each category; When the traffic data under the category is less than a second threshold, the category and the traffic data under each category are recorded to obtain a traffic analysis result; When the flow data under the category is greater than the second threshold, the category and the flow data under each category are recorded, a flow analysis result is obtained, and an early warning plan is given.
7. The traffic analysis method based on face recognition according to claim 1, characterized in that: The step 5 of providing an early warning solution based on the traffic analysis results includes: Push a visual prompt window to relevant personnel to remind them to pay attention to traffic data and provide traffic control suggestions.
8. A traffic analysis system based on face recognition, characterized in that: A method for analyzing traffic based on face recognition according to any one of claims 1 to 7, wherein the system comprises: a data acquisition module, a data preprocessing module, a feature extraction module, a traffic analysis module, and a traffic warning module; The data acquisition module obtains real-time video clips of a specific area and extracts several facial images from the video clips; the data preprocessing module preprocesses the facial images; the feature extraction module determines whether the facial images are complete, obtains a first image and a second image, and obtains feature information and class labels of the first and second images; the traffic analysis module performs traffic analysis based on the feature information and class labels of the first and second images; and the traffic warning module provides a warning plan based on the traffic analysis results.
Citation Information
Patent Citations
Crowd density estimation system and method under multi-camera condition
CN110543867A
Flow analysis method based on human and object weight identification
CN114463783A