CN111723733A - Highway toll collector smile rate statistical method and system - Google Patents

Highway toll collector smile rate statistical method and system Download PDF

Info

Publication number
CN111723733A
CN111723733A CN202010560766.0A CN202010560766A CN111723733A CN 111723733 A CN111723733 A CN 111723733A CN 202010560766 A CN202010560766 A CN 202010560766A CN 111723733 A CN111723733 A CN 111723733A
Authority
CN
China
Prior art keywords
face
openmv
smiling
module
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010560766.0A
Other languages
Chinese (zh)
Inventor
陆世伟
周静玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202010560766.0A priority Critical patent/CN111723733A/en
Publication of CN111723733A publication Critical patent/CN111723733A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/174Facial expression recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a method and a system for counting smiling rates of highway toll collectors, wherein a face image library of a highway toll station is established, and faces are detected through an OpenMV classifier; and after the face is detected, the face is distinguished through LBP characteristics. And acquiring image information by utilizing OpenMV, comparing the image information with image library information established in advance, and determining a toll collector on duty when the image information is consistent. When the lane induction coil detects that a vehicle waits for waiting in a lane of a toll station, the expression of the toll collector during turning is detected each time, and the smiling face neural model set by OpenMV is called to compare and judge whether the expression is smile, so that the smiling rate c of the toll collector is determined.

Description

Highway toll collector smile rate statistical method and system
Technical Field
The application relates to the technical field of machine identification, in particular to a method and a system for counting smiling rates of highway toll collectors.
Background
The highway in China has many toll stations with long mileage, so that the number of workers engaged in highway toll collection work is large. With the background of the introduction of smile services, smiles are incorporated into work and examination in many industries, and high-speed departments are no exception.
In the traditional technology, when a highway department carries out smile rate statistics on toll collectors, the recorded video of a toll booth is played back, then recording and checking are carried out manually, and the smile frequency of the service of each toll collector is counted from the recorded video.
Although the method can be used for counting the smile rate of the toll collector on the highway, the smile picture screened out by the playback video is low in efficiency and has deviation.
Disclosure of Invention
In order to solve the technical problems, the following technical scheme is provided:
in a first aspect, an embodiment of the present application provides a method for calculating a smile rate of a highway toll collector, where based on OpenMV, the method includes: establishing a face image library of a high-speed toll station, wherein the face image library comprises different expressions of the faces of different toll collectors and images under wearing shielding decorations; detecting the human face through an OpenMV classifier; after the face is detected, face discrimination is carried out through LBP characteristics; determining the information of the toll collector according to the face resolution and displaying the name of the current toll collector on an OLED screen in a matching way; when a vehicle runs into a toll booth reception lane, an induction coil buried underground the lane sends the sensed vehicle information to OpenMV; when the toll collector turns around, the OpenMV executes face tracking; OpenMV calls a trained smiling face model to perform smiling face detection; and after receiving the smile data, counting the smile rate.
By adopting the implementation mode, the image information is acquired by utilizing OpenMV and compared with the image library information which is established in advance, and the toll collector on duty is determined when the image information is matched. When the lane induction coil detects that a vehicle waits for waiting in a lane of a toll station, the expression of the toll collector during turning is detected each time, and the smiling face neural model set by OpenMV is called to compare and judge whether the expression is smile, so that the smile rate of the toll collector is determined.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the detecting a human face through an OpenMV classifier includes: continuously shifting and sliding different pictures from a set window, and calculating the characteristic information of the corresponding picture when each picture slides; and screening the characteristic information through the trained cascade classifier, and if the characteristic information passes the screening, detecting the face information.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the performing face resolution through LBP features after the face is detected includes: extracting the face features shot at present, and then extracting the features of each picture of each person in an image library; averaging the face information of each person, comparing each average value information with the currently shot face characteristics, and calculating the difference between a certain person in the image library and the currently shot face; and determining the toll collector corresponding to the face shot at present according to the difference degree.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the performing, by OpenMV, face tracking when the toll collector turns around includes: after the OpenMV detects the face, acquiring the position of the face in a picture through an API; controlling the rotation angles of a horizontal steering engine and a vertical steering engine of the two-degree-of-freedom holder through a P proportion in PID control according to the offset of the X axis and the Y axis of the face position from the center of the picture; and sending the angle signal to an arduino nano module through serial port communication so that the face is in the middle of the picture as much as possible.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the invoking of the trained smiling face model by OpenMV to perform smiling face detection includes: performing smiling face matching in the ROI of the face detection; if the similarity between the smile degree of the human face and the trained smiling face model is within a preset range, the human face is considered as a smiling face, and otherwise, the human face is a non-smiling face.
In a second aspect, an embodiment of the present application provides a highway toll collector smile rate statistical system, based on OpenMV, the system includes: the system comprises an image library establishing module, a face image library and a database processing module, wherein the image library establishing module is used for establishing a face image library of the high-speed toll station, and the face image library comprises different expressions of the faces of different toll collectors and images under wearing shielding decorations; the face detection module is used for detecting a face through an OpenMV classifier; the face recognition module is used for carrying out face resolution through LBP characteristics after a face is detected; the personnel determining module is used for determining the information of the toll collector according to the face resolution and displaying the name of the current toll collector on the OLED screen in a matching manner; the vehicle detection module is used for sending the sensed vehicle information to OpenMV by an induction coil buried underground in a lane when a vehicle runs into a toll booth reception lane; the face tracking module is used for performing face tracking by OpenMV when the toll collector turns around; the smiling face detection module is used for carrying out smiling face detection by calling the trained smiling face model by OpenMV; and the smile rate determining module is used for counting the smile rate after receiving the smile data.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the face detection module includes: the picture information calculation unit is used for continuously shifting and sliding different pictures from a set window, and calculating the characteristic information of the corresponding picture when each picture slides; and the face information detection unit is used for screening the characteristic information through the trained cascade classifier, and if the characteristic information passes the screening, the face information is detected.
With reference to the second aspect, in a second possible implementation manner of the second aspect, the face recognition module includes: the extraction unit is used for extracting the characteristics of the face shot at present and then extracting the characteristics of each picture of each person in the image library; the comparison unit is used for taking average information of the face information of each person, comparing each average information with the face characteristics shot at present and calculating the difference between a certain person in the image library and the face shot at present; and the determining unit is used for determining the toll collector corresponding to the currently shot face according to the difference degree.
With reference to the second aspect, in a third possible implementation manner of the second aspect, the face tracking module includes: the obtaining unit is used for obtaining the position in the human face re-picture through an API after the OpenMV detects the human face; the control unit is used for controlling the rotation angles of the horizontal steering engine and the vertical steering engine of the two-degree-of-freedom holder through P proportion in PID control according to the offset of the face position from the X axis of the center of the picture to the Y axis; and the signal sending unit is used for sending the angle signal to the arduino nano module through serial port communication so that the human face is in the middle of the picture as much as possible.
With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the smiling face detection module includes: a matching unit for performing smiling face matching in the ROI area of the face detection; and the judging unit is used for considering the human face as a smiling face if the similarity between the smiling degree in the human face and the trained smiling face model is within a preset range, and considering the human face as a non-smiling face if the similarity is not within the preset range.
Drawings
FIG. 1 is a diagram of a hardware architecture provided by an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for calculating a smile rate of a highway toll collector according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of feature extraction provided in an embodiment of the present application;
fig. 4 is a schematic diagram illustrating a comparison of LBP feature pixel points according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a bit chain provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a highway toll collector smile rate statistical system according to an embodiment of the present disclosure.
Detailed Description
The present embodiment is described below with reference to the accompanying drawings and the detailed description.
With the war between alpha dog and cheque's go, artificial intelligence has successfully entered the field of vision of the public, and computer vision is a mature technology as artificial intelligence. OpenMV4 is an open source, powerful machine vision module. With STM32H7 as a core, an OV5640 camera chip is integrated, an algorithm of core machine vision is efficiently realized on a small and flexible hardware module by using C language, and an OpenMV carries a MicroPython interpreter, which allows you to use Python to program (Python 3to be precision) on an embedded type.
Firstly, a hardware framework related to the following embodiment is introduced, and referring to fig. 1, the hardware framework includes an OpenMV module, an arduino nano module, an OLED screen, an induction coil module, a steering engine driving module, a vertical rotation steering engine, and a horizontal rotation steering engine.
The arduino nano module is in communication connection with the OpenMV module, the OLED screen, the induction coil module and the steering engine driving module respectively. The steering engine driving module is in communication connection with the vertical rotation steering engine and the horizontal rotation steering engine respectively and is used for receiving instruction information sent by the arduino nano module and controlling the vertical rotation steering engine and the horizontal rotation steering engine.
Referring to fig. 2, the method for counting the smiling rate of the highway toll collector provided by the embodiment includes:
s101, establishing a face image library of the high-speed toll station, wherein the face image library comprises different expressions of the faces of different toll collectors and images worn under shielding decorations.
In this embodiment, a 32G SD memory card smaller than or equal to is selected to store various facial portrait pictures of the photographing toll collector. A singtown folder is established on an SD card, and n subfiles (n is the number of toll collectors of a toll station) are established from the folder and are named as S1, S2, S3 and S4. After the OpenMV is connected with a computer through a data line, a preset program is operated in OpenMV IDE computer software, and face samples of different toll collectors are collected. During collection, the human face can smile, not smile, face-tilted, face-corrected, wear glasses, wear a mask and the like, and about ten pictures are collected by each person approximately. Thus, the pictures are stored in the corresponding folder of the SD card, and an image library of a certain toll station is established.
The preset program is as follows:
#Snapshot Example
#Note:You will need an SD card to run this example.
#You can use your OpenMV Cam to save image files.
import sensor,image,pyb
RED_LED_PIN=1
BLUE_LED_PIN=3
sensor.reset()#Initialize the camera sensor.
sensor.set_pixformat(sensor.GRAYSCALE)#or sensor.GRAYSCALE
sensor.set_framesize(sensor.B128X128)#or sensor.QQVGA(or others)
sensor.set_windowing((92,112))
sensor.skip_frames(10)#Let new settings take affect.
sensor.skip_frames(time=2000)
and setting the serial number of the photographed person to be num 1#, saving the picture of the first person to an s1 folder, saving the picture of the second person to an s2 folder, and the like. The num value is modified each time the photographer is changed.
n 10# sets the number of pictures taken by each person.
# n photographs were taken consecutively, once every 3 s.
while(n):
# Red light on
pyb.LED(RED_LED_PIN).on()
skip _ frames (time 3000) # Give the user time to get ready to wait for 3s, ready for an expression.
Red light goes out and blue light goes on
pyb.LED(RED_LED_PIN).off()
pyb.LED(BLUE_LED_PIN).on()
# saving the captured Picture to the SD card
print(n)
sensor.snapshot().save("singtown/s%s/%s.pgm"%(num,n))#or "example.bmp"(or others)
n-=1
pyb.LED(BLUE_LED_PIN).off()
print("Done!Reset the camera to see the saved image.")
And S102, detecting the human face through an OpenMV classifier.
The face detection is definitely performed before the face matching, namely, the face is detected and then the discrimination is performed. The human face detection is that different pictures are continuously shifted and slide from a window set by the user during detection, the characteristics of the picture are calculated when each picture slides, then the characteristics are screened by a trained cascade classifier, and once the characteristics pass the screening, the human face is considered to be detected. The haar feature is used for detecting the human face, and the basic principle of the haar feature is to consider that the pixel values of different areas are different.
For example, the eyes and non-eye regions of a face are different, the eyes are darker than the cheeks, and the mouth is darker than the cheeks. These features are all referred to as harr features and the feature extraction process is shown in fig. 3. It is common to perform thousands of comparisons in this way to determine whether the detected object is a human face. The classifier in OpenMV is pre-trained and can be directly used for face detection, so the process of the classifier is not repeated.
And S103, after the face is detected, distinguishing the face through LBP characteristics.
In brief, LBP compares the gray value of a certain pixel point in an image with the gray value of a pixel point in its neighborhood, as shown in fig. 4.
If the neighborhood pixel value is greater than this point, it is assigned a value of 1, otherwise it is assigned a value of 0, so that starting from the upper left corner, a bit chain can be formed and then converted into a decimal number, which can be expressed as follows by the expression:
wherein s represents a threshold function satisfying the following relationship:
S(x)=1,x≥0
S(x)=0,x=0
through the conversion, the difference relation between one pixel point and the neighborhood can be represented by one number, because the LBP records the difference relation between the pixel point and the neighborhood pixel, the increase and decrease of the pixel value caused by the illumination change can not change the size of the LBP, especially in a local area, the pixel value change caused by the illumination to the image can be considered to be unidirectional, and the LBP can well store the difference relation of the pixel value in the image. The LBP can be further used as a histogram statistic, and this histogram can be used as a feature operator for texture analysis.
R represents the radius of the neighborhood, P represents the number of pixels of the neighborhood or the length of the bit chain, if the radius of the neighborhood is 1, the number of pixels of the neighborhood is 8, the length of the bit chain is 8, if the radius of the neighborhood is 2, the number of pixels of the neighborhood is 16, and the length of the bit chain is 16, as shown in fig. 5.
Considering the simplest case where R is 1 and P is 8, LBP is mapped to a value between 0 and 255, and if represented by a histogram, a 256-dimensional array is required to store the histogram. In order to reduce the storage space, a uniform pattern coding method is proposed, and a uniform pattern is defined according to the number of transitions between 0 and 1 in a bit chain. If the number of transitions between 0 and 1 in a bit chain does not exceed two, then the bit chain is unifonmpropern, for example, the number of transitions 00000000 is 0, the number of transitions 00001111 is 1, the number of transitions 00011100 is 2, the number of transitions 01100 is 4, and the number of transitions 01101010 is 6, and the patterns with the number of transitions not exceeding two all belong to unifonm patterns, it can be proved that most binary patterns are unifonormpattern, and by this definition, for an LBP of 8 bits, the LBP can be reduced from 256 dimensions to 59 dimensions, and is reduced by 90%.
Since the image from which the LBP features are computed must be a grayscale image, it is the grayscale image that is saved when the image library is built. For example, now OpenMV is seeing a face shot, and then the face is compared with a sample face in an image library. The comparison process is that the characteristics of the face shot at present are extracted, then the characteristics of each picture of each person in the image library are extracted, the face of each person can obtain an average value, and finally the average value is compared with the characteristics of the face shot at present, and the difference degree between one person in the image library and the face shot at present is calculated. For example, the image library stores faces of 14 toll collectors, and it needs to calculate 14 times, and the closest face to the currently photographed face is found from the 14 faces. The smaller the recognition degree of the features is, the more similar and matched the face shot at present with a certain face in the image library, so that the comparison result in the image library can be output, the person shot at present can be determined, and the name of the subfolder in the image library can be output and stored.
And S104, determining the information of the toll collector according to the face resolution and displaying the name of the current toll collector on the OLED screen in a matching manner.
OpenMV outputs names of subfolders on face matching to an arduino nano module through serial port communication, and the adrnino nano module sends corresponding instructions after receiving the names to enable an OLED screen to display corresponding names of all toll collector names set in advance, and then displays the current names of workers on duty.
And S105, when a vehicle runs into the toll booth reception lane, the induction coil buried underground in the lane sends the sensed vehicle information to OpenMV.
When a vehicle runs into the toll booth reception lane, the induction coil buried underground in the lane senses the vehicle, sends a signal to the arduino nano module, and sends the signal to OpenMV through serial port communication after receiving the signal.
And S106, when the toll collector turns around, the OpenMV performs face tracking.
Because the toll collector needs to turn around when receiving the vehicle, in order to improve the speed and the accuracy of smile recognition, the face tracking is carried out when the toll collector turns around. Before face tracking is implemented, firstly, a face is detected definitely. The detection of a human face has already been described and will not be described here. The method comprises the steps that after the OpenMV detects a human face, the position of the human face in a picture is obtained through an API, according to the offset of the position of the human face from the X axis of the center of the picture to the Y axis, the rotating angles of a horizontal steering engine and a vertical steering engine of a two-degree-of-freedom holder are controlled through P proportion control in PID control, angle signals are sent to an arduino nano module through serial port communication, corresponding operation is executed, and therefore the human face is located in the middle of the picture as far as possible. The control is as follows:
1. when the face is detected to be on the right side of the picture, the horizontal steering engine rotates rightwards for a certain angle, so that the face can return to the middle.
2. When the face is detected to be on the left side of the picture, the horizontal steering engine is enabled to rotate leftwards for a certain angle, and therefore the face can return to the middle.
Similarly, the vertical direction is the same, and the rotation direction of the steering engine is known, and the rotation amplitude of the steering engine is required to be known next step. At this time, we need to refer to the relationship between the offset (the offset refers to the value of the offset of the face center from the center of the screen), the actual value (the actual value refers to the X-axis value of the coordinates of the face area center in the screen), and the target value (the target value of the X-axis coordinates of the face center is half of the width of the whole screen, and if the resolution of the screen is 600X400, the target value is 300 for the X-axis):
offset is actual value-target value
The rotation direction of the steering engine angle (whether the angle is increased or decreased) can be obtained according to the positive value and the negative value of the offset. Because the steering engine is controlled by the pulse with variable width, a proportional relation K can be found by taking the offset and the pulse width. After the proportional relation K is determined, the steering engine can rotate according to the change of the offset. The same is true of the Y axis, so that the tracking of the human face can be realized.
And S107, calling the trained smiling face model by OpenMV to detect the smiling face.
There are many ways to implement image classification, but a neural network, such as a Convolutional Neural Network (CNN), is particularly good at classifying images. To implement the smiling face detection function, we will use the OpenMV defined smiling face model. The network is a three-layer convolutional neural network and comprises the following components:
the constraint layer-is responsible for extracting features from the image.
Dropout layer-is responsible for avoiding overfitting by ignoring random nodes during the training phase.
Rectisected Linear Unit (ReLU) -is responsible for introducing non-Linear activation functions into the model. The function will return 0 if any negative input is received, but it will return the value when any positive value x is received.
Pooling layer-is responsible for gradually reducing the spatial size of the model, reducing the number of parameters and computations in the network, and thus also controlling the overfitting.
Since both the data set and the training model of the smiling face are done in advance in OpenMV, we only need to directly call the trained smiling face model to detect the smiling face.
And carrying out smiling face matching in the ROI of the front face detection, and if the smiling degree in the face is similar to the trained model approximation degree, determining the face is a smiling face, otherwise, determining the face is a non-smiling face. And the smiling face and non-smiling face detection results are sent to the arduino nano module through serial port communication.
And S108, counting the smile rate after receiving the smile data.
After receiving the smile condition, arduino nano counts the smile condition. The statistical algorithm is as follows: smile rate is smile number ÷ (smile number + non-smile number). and (5) displaying the result by the OLED screen after the smiling rate of the arduino nano is counted. This is done to show what the current toll collector and smile rate are on duty.
As can be seen from the above-described embodiments,
corresponding to the method for counting the smile rate of the highway toll collector provided by the above embodiment, the present application also provides an embodiment of a system for counting the smile rate of the highway toll collector, and referring to fig. 6, the system 20 for counting the smile rate of the highway toll collector includes: an image library creation module 201, a face detection module 202, a face recognition module 203, a person determination module 204, a vehicle detection module 205, a face tracking module 206, a smiling face detection module 207, and a smile rate determination module 208.
The image library establishing module 201 is used for establishing a facial image library of the high-speed toll station, wherein the facial image library comprises images of different toll collectors with different facial expressions and under wearing shielding decorations. And the face detection module 202 is configured to detect a face through an OpenMV classifier. And the face recognition module 203 is configured to perform face resolution through the LBP feature after the face is detected. And the personnel determining module 204 is used for determining the information of the toll collector according to the face resolution and displaying the name of the current toll collector on the OLED screen in a matching manner. And the vehicle detection module 205 is used for sending the sensed vehicle information to the OpenMV by an induction coil buried underground in the lane when a vehicle runs into the toll booth reception lane. And the face tracking module 206 is configured to perform face tracking by OpenMV when the toll collector turns around. And the smiling face detection module 207 is used for the OpenMV to call the trained smiling face model to perform smiling face detection. And the smile rate determining module 208 is configured to count the smile rate after receiving the smile data.
Further, the face detection module 202 includes: the device comprises a picture information calculation unit and a human face information detection unit. The picture information calculating unit is used for continuously shifting and sliding different pictures from a set window, and calculating the characteristic information of the corresponding picture when each picture slides. The face information detection unit is used for screening the feature information through the trained cascade classifier, and if the feature information passes the screening, the face information is detected.
The face recognition module 203 includes: the device comprises an extraction unit, a comparison unit and a determination unit. And the extraction unit is used for extracting the characteristics of the face shot at present and then extracting the characteristics of each picture of each person in the image library. And the comparison unit is used for taking average information of the face information of each person, comparing each average information with the face characteristics shot at present and calculating the difference between a certain person in the image library and the face shot at present. And the determining unit is used for determining the toll collector corresponding to the currently shot face according to the difference degree.
The face tracking module 206 includes: the device comprises an acquisition unit, a control unit and a signal sending unit. And the obtaining unit is used for obtaining the position in the human face re-picture through the API after the OpenMV detects the human face. And the control unit is used for controlling the rotation angles of the horizontal steering engine and the vertical steering engine of the two-degree-of-freedom holder through P proportion in PID control according to the offset of the face position from the X axis of the picture center to the Y axis. The signal sending unit is used for sending the angle signal to the arduino nano module through serial port communication, so that the face is in the middle of the picture as much as possible.
The smiling face detection module 207 includes: a matching unit and a judging unit. And the matching unit is used for carrying out smiling face matching in the ROI area of the human face detection. And the judging unit is used for considering a smiling face if the similarity between the smiling degree in the human face and the trained smiling face model is within a preset range, and considering the human face as a non-smiling face if the similarity is not within the preset range.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Of course, the above description is not limited to the above examples, and technical features that are not described in this application may be implemented by or using the prior art, and are not described herein again; the above embodiments and drawings are only for illustrating the technical solutions of the present application and not for limiting the present application, and the present application is only described in detail with reference to the preferred embodiments instead, it should be understood by those skilled in the art that changes, modifications, additions or substitutions within the spirit and scope of the present application may be made by those skilled in the art without departing from the spirit of the present application, and the scope of the claims of the present application should also be covered.

Claims (10)

1. A highway toll collector smile rate statistical method is based on OpenMV and is characterized by comprising the following steps:
establishing a face image library of a high-speed toll station, wherein the face image library comprises different expressions of the faces of different toll collectors and images under wearing shielding decorations;
detecting the human face through an OpenMV classifier;
after the face is detected, face discrimination is carried out through LBP characteristics;
determining the information of the toll collector according to the face resolution and displaying the name of the current toll collector on an OLED screen in a matching way;
when a vehicle runs into a toll booth reception lane, an induction coil buried underground the lane sends the sensed vehicle information to OpenMV;
when the toll collector turns around, the OpenMV executes face tracking;
OpenMV calls a trained smiling face model to perform smiling face detection;
and after receiving the smile data, counting the smile rate.
2. The method of claim 1, wherein the detecting the face through the OpenMV classifier comprises:
continuously shifting and sliding different pictures from a set window, and calculating the characteristic information of the corresponding picture when each picture slides;
and screening the characteristic information through the trained cascade classifier, and if the characteristic information passes the screening, detecting the face information.
3. The statistical method for smile rate of highway toll collector as claimed in claim 1, wherein said face discrimination by LBP feature after face detection comprises:
extracting the face features shot at present, and then extracting the features of each picture of each person in an image library;
averaging the face information of each person, comparing each average value information with the currently shot face characteristics, and calculating the difference between a certain person in the image library and the currently shot face;
and determining the toll collector corresponding to the face shot at present according to the difference degree.
4. The method of claim 1, wherein the OpenMV performing face tracking when the toll collector turns around comprises:
after the OpenMV detects the face, acquiring the position of the face in a picture through an API;
controlling the rotation angles of a horizontal steering engine and a vertical steering engine of the two-degree-of-freedom holder through a P proportion in PID control according to the offset of the X axis and the Y axis of the face position from the center of the picture;
and sending the angle signal to an arduino nano module through serial port communication so that the face is in the middle of the picture as much as possible.
5. The highway toll collector smile rate statistical method according to claim 1, wherein the OpenMV invoking the trained smiling face model for smile detection comprises:
performing smiling face matching in the ROI of the face detection;
if the similarity between the smile degree of the human face and the trained smiling face model is within a preset range, the human face is considered as a smiling face, and otherwise, the human face is a non-smiling face.
6. A highway toll collector smile rate statistical system is based on OpenMV, and is characterized in that the system comprises:
the system comprises an image library establishing module, a face image library and a database processing module, wherein the image library establishing module is used for establishing a face image library of the high-speed toll station, and the face image library comprises different expressions of the faces of different toll collectors and images under wearing shielding decorations;
the face detection module is used for detecting a face through an OpenMV classifier;
the face recognition module is used for carrying out face resolution through LBP characteristics after a face is detected;
the personnel determining module is used for outputting names of subfolders on the face matching to the arduino nano module through serial port communication by OpenMV, and after receiving the names, the adrnino nano module sends a corresponding instruction to enable an OLED screen to display corresponding names of all the preset toll collector names, and then displays the current working personnel name;
the vehicle detection module is used for sensing when a vehicle runs into a toll booth reception lane, sending a signal to the arduino nano module by an induction coil buried underground in the lane, and sending the signal to OpenMV through serial port communication after receiving the signal;
the face tracking module is used for performing face tracking by OpenMV when the toll collector turns around;
the smiling face detection module is used for carrying out smiling face detection by calling the trained smiling face model by OpenMV;
and the smile rate determining module is used for counting the smile rate after receiving the smile data.
7. The highway toll collector smile rate statistical system of claim 6, wherein the face detection module comprises:
the picture information calculation unit is used for continuously shifting and sliding different pictures from a set window, and calculating the characteristic information of the corresponding picture when each picture slides;
and the face information detection unit is used for screening the characteristic information through the trained cascade classifier, and if the characteristic information passes the screening, the face information is detected.
8. The highway toll collector smile rate statistical system of claim 6, wherein the face recognition module comprises:
the extraction unit is used for extracting the characteristics of the face shot at present and then extracting the characteristics of each picture of each person in the image library;
the comparison unit is used for taking average information of the face information of each person, comparing each average information with the face characteristics shot at present and calculating the difference between a certain person in the image library and the face shot at present;
and the determining unit is used for determining the toll collector corresponding to the currently shot face according to the difference degree.
9. The highway toll collector smile rate statistical system of claim 6, wherein the face tracking module comprises:
the obtaining unit is used for obtaining the position in the human face re-picture through an API after the OpenMV detects the human face;
the control unit is used for controlling the rotation angles of the horizontal steering engine and the vertical steering engine of the two-degree-of-freedom holder through P proportion in PID control according to the offset of the face position from the X axis of the center of the picture to the Y axis;
and the signal sending unit is used for sending the angle signal to the arduino nano module through serial port communication so that the human face is in the middle of the picture as much as possible.
10. The system of claim 6, wherein the smiling face detection module comprises:
a matching unit for performing smiling face matching in the ROI area of the face detection;
and the judging unit is used for considering the human face as a smiling face if the similarity between the smiling degree in the human face and the trained smiling face model is within a preset range, and considering the human face as a non-smiling face if the similarity is not within the preset range.
CN202010560766.0A 2020-06-18 2020-06-18 Highway toll collector smile rate statistical method and system Pending CN111723733A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010560766.0A CN111723733A (en) 2020-06-18 2020-06-18 Highway toll collector smile rate statistical method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010560766.0A CN111723733A (en) 2020-06-18 2020-06-18 Highway toll collector smile rate statistical method and system

Publications (1)

Publication Number Publication Date
CN111723733A true CN111723733A (en) 2020-09-29

Family

ID=72567459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010560766.0A Pending CN111723733A (en) 2020-06-18 2020-06-18 Highway toll collector smile rate statistical method and system

Country Status (1)

Country Link
CN (1) CN111723733A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112232219A (en) * 2020-10-19 2021-01-15 武汉理工大学 Face recognition check-in system based on LBP (local binary pattern) feature algorithm
CN115083157A (en) * 2022-06-14 2022-09-20 四川交通职业技术学院 Method for measuring and calculating number of people on lane at highway toll station

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112232219A (en) * 2020-10-19 2021-01-15 武汉理工大学 Face recognition check-in system based on LBP (local binary pattern) feature algorithm
CN115083157A (en) * 2022-06-14 2022-09-20 四川交通职业技术学院 Method for measuring and calculating number of people on lane at highway toll station

Similar Documents

Publication Publication Date Title
CN111797653B (en) Image labeling method and device based on high-dimensional image
US5912980A (en) Target acquisition and tracking
CN108717524B (en) Gesture recognition system based on double-camera mobile phone and artificial intelligence system
KR101615254B1 (en) Detecting facial expressions in digital images
Kumar et al. Live detection of face using machine learning with multi-feature method
CN111985348B (en) Face recognition method and system
CN108647625A (en) A kind of expression recognition method and device
CN109948476B (en) Human face skin detection system based on computer vision and implementation method thereof
CN108090428B (en) Face recognition method and system
CN111274883B (en) Synthetic sketch face recognition method based on multi-scale HOG features and deep features
CN111723733A (en) Highway toll collector smile rate statistical method and system
CN104361357B (en) Photo album categorizing system and sorting technique based on image content analysis
CN113450369A (en) Classroom analysis system and method based on face recognition technology
CN113449606A (en) Target object identification method and device, computer equipment and storage medium
CN114581824A (en) Method for identifying abnormal behaviors of sorting center based on video detection technology
CN106127203A (en) A kind of device to object location and followed the trail of and the method for image recognition
CN114973408A (en) Dynamic gesture recognition method and device
US20220405527A1 (en) Target Detection Methods, Apparatuses, Electronic Devices and Computer-Readable Storage Media
Patil et al. Autonomous Object Detection and Counting using Edge Detection and Image Processing Algorithms
CN113313098A (en) Video processing method, device, system and storage medium
Adaickalam et al. A Vibrant Multiple Object Detection Using Machine Learning Techniques
Shanmuhappriya Automatic attendance monitoring system using deep learning
Tai et al. Automatic facial expression recognition system using Neural Networks
CN114519799A (en) Real-time detection method and system for multi-feature seat state
CN114399768A (en) Workpiece product serial number identification method, device and system based on Tesseract-OCR engine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination