Flow analysis method and system based on face recognition
By using global and local face recognition algorithms to extract face feature information in the traffic analysis technology of face recognition, the problem of the inability to extract features under high traffic in the existing technology is solved, and more accurate traffic analysis and early warning is achieved.
Patent Information
- Application Number
- CN202510110269.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-01-23
AI Technical Summary
The existing traffic analysis technology based on face recognition cannot effectively extract facial feature information when the traffic in the area is too large, resulting in the inability to give an accurate warning plan.
By obtaining real-time video clips of a specific area, extracting face images and pre-processing, we can judge whether the face image is complete, and using global and local face recognition algorithms to extract feature information and class tags of complete and incomplete face images, perform traffic analysis and provide early warning plans.
It realizes accurate extraction of facial feature information under high traffic conditions, conducts accurate traffic analysis and early warning, and improves the accuracy and effectiveness of traffic analysis.
Smart Images

Figure CN120088829A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular, to a traffic analysis method and system based on face recognition. Background Art
[0002] With the development of image recognition technology, face recognition technology has been applied to aspects such as identity verification, secure payment, security monitoring, traffic analysis, etc.; traffic analysis using face recognition technology has been widely used in areas such as large shopping malls, scenic spots, amusement parks, etc., providing strong data support for improving operation efficiency, enhancing security, and improving user experience.
[0003] In the prior art, in the process of traffic analysis based on face recognition, only face recognition technology is used alone for traffic analysis and statistics and corresponding warning schemes are given; when facing excessive traffic in a region, it is impossible to use a suitable face recognition algorithm to extract face feature information according to the image characteristics and give an accurate warning scheme based on relevant population characteristics. 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 problems existing in the prior art.
[0005] Specifically, this application is as follows:
[0006] A traffic analysis method based on face recognition, characterized by including the following steps: Step 1: Obtain real-time video clips of a specific area, and extract a plurality of face images from the video clips; 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 the feature information and class labels of the first image and the second image; Step 4: Perform traffic analysis through the feature information and class labels of the first image and the second image; Step 5: Give a warning scheme for the traffic analysis result.
[0007] The Step 2: Preprocessing the face images includes using a Gaussian filtering smoothing method to perform a weighted average operation on data points within the face image area, removing high-frequency noise components, and analyzing the face images.
[0008] Analyzing the face images includes: respectively using two wavelet transforms to process the real part and the imaginary part of the face images in parallel, separating the face image frequency subbands, forming a Hilbert transform pair, and performing a Fourier transform on the Hilbert transform pair to obtain the processed face images.
[0009] Step 3: Determine whether the face image is complete, obtain a first image and a second image, and acquire the feature information and class label of the first image and the second image, including:
[0010] Judge whether the preprocessed face image is complete to obtain a first image of the global face image and a second image of the local face image;
[0011] For the first image, use a global face recognition algorithm to extract the features of the first image through a Gabor filter, and use a first classifier to find the class label of the first image;
[0012] For the second image, use a local face recognition algorithm to extract the features of the second image through a patch extraction technique, and use a second classifier to find the class label of the second image.
[0013] For the first image, use a global face recognition algorithm to extract the features of the first image through a Gabor filter, and use a first classifier to find the class label of the first image, including:
[0014] Apply the Gabor filter to the first image. Through convolution operation with the first image, a set of coefficients can be obtained for each pixel of the first image. The coefficients contain the feature information of the first image at different scales and directions. According to the characteristics in the spatial frequency domain, accurately capture the texture details and shape features of the face, form a high-dimensional feature vector, and use principal component analysis for dimensionality reduction to retain the main features of the data and remove redundant information to obtain the global feature vector of the first image;
[0015] The Gabor filter is a Gaussian kernel function modulated by a sine plane wave, expressed as:
[0016]
[0017] where ξ s,o (x, y) represents the Gaussian kernel function of the pixel coordinates (x, y) in the first image, s and o respectively represent the scale and direction parameters, f s represents the frequency parameter related to the scale, δ represents the spatial aspect ratio, x' and y' are the transformed coordinates related to the direction, x' = xsinθ + ycosθ, y' = -xsinθ + ycosθ, and θ represents the direction of the filter; Extract the features of the first image using a Gabor filter bank, obtain a set of coefficients for each pixel of the first image, and use principal component analysis to reduce the dimensionality of the feature vector;
[0018] Construct a classification model by using the global feature vector of the first image as the input of the first classifier. According to its pre-determined hidden layer weights and randomly generated hidden nodes, quickly classify the global feature vector of the first image to determine the class label of the first image.
[0019] The second image uses a local face recognition algorithm. The feature extraction of the second image is performed through a block extraction technique. Using a second classifier to find the class label of the second image includes:
[0020] Apply the block extraction technique to the second image. Based on the analysis of the phase information in the window of the second image at a selected frequency, perform phase quantization to obtain local face details, partition the second image, and divide the second image with pixel size into appropriately sized sub-blocks;
[0021] For each pixel in the second image, calculate the short-time Fourier transform of the surrounding pixel neighborhood:
[0022]
[0023] where α, β represent spatial positions, u, v represent spatial frequencies, x 1 , y 1 represent the pixel coordinates of the second image, b(x 1 , y 1 ) represents the original image intensity, and R(x 1 - α, y 1 - β) represents the window function at the pixel coordinates (x 1 - α, y 1 - β);
[0024] In the frequency domain, since the point spread function in the presence of occlusion has specific characteristics in the low frequency band, perform phase analysis on the short-time Fourier transform of specific low frequency points to obtain a result insensitive to blur, perform binary quantization on the real and imaginary parts of the frequency coefficients, and convert them into binary patterns;
[0025] Perform the partitioning of the second image. Divide the face image with pixel size into appropriately sized sub-blocks. Determine non-overlapping and equal-sized pixel square blocks through exhaustive search. For each sub-block, its pixel value is determined by the pixel at the corresponding position in the original image. By using the decimal value of the pixels of the second image, assign a histogram to each image sub-block;
[0026] Assign a histogram to each of the sub-blocks. The histogram is used as the input of the second classifier to construct a specific vector and dictionary. Determine the coefficient vector based on the structured data, screen out the coefficients most relevant to the target class, perform residual calculation, and determine its class label.
[0027] Step 4: Obtain the feature information and class labels of the first image and the second image, and perform traffic analysis, including:
[0028] Statistically analyze the class labels of the first image and the second image, and merge the traffic data of the first image and the second image under the same class label to obtain the classified categories in a specific area and the traffic data under each category;
[0029] According to the classified categories in the specific area and the traffic data under each category, statistically analyze the traffic data under each category, obtain the label categories in the specific area and the traffic corresponding to the categories, set a traffic threshold, and compare the thresholds.
[0030] The setting of the traffic threshold and the comparison of the thresholds include:
[0031] When the traffic data in the specific area is greater than the first threshold, record the category and the traffic data under each category, obtain the traffic analysis result, and give a warning plan;
[0032] When the traffic data in the specific area is less than the first threshold, record the category and the traffic data under each category;
[0033] When the traffic data under the category is less than the second threshold, record the category and the traffic data under each category, obtain the traffic analysis result;
[0034] When the traffic data under the category is greater than the second threshold, record the category and the traffic data under each category, obtain the traffic analysis result, and give a warning plan;
[0035] Step 5: The warning plan given for the traffic analysis result includes: pushing a visual prompt window to relevant personnel to remind them to pay attention to the traffic data and giving traffic control suggestions.
[0036] A traffic analysis system based on face recognition is used to implement the above-mentioned traffic analysis method based on face recognition. The system includes: a data collection module, a data preprocessing module, a feature extraction module, a traffic analysis module, and a traffic warning module;
[0037] The data collection module obtains real-time video clips of a specific area and extracts several face images from the video clips; the data preprocessing module preprocesses the face images; the feature extraction module determines whether the face images are complete, obtains the first image and the second image, and obtains the feature information and class labels of the first image and the second image; the traffic analysis module performs traffic analysis through the feature information and class labels of the first image and the second image; the traffic warning module gives a warning plan for the traffic analysis result.
[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 face images from the video clips, preprocesses them, determines whether the face images are complete, obtains a first image and a second image, obtains the feature information and class labels of the first image and the second image, performs traffic analysis, and gives an early warning plan according to the traffic analysis result. When obtaining face images, in the face of the possible incomplete situation of face image acquisition, the present application sets corresponding face recognition algorithms according to the characteristics of face images to extract face feature information, sets a global face recognition algorithm to extract the features of complete face images, sets a local face recognition algorithm to extract the features of incomplete face images, obtains the class labels of face images, and performs traffic analysis according to relevant category features to give a more accurate early warning plan. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a schematic flowchart of a traffic analysis method based on face recognition provided by an embodiment of the present invention;
[0041] Figure 2 is a schematic flowchart of setting a traffic threshold and comparing the thresholds provided by an embodiment of the present invention;
[0042] Figure 3 is a schematic diagram of a traffic analysis system based on face recognition provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] The present invention will be described in detail below with reference to the accompanying drawings.
[0044] Embodiment 1
[0045] As Figure 1 shown, the present application provides a traffic analysis method based on face recognition, including the following steps: Step 1: Obtain real-time video clips of a specific area, and extract several face images from the video clips; 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 the feature information and class labels of the first image and the second image; Step 4: Perform traffic analysis through the class labels of the first image and the second image; Step 5: Give an early warning plan according to the traffic analysis result.
[0046] In the first step, the obtained face image is used in a reasonable and legal manner; in the second step: the preprocessing of the face image includes using the Gaussian filtering smoothing method to perform a weighted average operation on the data points in the face image area, removing high-frequency noise components, and analyzing the face image.
[0047] Specifically, as a linear smoothing technique, the core of Gaussian filtering is to perform a weighted average operation on the data points in the area, thereby removing high-frequency noise components. Its advantage is that while ensuring effective noise reduction, it can better preserve the original feature structure information of the point cloud data.
[0048] The analysis of the face image includes: respectively using two wavelet transforms to process the real part and the imaginary part of the face image in parallel, separating the frequency sub-bands of the face image, forming a Hilbert transform pair, and performing a Fourier transform on the Hilbert transform pair to obtain the processed face image.
[0049] The wavelet transform is composed 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 functions are offset by a unit to form a Hilbert transform pair. The formula is as follows:
[0050]
[0051] Among them, ψ h,i (t), ψ g,i (t) represent wavelet basis functions related to time t, where i = 1, 2. H[·] represents the Hilbert transform pair, and a is a constant representing the offset unit;
[0052] Analyze the scaling function and the wavelet basis function,
[0053]
[0054] Among them, h 0 (m) is a low-pass filter, h 1 (m), h 2 (m) are high-pass filters; g 0 (m) is a low-pass filter, g 1 (m), g 2 (m) are high-pass filters; the low-pass filter corresponds to 2 scaling functions φ h (t), φ g (t), and the high-pass filter corresponds to 4 wavelet basis functions ψ h,i (t), ψ g,i (t), where i = 1, 2;
[0055] To satisfy the constraints of the Hilbert transform pair, perform Fourier transform on the Hilbert transform pair ψ g,1 (t) = H[ψ h,1 (t)], ψ g,2 (t) = H[ψ h,2 (t)].
[0056]
[0057] where Ψ h,i (ω), Ψ g,i (ω) are the Fourier transforms of the wavelet basis functions, i = 1, 2, j is the imaginary unit, ω is the normalized circular frequency, and ω ∈ [-π, π].
[0058] The third step: Determine whether the face image is complete to obtain the first image and the second image, and acquire the feature information and class labels of the first image and the second image, including: Judging whether the preprocessed face image is complete to obtain the first image of the global face image and the second image of the local face image; The first image uses a global face recognition algorithm, extracts the features of the first image through a Gabor filter, and uses a first classifier to find the class label of the first image; The second image uses a local face recognition algorithm, extracts the features of the second image through a patch extraction technique, and uses a second classifier to find the class label of the second image.
[0059] The first image uses a global face recognition algorithm, extracts the features of the first image through a Gabor filter, and uses a first classifier to find the class label of the first image, including:
[0060] The Gabor filter is applied to the first image. Through convolution operation with the first image, a set of coefficients can be obtained for each pixel of the first image. The coefficients contain the feature information of the first image at different scales and directions. According to the characteristics in the spatial frequency domain, the texture details and shape features of the face are accurately captured to form a high-dimensional feature vector. Use principal component analysis for dimensionality reduction, retain the main features of the data, remove redundant information, and obtain the global feature vector of the first image;
[0061] Specifically, the Gabor filter is a Gaussian kernel function modulated by a sine plane wave, expressed as:
[0062]
[0063] where ξ s,o (x, y) represents the Gaussian kernel function of the pixel coordinates (x, y) in the first image, s and o respectively represent the scale and direction parameters, f sLet \(\omega\) denote the scale-related frequency parameter, \(\delta\) denote the spatial aspect ratio, \(x'\) and \(y'\) be the transformed coordinates related to the direction, where \(x' = x\sin\theta + y\cos\theta\), \(y'=-x\sin\theta + y\cos\theta\), and \(\theta\) represents the direction of the filter, which determines the selection of the filter for the texture direction; the first image is subjected to feature extraction using a Gabor filter bank to obtain a set of coefficients for each pixel of the first image, and principal component analysis is used to reduce the dimension of the feature vectors;
[0064] Using the global feature vector of the first image as the input of the first classifier to construct a classification model, and based on its pre-determined hidden layer weights and randomly generated hidden nodes, quickly classify the global feature vector of the first image to determine the class label of the first image;
[0065] Specifically, the first classifier consists of an input layer, a hidden layer, and an output layer. The global feature vector of the input first image is \(Z = [Z 1 ,Z 2 ……Z n . The number of neurons in the input layer is equal to the feature dimension \(n\) of the input samples. The hidden layer has \(L\) neurons. \(F(\cdot)\) is the activation function of the hidden layer. The weight matrix from the input layer to the hidden layer is \(W\), and the bias vector of the hidden layer is \(b\). The output matrix \(H\) of the hidden layer is:
[0066] H n,l =F(\omega l \cdot Z n +b l )
[0067] where \(\omega l is the \(l\)-th column of the weight matrix \(W\), and \(b l is the \(l\)-th element of the bias vector \(b\);
[0068] The target weight of the output layer is:
[0069]
[0070] where \(\lambda\) 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 uses a local face recognition algorithm. Feature extraction of the second image is performed through the extraction block technique. Finding the class label of the second image using the second classifier includes:
[0072] Applying the extraction block technique to the second image, based on analyzing the phase information in the window of the second image at a selected frequency to achieve phase quantization, obtaining local face details, performing partition processing on the second image, and dividing the second image with pixel size into appropriately sized sub-blocks;
[0073] Specifically, for each pixel in the second image, calculate the short-time Fourier transform of the surrounding pixel neighborhood:
[0074]
[0075] where α, β represent spatial positions, u, v represent spatial frequencies, and x 1 , y 1 represent the pixel coordinates of the second image, b(x 1 , y 1 ) represents the original image intensity, and R(x 1 - α, y 1 - β) represents the window function at the pixel coordinates (x 1 - α, y 1 - β);
[0076] In the frequency domain, since the point spread function in the presence of occlusion has specific characteristics in the low-frequency band, perform phase analysis on the short-time Fourier transform of specific low-frequency points to obtain a result insensitive to blur, and perform binary quantization on the real and imaginary parts of the frequency coefficients to convert them into binary patterns;
[0077] Partition the second image, divide the face image of pixel size into appropriately sized sub-blocks, determine non-overlapping and equal-sized pixel square blocks through exhaustive search. For each sub-block, its pixel values are determined by the pixels at the corresponding positions in the original image, and a histogram is assigned to each image sub-block by using the decimal values of the pixels in the second image;
[0078] Assign a histogram to each of the sub-blocks. The histogram is used as the input to the second classifier to construct a specific vector and dictionary, determine the coefficient vector based on the structured data, screen out the coefficients most relevant to the target category, perform residual calculation, and determine its class label;
[0079] Specifically, for each of the sub-blocks b rc , associate it with the sample sets of all categories , where each category sample set consists of multiple samples of that category. Connect all the category sample sets to obtain the entire sample library dictionary of the block;
[0080] Solve the minimization problem l 1 to determine the coefficient vector and encode the class label of the sub-block;
[0081] l 1 : Meanwhile
[0082] where Denote the determined coefficient vector, Denote the coefficient vector of sub-block b rc ; Denote as the sub-block of the k-th class sample, where ε is a constant;
[0083] For the sub-block of the k-th class sample and the sample set and the coefficient vector Compare the reconstruction result to calculate the residual:
[0084]
[0085] where, Denote the residual of sub-block ; Denote the coefficient vector selected related to the category;
[0086] Judge that the category to which the second image belongs is where d(r, c) represents the category to which it belongs.
[0087] The fourth step: Through the feature information and class labels of the first image and the second image, perform traffic analysis including:
[0088] Statistically analyze the class labels of the first image and the second image, and merge the traffic data under the same class labels of the first image and the second image to obtain the classified categories in the specific area and the traffic data under each category;
[0089] As Figure 2 shown, according to the classified categories in the specific area and the traffic data under each category, statistically analyze the traffic data under each category, obtain the label categories in the specific area and the traffic corresponding to the categories, set a traffic threshold, and compare the thresholds.
[0090] The setting of the traffic threshold and the comparison of the thresholds include: When the traffic data in the specific area is greater than the first threshold, record the category and the traffic data under each category, obtain the traffic analysis result, and give an early warning plan; When the traffic data in the specific area is less than the first threshold, record the category and the traffic data under each category; When the traffic data under the category is less than the second threshold, record the category and the traffic data under each category, obtain the traffic analysis result; When the traffic data under the category is greater than the second threshold, record the category and the traffic data under each category, obtain the traffic analysis result, and give an early warning plan;
[0091] The fifth step of giving an early warning plan for the traffic analysis result includes: Push a visual prompt window to relevant personnel to remind them to pay attention to the traffic data and give traffic control suggestions.
[0092] Specifically, when the traffic in a specific area exceeds the threshold, the visualization window can display the personnel label categories in the current area, the traffic data under each category, and the control scheme guidance. The visualization window shows that the traffic 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 analyze whether the traffic data of a certain category in the current area exceeds the threshold, and give a warning scheme. For example, the visualization window shows that the traffic data of the label category of children in area B exceeds the threshold, prompting the staff to pay attention to the key protection of children in the current area.
[0094] As Figure 3 shown, the present application provides a traffic analysis system based on face recognition for implementing 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 acquires real-time video clips of a specific area and extracts a number of face images from the video clips; the data preprocessing module preprocesses the face images; the feature extraction module determines whether the face images are complete, obtains a first image and a second image, and acquires the feature information and class labels of the first image and the second image; the traffic analysis module performs traffic analysis through the feature information and class labels of the first image and the second image; the traffic warning module gives a warning scheme for the traffic analysis result.
[0096] In the specification provided herein, a large number of specific details are set forth. 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 technologies have not been shown in detail so as not to obscure the understanding of this specification.
[0097] Similarly, it should be understood that, in order to streamline this disclosure and assist in understanding one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting the intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all the features of the preceding single embodiment. Thus, 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 present invention.
[0098] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments and not others, combinations of features of different embodiments are meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments can 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: obtaining a real-time video clip of a specific area, and extracting a number of face images from the video clip; Step 2: preprocessing the face image; Step 3: Determine whether the face 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; Step 4: Perform traffic analysis based on the feature information and class labels of the first image and the second image; Step 5: Provide an early warning plan based on the traffic analysis results.
2. According to claim 1, a traffic analysis method based on face recognition is characterized in that: The step 2: preprocessing the face image includes using a Gaussian filter smoothing method to perform a weighted average operation on data points in the face image area, eliminating high-frequency noise components, and analyzing the face image.
3. According to claim 2, a traffic analysis method based on face recognition is characterized in that: Analyzing the face image includes: using two wavelet transforms to process the real part and the imaginary part of the face image in parallel, separating the frequency subbands of the face image to form a Hilbert transform pair, and performing Fourier transform on the Hilbert transform pair to obtain a processed face image.
4. The method for traffic analysis based on face recognition according to claim 1, characterized in that: The step three: determining whether the face 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 include: Determining whether the preprocessed face image is complete, and obtaining a first image of a global face image and a second image of a local face image; The first image uses a global face recognition algorithm, extracts features of the first image through a Gabor filter, and uses a first classifier to find a class label of the first image; The second image uses a local face recognition algorithm, extracts features of the second image through extraction block technology, and uses a second classifier to find a class label of the second image.
5. The traffic analysis method based on face recognition according to claim 4 is characterized in that: The first image uses a global face recognition algorithm, extracts features of the first image through a Gabor filter, and uses a first classifier to find a class label of the first image, including: A Gabor filter is applied to the first image, and a convolution operation is performed with the first image. A set of coefficients can be obtained for each pixel of the first image, and the coefficients contain feature information of the first image in different scales and directions. According to the characteristics in the spatial frequency domain, the texture details and shape features of the face are accurately captured to form a high-dimensional feature vector. The principal component analysis is used to reduce the dimension, retain the main features of the data, remove redundant information, and obtain the global feature vector of 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 a frequency parameter related to scale, δ represents a spatial aspect ratio, x' and y' are transformed coordinates related to direction, x'=xsinθ+ycosθ, y'=-xsinθ+ycosθ, θ 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; The global feature vector of the first image is used as the input of the first classifier to build a classification model, 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.
6. The method for traffic analysis based on face recognition according to claim 4, characterized in that: The second image uses a local face recognition algorithm, extracts features of the second image by using a block extraction technique, and uses a second classifier to find a class label of the second image, including: The extraction block technology is applied to the second image, based on analyzing the phase information in the second image window at the selected frequency, phase quantization is implemented to obtain local facial details, and the second image is partitioned to divide the second image with a size of pixels into sub-blocks of appropriate sizes; 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 coordinates (x1-α, y1-β); In the frequency domain, since the point spread function in the presence of occlusion has specific characteristics in the low frequency band, the short-time Fourier transform of the specific low-frequency point is phase analyzed to obtain the blur-insensitive result, and the real and imaginary parts of the frequency coefficients are binary quantized to convert them into binary mode; Partitioning the second image, dividing the face image of pixel size into sub-blocks of appropriate size, using non-overlapping and equal-sized square blocks of pixels to be determined by exhaustive search, for each sub-block, its pixel value is determined by the pixel at the corresponding position of the original image, and a histogram is assigned to each image sub-block by using the decimal value of the pixel of the second image; A histogram is assigned to each of the sub-blocks, and the histogram is used as the input of the second classifier to construct a specific vector and dictionary, determine the coefficient vector based on the structured data, screen out the coefficient most relevant to the target category, perform residual calculation, and determine the class label to which it belongs.
7. The traffic analysis method based on face recognition according to claim 1 is characterized in that: The step 4: obtaining feature information and class labels of the first image and the second image and performing traffic analysis includes: The class labels of the first image and the second image are counted, and the traffic data of the first image and the second image under the same class label are merged to obtain the classified categories and traffic data under 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.
8. The traffic analysis method based on face recognition according to claim 7 is characterized in that: The setting of the flow threshold and comparing the thresholds includes: 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 flow data under the category is less than the second threshold, the category and the flow data under each category are recorded to obtain a flow 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.
9. The method for traffic analysis based on face recognition according to claim 1, characterized in that: The step 5 provides an early warning solution for the traffic analysis result, including: Push a visual prompt window to relevant personnel to remind them to pay attention to traffic data and provide traffic control suggestions.
10. A traffic analysis system based on face recognition, characterized in that: Used to implement a traffic analysis method based on face recognition as described in any one of claims 1 to 9, 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 face images from the video clips; the data preprocessing module preprocesses the face images; the feature extraction module determines whether the face images are complete, obtains a first image and a second image, and obtains feature information and class labels of the first image and the second image; the traffic analysis module performs traffic analysis based on the feature information and class labels of the first image and the second image; 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
Intelligent epidemic situation prevention and control system and method for station
CN113591607A
Face recognition method and device, electronic equipment and computer readable storage medium
CN113705462A
Flow analysis method based on human and object weight identification
CN114463783A
Target passenger flow statistical method, electronic equipment and computer readable storage medium
CN115482569A