Method and System for Detecting Examination Violation Behaviors Based on Surveillance Videos

By applying edge detection and template matching technology in surveillance videos, identifying the test paper area and face area, calculating the rotation amplitude and cheating characteristics, and making cheating judgments based on thinking time, the problem of high misjudgment rate in the existing technology is solved, and more accurate test violation detection is achieved.

CN119399838BActive Publication Date: 2025-06-10BEIJING MOZHU TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411521853.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-06-10
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

The existing surveillance video analysis methods are difficult to accurately distinguish candidates' normal thinking behavior from potential cheating behavior, resulting in some normal behavior being misjudged as abnormal behavior, increasing the workload of the invigilator.

Method used

By obtaining surveillance videos, using edge detection and template matching technology, identifying and segmenting the test paper area and candidates’ face area, calculating the rotation amplitude and cheating characteristics, and using the average thinking time to judge the possibility of cheating.

Benefits of technology

It improves the accurate detection of examination violations, reduces the rate of misjudgment, reduces the workload of invigilators, and enhances the fairness and efficiency of the examination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399838B_ABST
    Figure CN119399838B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image processing, and particularly to a method and system for detecting examination violation behaviors based on surveillance videos, including: acquiring surveillance images, blank test papers, and the facial regions of examinees; obtaining multiple detection regions through edge detection; obtaining the facial region and test paper region of each examinee; obtaining the surveillance image of each examinee when the facial region rotates each time through template matching, and further obtaining the rotation amplitude of each examinee when the facial region rotates each time; combining the number of times the facial region of each examinee rotates, obtaining the cheating feature manifestation degree of each examinee when the facial region rotates each time, obtaining the cheating possibility of each examinee when the facial region rotates each time, and obtaining the surveillance image containing abnormal behaviors. The present invention aims to solve the problem that when judging whether an examinee has abnormal behaviors only by the head rotation of the examinee, examinees with a habit of turning their heads are misidentified as examinees with abnormal behaviors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to a method and system for detecting examination cheating behaviors based on surveillance videos. Background Art

[0002] The fairness, impartiality, and security of examinations are social focus issues that the public is concerned about. To ensure the fairness and impartiality of examinations, cameras are installed in examination rooms, and invigilators are arranged to monitor the examination behaviors of candidates through the cameras to identify candidates with cheating behaviors.

[0003] Currently, by analyzing the surveillance videos of the examination rooms obtained from surveillance cameras, the rotation situation of the facial regions of each candidate is obtained to determine whether the candidate has abnormal behaviors. This method ignores the behavioral habit that some candidates will rotate their facial regions during the thinking process, misjudges the normal behaviors of some candidates as abnormal behaviors, increases the number of surveillance images containing abnormal behaviors, and increases the workload of invigilators. Summary of the Invention

[0004] The present invention provides a method and system for detecting examination cheating behaviors based on surveillance videos to solve the existing problems.

[0005] The method and system for detecting examination cheating behaviors based on surveillance videos of the present invention adopt the following technical solutions:

[0006] The present invention proposes a method for detecting examination cheating behaviors based on surveillance videos, and the method includes the following steps:

[0007] Obtain the surveillance video of the candidate taking the examination to obtain the data sequence of surveillance images; obtain the blank test paper and the facial region of the candidate;

[0008] Through edge detection, obtain multiple detection regions in each surveillance image; according to the gray value that appears most frequently in each detection region in each surveillance image, the gray value that appears most frequently in the blank test paper, the gray value that appears most frequently in the facial region of the candidate, and the edge chain code of each detection region, obtain the test paper region and the facial region of the candidate in each surveillance image, and further obtain the facial region and the test paper region of each candidate;

[0009] Perform template matching on the facial region of each candidate and the facial region of the candidate in each surveillance image to obtain several surveillance images when each candidate rotates the facial region each time; divide the surveillance images when each candidate rotates the facial region each time and the surveillance image of the previous frame when the facial region is rotated each time into multiple pixel blocks, and obtain the rotation amplitude of each candidate when rotating the facial region each time according to the distribution of gray values in the pixel blocks in different surveillance images;

[0010] According to the rotation amplitude of each candidate's face area during each face rotation, and the number of times each candidate rotates the face area, obtain the cheating characteristic manifestation degree of each candidate during each face rotation;

[0011] According to the test paper areas of the same candidate in multiple monitoring images, obtain the answer image of each candidate and the average thinking time of each candidate; according to the answer image of each candidate, obtain the thinking time of each candidate before each face rotation and the thinking time of each candidate after each face rotation; combine the average thinking time of each candidate and the cheating characteristic manifestation degree of each candidate during each face rotation to obtain the cheating possibility of each candidate during each face rotation, and then obtain the monitoring images containing abnormal behaviors and perform cheating judgment.

[0012] Further, the specific method for obtaining the test paper area and the candidate's face area in each monitoring image according to the gray value that appears most frequently in each detection area in each monitoring image, the gray value that appears most frequently in the blank test paper, the gray value that appears most frequently in the candidate's face area, and the edge chain code of each detection area includes:

[0013] Obtain the gray value of the pixel point that appears most frequently in the a-th detection area in the d-th monitoring image, and record it as the representative gray value of the a-th detection area in the d-th monitoring image; obtain the gray value of the pixel point that appears most frequently in the blank test paper area, and record it as the representative gray value of the blank test paper;

[0014] Obtain the edge chain code of the a-th detection area in the d-th monitoring image, and record the number of chain code values in the edge chain code of the a-th detection area in the d-th monitoring image that are the same as the adjacent chain code values on the left and right as the edge straight line manifestation degree of the a-th detection area in the d-th monitoring image;

[0015] The specific calculation formula for the test paper characteristic manifestation degree of the a-th detection area in the d-th monitoring image is as follows:

[0016]

[0017] In the formula, W d,a represents the test paper characteristic manifestation degree of the a-th detection area in the d-th monitoring image, h d,a represents the representative gray value of the a-th detection area in the d-th monitoring image, h 1 represents the representative gray value of the blank test paper, || represents the absolute value function, exp() is the exponential function with the natural constant as the base, n d,a represents the number of chain code values in the edge chain code of the a-th detection area in the d-th monitoring image, n 1,d,a represents the edge straight line manifestation degree of the a-th detection area in the d-th monitoring image;

[0018] Preset test paper representation threshold T 1 , mark the detection area where the test paper feature representation is greater than the representation threshold as the test paper area; mark the detection area that is not the test paper area as the suspected face area;

[0019] Mark the gray value that appears most frequently in the f-th suspected face area in the d-th surveillance image as the representative gray value of the f-th suspected face area in the d-th surveillance image, and obtain the representative gray values of all suspected face areas in the d-th surveillance image;

[0020] Mark the gray value that appears most frequently in the facial area of the c-th candidate as the facial representative gray value of the c-th candidate;

[0021] Mark the suspected face area with the smallest difference between the representative gray value in the d-th surveillance image and the facial representative gray value of the c-th candidate as the facial area of the c-th candidate in the d-th surveillance image.

[0022] Furthermore, the specific method for obtaining the facial area and test paper area of each candidate includes:

[0023] Mark the test paper area in the d-th surveillance image with the closest Euclidean distance to the center between the facial area of the c-th candidate as the test paper area of the c-th candidate in the d-th surveillance image.

[0024] Furthermore, the specific method for performing template matching between the facial area of each candidate in each surveillance image and the facial area of the candidate, and obtaining several surveillance images when each candidate rotates the facial area each time, includes:

[0025] Calculate the template matching between the facial area of the c-th candidate in the d-th surveillance image and the facial area of the c-th candidate, and mark the template matching result as the facial rotation degree of the c-th candidate in the d-th surveillance image;

[0026] Set the rotation degree threshold T 2 , if the facial rotation degree of the c-th candidate in the d-th surveillance image is greater than the rotation degree threshold T 2 , mark the d-th surveillance image as the facial rotation image of the c-th candidate;

[0027] In the data sequence of the surveillance images, regard the image segment composed of multiple consecutive facial rotation images as several surveillance images when the c-th candidate rotates the facial area once.

[0028] Further, the method of dividing the monitoring images of each candidate when rotating the face area each time and the monitoring image of the previous frame before rotating the face area each time into multiple pixel blocks, and obtaining the rotation amplitude of each candidate when rotating the face area each time according to the distribution of gray values in the pixel blocks in different monitoring images, specifically includes the following steps:

[0029] Use the superpixel segmentation algorithm to segment the face area in the monitoring image of the previous frame before the c-th candidate rotates the face area for the k-th time and the b-th monitoring image when rotating the face area, and divide the face area in the monitoring image of the previous frame before the c-th candidate rotates the face area for the k-th time and the b-th monitoring image when rotating the face area into multiple pixel blocks;

[0030] The average of the absolute values of the differences between all pixel points with gray value i in the m-th pixel block in the b-th monitoring image when the c-th candidate rotates the face area for the k-th time and the gray values of other pixel points in the 8-neighborhood is denoted as the gray value distribution of the pixel points with gray value i in the m-th pixel block in the b-th monitoring image when the c-th candidate rotates the face area for the k-th time;

[0031] The average of the absolute values of the differences between all pixel points with gray value i in the k-th pixel block in the monitoring image of the previous frame before the c-th candidate rotates the face area for the k-th time and the gray values of other pixel points in the 8-neighborhood is denoted as the gray value distribution of the pixel points with gray value i in the k-th pixel block in the monitoring image of the previous frame before the c-th candidate rotates the face area for the k-th time;

[0032] The specific calculation formula for the gray value distribution consistency between the q-th pixel block in the monitoring image of the previous frame before the c-th candidate rotates the face area for the k-th time and the m-th pixel block in the b-th monitoring image when rotating the face area is as follows:

[0033]

[0034] In the formula, S(c,k) b,m,q represents the gray value distribution consistency between the q-th pixel block in the monitoring image of the previous frame before the c-th candidate rotates the face area for the k-th time and the m-th pixel block in the b-th monitoring image when rotating the face area, and W(c,k) b,m,i represents the number of pixel points with gray value i in the m-th pixel block in the b-th monitoring image when the c-th candidate rotates the face area for the k-th time, and W(c,k) q,i represents the number of pixel points with gray value i in the q-th pixel block in the monitoring image of the previous frame before the c-th candidate rotates the face area for the k-th time, and σ(c,k) b,m,i represents the gray value distribution of the pixel points with gray value i in the m-th pixel block in the b-th monitoring image when the c-th candidate rotates the face area for the k-th time, and σ(c,k) q,iDenote the gray-scale distribution of the pixel points with gray-scale value \(i\) in the \(q\)-th pixel block in the monitoring image of the previous frame when the \(c\)-th candidate rotates the face region for the \(k\)-th time. \(\vert\vert\) represents the absolute value function, and \(\exp()\) is the exponential function with the natural constant as the base;

[0035] The preset distribution consistency threshold \(T\) 3 , and denote the pixel block in the monitoring image before the \(k\)-th rotation of the face region corresponding to the two pixel blocks with the largest gray-scale distribution consistency between the \(q\)-th pixel block in the monitoring image of the previous frame when the \(c\)-th candidate rotates the face region for the \(k\)-th time and the \(m\)-th pixel block in the \(b\)-th monitoring image when rotating the face region as the similar pixel block of the \(m\)-th pixel block in the \(b\)-th monitoring image when the \(c\)-th candidate rotates the face region for the \(k\)-th time;

[0036] If the gray-scale distribution consistency between the \(m\)-th pixel block in the \(b\)-th monitoring image when the \(c\)-th candidate rotates the face region for the \(k\)-th time and its similar pixel block is greater than the distribution consistency threshold \(T\) 3 , denote the similar pixel block of the \(m\)-th pixel block in the \(b\)-th monitoring image when the \(c\)-th candidate rotates the face region for the \(k\)-th time as the corresponding pixel block of the \(m\)-th pixel block in the \(b\)-th monitoring image when the \(c\)-th candidate rotates the face region for the \(k\)-th time;

[0037] Obtain the rotation amplitude of each candidate when rotating the face region each time according to the distribution of each pixel block and its corresponding pixel block in the monitoring image of each candidate when rotating the face region each time.

[0038] Furthermore, the specific method for obtaining the rotation amplitude of each candidate when rotating the face region each time according to the distribution of each pixel block and its corresponding pixel block in the monitoring image of each candidate when rotating the face region each time includes:

[0039] Denote the absolute value of the difference between the position of the center of the \(m\)-th pixel block in the \(b\)-th monitoring image when the \(c\)-th candidate rotates the face region for the \(k\)-th time in the corresponding monitoring image and the position of the center of the corresponding pixel block in the corresponding monitoring image as a rotation distance of the \(c\)-th candidate when rotating the face region for the \(k\)-th time; Denote the maximum value of the rotation distances of all pixel blocks in all monitoring images when the \(c\)-th candidate rotates the face region for the \(k\)-th time as the rotation amplitude of the \(c\)-th candidate when rotating the face region for the \(k\)-th time.

[0040] Furthermore, the specific method for obtaining the cheating feature manifestation degree of each candidate when rotating the face region each time according to the rotation amplitude of each candidate when rotating the face region each time and the number of times each candidate rotates the face region includes:

[0041]

[0042] In the formula, \(K\) 1,c,tDenote the degree of manifestation of cheating characteristics when the \(c\)-th candidate rotates the facial region for the \(t\)-th time, \(F\) c,t Denote the rotation amplitude when the \(c\)-th candidate rotates the facial region for the \(t\)-th time, \(F\) c,r Denote the rotation amplitude when the \(c\)-th candidate rotates the facial region for the \(r\)-th time, \(N\) c Denote the number of times the \(c\)-th candidate rotates the facial region.

[0043] Furthermore, based on the test paper regions of the same candidate in multiple surveillance graphics, obtain the answer image of each candidate and the average thinking time of each candidate; according to the answer image of each candidate, obtain the thinking time of each candidate before each rotation of the facial region and the thinking time of each candidate after each rotation of the facial region. The specific methods included are as follows:

[0044] Take the difference between the test paper region of the \(c\)-th candidate in the \(f\)-th surveillance image and the test paper region of the \(c\)-th candidate in the \((f + 1)\)-th surveillance image to obtain the test paper comparison image of the \(c\)-th candidate in the \(f\)-th surveillance image;

[0045] Preset a comparison threshold \(T\) 4 , if the normalized result of the number of pixel points with a gray value of 0 in the test paper comparison image of the \(c\)-th candidate in the \(f\)-th surveillance image is greater than the comparison threshold \(T\) 4 , record the \(f\)-th surveillance image as the thinking image of the \(c\)-th candidate; if the normalized result of the number of pixel points with a gray value of 0 in the test paper comparison image of the \(c\)-th candidate in the \(f\)-th surveillance image is less than or equal to the comparison threshold \(T\) 4 , record the \(f\)-th surveillance image as the answer image of the \(c\)-th candidate;

[0046] Record the number of surveillance images composed of consecutive thinking images of the \(c\)-th candidate in the data sequence of surveillance images as the thinking time of the \(c\)-th candidate for one time; record the average value of all thinking times of the \(c\)-th candidate as the average thinking time of the \(c\)-th candidate;

[0047] Record the number of images between the first facial rotation image when the \(c\)-th candidate rotates the facial region for the \(t\)-th time and the answer image of the previous \(c\)-th candidate as the thinking time of the \(c\)-th candidate before the \(t\)-th head rotation; record the number of images between the last facial rotation image when the \(c\)-th candidate rotates the facial region for the \(t\)-th time and the answer image of the subsequent \(c\)-th candidate as the thinking time of the \(c\)-th candidate after the \(t\)-th head rotation.

[0048] Furthermore, by combining the average thinking time of each candidate and the degree of manifestation of cheating characteristics when each candidate rotates the facial region each time, obtain the probability of cheating when each candidate rotates the facial region each time, and then obtain the surveillance images containing abnormal behaviors. The specific methods included are as follows:

[0049] The specific calculation formula for obtaining the degree of cheating characteristic manifestation of the c-th candidate when rotating the face area at the t-th time is as follows:

[0050]

[0051] In the formula, l 1,c,t represents the degree of cheating characteristic manifestation of the c-th candidate when rotating the face area at the t-th time, K 1,c,t represents the degree of cheating characteristic manifestation of the c-th candidate when rotating the face area at the t-th time, Z c represents the average thinking time of the c-th candidate, Z 1,c,t represents the thinking time of the c-th candidate before the t-th head rotation, Z 2,c,t represents the thinking time of the c-th candidate after the t-th head rotation, || represents the absolute value function;

[0052] The specific calculation formula for obtaining the cheating probability of the c-th candidate when rotating the face area at the t-th time is as follows:

[0053]

[0054] In the formula, l 2,c,t represents the cheating probability of the c-th candidate when rotating the face area at the t-th time, l 1,c,t represents the degree of cheating characteristic manifestation of the c-th candidate when rotating the head at the t-th time, δ 1,c,t represents the variance of the thinking time of the c-th candidate before all head rotations, δ 2,c,t represents the variance of the thinking time of the c-th candidate after all head rotations, sigmoid() represents the normalization function;

[0055] Preset the manifestation degree threshold T 5 , if l 2,c,t >T 5 , record the surveillance image of the c-th candidate during the time period when rotating the face area at the t-th time as the surveillance image containing abnormal behavior.

[0056] The present invention also proposes an examination violation behavior detection system based on a surveillance video, including a memory, a processor, and a computer program stored on the memory and running on the processor. The processor executes the computer program to implement the steps of the above method.

[0057] The beneficial effects of the technical solution of the present invention are as follows: this embodiment accurately finds the test paper area in the monitoring image based on the feature that the grayscale distribution of pixels in the blank test paper is relatively similar to the grayscale distribution of pixels in the test paper area in the monitoring image; obtains the face area of ​​the examinee in the monitoring image based on the feature that the distribution of grayscale values ​​of pixels in the face area in the examinee's admission ticket is relatively similar to the distribution of grayscale values ​​of pixels in the face area of ​​the examinee in the monitoring image; obtains the rotation amplitude of the examinee's face area each time the examinee rotates the face area based on the feature that when the examinee rotates the face area, the grayscale distribution of pixels in a part of the face area does not change, but the position of the part of the face area moves; obtains the rotation amplitude of the examinee each time the examinee rotates the face area based on the rotation amplitude each time the examinee rotates the face area and the number of rotations when the examinee rotates the face area The cheating feature expression degree reflects that the greater the rotation amplitude of the examinee's facial area, the greater the possibility that the examinee can see other people's test papers clearly, that is, the greater the cheating feature expression degree of the examinee when rotating the facial area this time; based on the feature that the examinee's test-taking habits will change after the examinee peeks at other people's test papers, based on the examinee's thinking time after rotating the facial area, the cheating possibility of the examinee each time the facial area is rotated is obtained, so that the shorter the examinee's thinking time after rotating the facial area, the greater the possibility of cheating after the examinee rotates the facial area, and the rotation amplitude of the examinee's facial area is combined with the examinee's test-taking habits, so that the calculated cheating possibility of the examinee after rotating the facial area is more accurate, thereby reducing the possibility of regarding a surveillance image without abnormal behavior as a surveillance image with abnormal behavior, and reducing the workload of the invigilator. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 The present invention is a flowchart of the steps of the method for detecting examination violations based on monitoring video;

[0060] Figure 2 This is an example of a surveillance image. DETAILED DESCRIPTION

[0061] To further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following specifically describes, in conjunction with the accompanying drawings and preferred embodiments, the method and system for detecting examination violation behaviors based on surveillance videos proposed according to the present invention, including its specific implementation manners, structures, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.

[0063] The following specifically describes the specific solutions of the method and system for detecting examination violation behaviors based on surveillance videos provided by the present invention in conjunction with the accompanying drawings.

[0064] Please refer to Figure 1 , which shows the flowchart of the steps of the method for detecting examination violation behaviors based on surveillance videos provided by an embodiment of the present invention. The method includes the following steps:

[0065] Step S001: Obtain the surveillance video of the candidate taking the exam to obtain the data sequence of surveillance images; obtain the blank test paper and the facial area of the candidate.

[0066] Specifically, through the surveillance installed in the examination room, obtain the surveillance video of the examination room during the exam. Convert the surveillance video of the examination room per second into n frames of surveillance images. One obtained surveillance image is as Figure 2 shown. Sort the surveillance images according to the video from front to back to obtain the data sequence of surveillance images. Among them, converting the video into multiple frames of images is a well-known prior art and will not be elaborated in this embodiment. The preset number of video frames in this embodiment is n = 30, and this will be described by taking this as an example.

[0067] Furthermore, after the invigilator in the examination room opens the test paper, take a photo of the blank test paper to obtain an image of the blank test paper. Obtain the facial image in the candidate's admission ticket from the registration system to obtain the facial area of the candidate, and obtain the gray values of the pixel points in the facial area of the candidate.

[0068] Step S002: Through edge detection, obtain multiple detection areas in each surveillance image; according to the gray value that appears most frequently in each detection area in each surveillance image, the gray value that appears most frequently in the blank test paper, the gray value that appears most frequently in the facial area of the candidate, and the edge chain code of each detection area, obtain the test paper area and the facial area of the candidate in each surveillance image, and then obtain the facial area and the test paper area of each candidate.

[0069] It should be noted that due to the significant differences in the gray values of the pixel points in the test paper area, desktop area, and examinee's face area within the surveillance image, edge detection is performed on each surveillance image.

[0070] Furthermore, it should be noted that since the distribution of the gray values of the pixel points in the test paper area within the surveillance image is relatively similar to that in the blank test paper area, according to the similarity of the distribution of the gray values of the pixel points in each detection area within the surveillance image and in the blank test paper, the test paper feature manifestation degree of each detection area is obtained.

[0071] Furthermore, it should be noted that since the detection area formed by the scarf worn by the examinee or the clothes worn may be relatively similar to the distribution of the gray values of the pixel points in the blank test paper area, some non-test paper areas have a relatively large test paper feature manifestation degree. By approximating the blank test paper area as a region composed of four straight lines, and making use of the feature that there are more pixel points in the edge chain code of the test paper area whose chain code values are the same as those of the surrounding pixel points, the test paper feature manifestation degree of each detection area within the surveillance image is corrected to obtain the test paper feature manifestation degree of each detection area.

[0072] Specifically, the canny edge detection algorithm is used to perform edge detection on the d-th surveillance image to obtain the detection area in the d-th surveillance image. The canny edge detection algorithm is a well-known existing technology, and will not be elaborated in this embodiment.

[0073] Furthermore, obtain the gray value of the pixel point that appears most frequently in the a-th detection area in the d-th surveillance image, denoted as the representative gray value of the a-th detection area in the d-th surveillance image; obtain the gray value of the pixel point that appears most frequently in the blank test paper area, denoted as the representative gray value of the blank test paper.

[0074] Furthermore, according to the representative gray value of the a-th detection area in the d-th surveillance image and the representative gray value of the blank test paper, the specific calculation formula for the test paper feature manifestation degree of the a-th detection area in the d-th surveillance image is as follows:

[0075] P d,a =exp(-|h d,a -h 1 |)

[0076] In the formula, P d,a represents the test paper feature manifestation degree of the a-th detection area in the d-th surveillance image, h d,a represents the representative gray value of the a-th detection area in the d-th surveillance image, h 1The representative gray value representing a blank test paper, || represents the absolute value function, exp() is the exponential function with the natural constant as the base. In this embodiment, the exp(-x) model is used to present the inverse proportional relationship and normalization processing. x is the input of the model, and the implementer can set the inverse proportional function according to the actual situation.

[0077] It should be noted that, |h d,a -h 1 The smaller the value of | is, the smaller the difference between the gray value of the pixel point with the most occurrences in the ath detection area of the dth monitoring image and the gray value of the pixel point with the most occurrences in the blank test paper. Further, it indicates that the distribution of pixel point gray values in the ath detection area of the dth monitoring image is more similar to the distribution of pixel point gray values in the blank test paper, that is, the possibility that the ath detection area in the dth monitoring image is a test paper area is greater.

[0078] Furthermore, obtain the edge chain code of the ath detection area in the dth monitoring image. Among them, obtaining the edge chain code of each area is a well-known prior art, and this embodiment will not elaborate. Obtain the number of chain code values in the edge chain code of the ath detection area in the dth monitoring image that are the same as the adjacent chain code values on the left and right sides, and denote it as the edge straightness manifestation degree of the ath detection area in the dth monitoring image.

[0079] Furthermore, according to the edge straightness manifestation degree and the test paper feature manifestation degree of the ath detection area in the dth monitoring image, the specific calculation formula for the test paper feature manifestation degree of the ath detection area in the dth monitoring image is as follows:

[0080]

[0081] In the formula, W d,a represents the test paper feature manifestation degree of the ath detection area in the dth monitoring image, n d,a represents the number of chain code values in the edge chain code of the ath detection area in the dth monitoring image, n 1,d,a represents the edge straightness manifestation degree of the ath detection area in the dth monitoring image.

[0082] It should be noted that, The larger the value of, the more obvious the straight line feature of the edge of the ath detection area in the dth monitoring image, and further indicates that the possibility that the ath detection area in the dth monitoring image is a test paper area is greater.

[0083] Furthermore, preset a test paper manifestation degree threshold T 1 , and mark the detection area with a test paper feature manifestation degree greater than the manifestation degree threshold as a test paper area. Among them, the test paper manifestation degree threshold T 1= 0.6, and this will be used as an example for description. In other embodiments, it can be set to other values. Denote the detection area in the d-th monitoring image that is not the test paper area as the suspected face area.

[0084] It should be noted that since the distribution of the gray values of the pixel points in the face area of each candidate is relatively similar to the distribution of the gray values of the pixel points in the face area of their admission ticket. Therefore, based on the distribution of the gray values of the pixel points in the face area of each candidate's admission ticket, the face area of each candidate in the monitoring image is obtained.

[0085] Specifically, denote the gray value that appears most frequently in the f-th suspected face area in the d-th monitoring image as the representative gray value of the f-th suspected face area in the d-th monitoring image, and obtain the representative gray values of all suspected face areas in the d-th monitoring image. Denote the gray value that appears most frequently in the face area of the c-th candidate as the face representative gray value of the c-th candidate.

[0086] Furthermore, denote the suspected face area in the d-th monitoring image with the smallest difference (absolute value of the difference) between the representative gray value and the face representative gray value of the c-th candidate as the face area of the c-th candidate in the d-th monitoring image.

[0087] Furthermore, if there are multiple suspected face areas in the d-th monitoring image with the smallest difference between the representative gray value and the face representative gray value of the c-th candidate. Calculate the information entropy of the gray values of the pixel points in the face area of the c-th candidate, and calculate the information entropy of the gray values of the pixel points in the suspected face area with the smallest difference between the representative gray value and the face representative gray value of the c-th candidate in the d-th monitoring image. Denote the suspected face area with the smallest absolute value of the difference between the information entropy of the gray values of the pixel points in the multiple suspected face areas with the smallest difference between the representative gray value and the face representative gray value of the c-th candidate in the d-th monitoring image and the information entropy of the gray values of the pixel points in the face area of the c-th candidate as the face area of the c-th candidate in the d-th monitoring image. Among them, obtaining the information entropy of the gray values of the pixel points in each area is a well-known prior art, and this embodiment will not elaborate.

[0088] Furthermore, denote the test paper area in the d-th monitoring image with the closest Euclidean distance to the center between the face area of the c-th candidate as the test paper area of the c-th candidate in the d-th monitoring image.

[0089] Thus far, the face area and the test paper area of each candidate in each monitoring image are obtained.

[0090] Step S003: Perform template matching between the face region of each candidate in each surveillance image and the facial region of the candidate to obtain a number of surveillance images when each candidate rotates the face region each time; divide the surveillance images when each candidate rotates the face region each time and the surveillance image of the previous frame before each rotation of the face region into multiple pixel blocks, and obtain the rotation amplitude of each candidate when rotating the face region each time according to the distribution of gray values in the pixel blocks within different surveillance images.

[0091] It should be noted that when a candidate peeks at others' test papers, in order to see the content in others' test papers clearly, the candidate will rotate the face region. Therefore, it is judged whether the candidate rotates the face region through multiple surveillance images, and the rotation direction of the candidate's face region is obtained.

[0092] It should be noted that when a candidate is taking an exam normally in the examination room, the matching degree between the candidate's face region and the facial region in the admission ticket is relatively high, while when the candidate turns the head, the matching degree between the candidate's face region and the facial region in the admission ticket is relatively low. Therefore, it is judged whether the candidate is turning the head according to the matching degree between the candidate's face region and the facial region in the admission ticket. Since when the candidate turns the head, the head first moves from the normal position to one side and then returns to the normal position, therefore, multiple rotation actions between two returns to the normal position are regarded as one rotation of the face region.

[0093] Furthermore, it should be noted that when the candidate's face region rotates, the distribution of gray values of pixel points in a part of the face region does not change, but this part of the face region moves as a whole to one side. For example, when the candidate's face region rotates to the right, the distribution of gray values of pixel points in the candidate's left face region does not change, but the candidate's left face region moves as a whole to the right. According to the distribution of gray values of pixel points in the candidate's face region, the rotation direction of the candidate's face region is obtained, and the rotation amplitude of the candidate's face is obtained.

[0094] Specifically, calculate the template matching between the face region of the c-th candidate in the d-th surveillance image and the facial region of the c-th candidate, and record the template matching result as the face rotation degree of the c-th candidate in the d-th surveillance image.

[0095] Furthermore, a preset rotation degree threshold T 2 , the preset rotation degree threshold T 2 in this embodiment is 0.6, and this is used as an example for description. In other embodiments, it can be set to other values. If the face rotation degree of the c-th candidate in the d-th surveillance image is greater than the rotation degree threshold T 3 , record the d-th surveillance image as the face rotation image of the c-th candidate. In the data sequence of the surveillance images, an image segment composed of multiple consecutive face rotation images is used as a number of surveillance images when the c-th candidate rotates the face region once.

[0096] Specifically, use the superpixel segmentation algorithm to segment the face regions in the surveillance image of the c-th candidate in the frame before the k-th face rotation and the b-th surveillance image when the face region is rotated, and divide the face regions in the surveillance image of the c-th candidate in the frame before the k-th face rotation and the b-th surveillance image when the face region is rotated into multiple pixel blocks. The superpixel segmentation algorithm is a well-known existing technology and will not be elaborated in this embodiment.

[0097] Further, according to the distribution of the gray values of the pixel points in the m-th pixel block in the b-th surveillance image when the c-th candidate rotates the face region for the k-th time and the distribution of the gray values of the pixel points in the q-th pixel block in the surveillance image of the c-th candidate in the frame before the k-th face rotation, the specific calculation steps for obtaining the gray distribution consistency between the m-th pixel block in the b-th surveillance image when the c-th candidate rotates the face region for the k-th time and the q-th pixel block in the surveillance image of the c-th candidate in the frame before the k-th face rotation are as follows:

[0098] Further, the mean of the means of the absolute values of the differences between the gray values of all pixel points with a gray value of i in the m-th pixel block in the b-th surveillance image when the c-th candidate rotates the face region for the k-th time and the gray values of other pixel points in the 8-neighborhood is denoted as the gray distribution of the pixel points with a gray value of i in the m-th pixel block in the b-th surveillance image when the c-th candidate rotates the face region for the k-th time. The mean of the means of the absolute values of the differences between the gray values of all pixel points with a gray value of i in the k-th pixel block in the surveillance image of the c-th candidate in the frame before the k-th face rotation and the gray values of other pixel points in the 8-neighborhood is denoted as the gray distribution of the pixel points with a gray value of i in the k-th pixel block in the surveillance image of the c-th candidate in the frame before the k-th face rotation.

[0099] Further, the specific calculation formula for obtaining the gray distribution consistency between the q-th pixel block in the surveillance image of the c-th candidate in the frame before the k-th face rotation and the m-th pixel block in the b-th surveillance image when the face region is rotated is as follows:

[0100]

[0101] In the formula, S(c,k) b,m,q represents the gray distribution consistency between the q-th pixel block in the surveillance image of the c-th candidate in the frame before the k-th face rotation and the m-th pixel block in the b-th surveillance image when the face region is rotated, and W(c,k) b,m,i represents the number of pixel points with a gray value of i in the m-th pixel block in the b-th surveillance image when the c-th candidate rotates the face region for the k-th time, and W(c,k) q,iDenote the number of pixels with gray value \(i\) in the \(q\)-th pixel block of the monitoring image of the \(c\)-th candidate in the previous frame before the \(k\)-th face rotation area, \(\sigma(c,k)\) b,m,i Denote the gray distribution of the pixels with gray value \(i\) in the \(m\)-th pixel block of the \(b\)-th monitoring image when the \(c\)-th candidate rotates the face area for the \(k\)-th time, \(\sigma(c,k)\) q,i Denote the gray distribution of the pixels with gray value \(i\) in the \(q\)-th pixel block of the monitoring image of the \(c\)-th candidate in the previous frame before the \(k\)-th face rotation area. \(||\) represents the absolute value function, and \(exp( )\) is the exponential function with the natural constant as the base. In this embodiment, the \(exp(-x)\) model is used to present the inverse proportional relationship and normalization processing. \(x\) is the input of the model, and the implementer can set the inverse proportional function and normalization function according to the actual situation.

[0102] It should be noted that, \(|W(c,k)\) b,m,i -W(c,k) q,i | The smaller the value, the closer the number of pixels with gray value \(i\) in the two pixel blocks, which further indicates that the gray distribution of the \(m\)-th pixel block in the \(b\)-th monitoring image is more consistent with the \(q\)-th pixel block in the monitoring image before the face rotation area; \(|\sigma(c,k)\) b,m,i -σ(c,k) b+1,q,i | The smaller the value, the more consistent the gray value distribution of the pixels around the pixels with gray value \(i\) in the \(m\)-th pixel block in the \(b\)-th monitoring image and the \(q\)-th pixel block in the monitoring image before the face rotation area, which further indicates the gray distribution consistency of the \(m\)-th pixel block in the \(b\)-th monitoring image and the \(q\)-th pixel block in the monitoring image before the face rotation area.

[0103] Furthermore, preset the distribution consistency threshold \(T\) 3 , the preset distribution consistency threshold \(T\) in this embodiment 3 = 0.5, and this is used as an example for description. In other implementation manners, it can be set to other values. Denote the pixel block in the monitoring image before the \(k\)-th face rotation area corresponding to the two pixel blocks with the largest gray distribution consistency between the \(q\)-th pixel block in the monitoring image of the \(c\)-th candidate in the previous frame before the \(k\)-th face rotation area and the \(m\)-th pixel block in the \(b\)-th monitoring image when the face rotates for the \(k\)-th time as the similar pixel block of the \(m\)-th pixel block in the \(b\)-th monitoring image of the \(c\)-th candidate when the face rotates for the \(k\)-th time. If the gray distribution consistency between the \(m\)-th pixel block in the \(b\)-th monitoring image of the \(c\)-th candidate when the face rotates for the \(k\)-th time and its similar pixel block is greater than the distribution consistency threshold \(T\) 3 , denote the similar pixel block of the \(m\)-th pixel block in the \(b\)-th monitoring image of the \(c\)-th candidate when the face rotates for the \(k\)-th time as the corresponding pixel block of the \(m\)-th pixel block in the \(b\)-th monitoring image of the \(c\)-th candidate when the face rotates for the \(k\)-th time.

[0104] Further, the absolute value of the difference between the position of the center of the m-th pixel block in the b-th monitoring image when the c-th candidate rotates the face area for the k-th time and the position of the center of the corresponding pixel block in the corresponding monitoring image is denoted as a rotation distance when the c-th candidate rotates the face area for the k-th time; the maximum value of the rotation distances of all pixel blocks in all monitoring images when the c-th candidate rotates the face area for the k-th time is denoted as the rotation amplitude when the c-th candidate rotates the face area for the k-th time.

[0105] Step S004: Obtain the cheating characteristic manifestation degree of each candidate when rotating the face area each time according to the rotation amplitude of each candidate when rotating the face area each time and the number of times each candidate rotates the face area.

[0106] It should be noted that during the exam, the greater the rotation amplitude of the candidate's face area, the greater the possibility that the candidate can see other people's test papers. Therefore, according to the rotation amplitude of the face area when the candidate rotates the face area each time, calculate the cheating characteristic manifestation degree of the candidate when rotating the face area each time.

[0107] Furthermore, it should be noted that if a candidate has the habit of rotating the face area when thinking, then the candidate will think multiple times during the exam, resulting in the candidate rotating the face area multiple times. During the exam, since the invigilator will constantly patrol, the candidate will not frequently rotate the head to peek at other people's test papers and cheat. Therefore, according to the number of times the candidate rotates the face area during the exam, obtain the cheating characteristic manifestation degree of the candidate when rotating the face area each time.

[0108] Furthermore, it should be noted that when a candidate has the habit of rotating the face area during the thinking process, since the rotation of the face area is caused by the candidate's habit, the amplitude of each rotation of the face area by the candidate is relatively similar. When a candidate cheats, the purpose of rotating the face area is to see other people's test papers; since the content that the candidate needs to see during the rotation of the face area is in different areas of the test paper, the rotation amplitude of the candidate who cheats by rotating the face area is different each time when rotating the face area. Therefore, according to the rotation amplitude of the candidate when rotating the face area each time, obtain the cheating characteristic manifestation degree of the candidate when rotating the face area each time.

[0109] Specifically, the specific calculation formula for obtaining the cheating performance degree of the c-th candidate when rotating the face area for the t-th time is as follows:

[0110]

[0111] In the formula, K c,tDenote the cheating performance degree of the c-th candidate when turning the face area at the t-th time, F c,t Denote the rotation amplitude of the c-th candidate when turning the face area at the t-th time, N c Denote the number of times the c-th candidate turns the face area.

[0112] It should be noted that, F c,t The larger the value of F is, the larger the rotation amplitude of the c-th candidate when turning the face area at the t-th time is, which further indicates that the greater the possibility of the c-th candidate seeing other people's test papers when turning the face area at the t-th time is, that is, the greater the possibility of the c-th candidate cheating when turning the face area at the t-th time; The larger the value of N c is, the more times the c-th candidate turns the face area during the exam, which further indicates that the c-th candidate has the habit of turning the face area to think during the exam, that is, the lower the possibility of the c-th candidate cheating when turning the face area.

[0113] Furthermore, according to the rotation amplitude of the c-th candidate when turning the face area each time, the specific calculation formula for the cheating characteristic manifestation degree of the c-th candidate when turning the face area at the t-th time is as follows:

[0114]

[0115] In the formula, K 1,c,t Denote the cheating characteristic manifestation degree of the c-th candidate when turning the face area at the t-th time, K c,t Denote the cheating performance degree of the c-th candidate when turning the face area at the t-th time, F c,t Denote the rotation amplitude of the c-th candidate when turning the face area at the t-th time, F c,r Denote the rotation amplitude of the c-th candidate when turning the face area at the r-th time, || represents the absolute value function.

[0116] It should be noted that, The smaller the value of is, the more similar the rotation amplitude of the c-th candidate when turning the face area at the t-th time is to the rotation amplitude when turning the face area at other times, and the more in line with the characteristic that the rotation amplitudes of the candidate when turning the face area each time are more similar when the candidate has the habit of turning the face area during the thinking process, that is, the lower the possibility of the c-th candidate cheating when turning the face area at the t-th time.

[0117] Step S005: Based on the test paper areas of the same examinee in multiple monitoring graphics, obtain the answer sheet image of each examinee and the average thinking time of each examinee; based on the answer sheet image of each examinee, obtain the thinking time of each examinee before each face rotation area and the thinking time of each examinee after each face rotation area; combine the average thinking time of each examinee with the cheating characteristic manifestation degree of each examinee when rotating the face area each time to obtain the cheating possibility of each examinee when rotating the face area each time, and then obtain the monitoring images containing abnormal behaviors and conduct cheating judgment.

[0118] It should be noted that examinees cheat during the exam because they can't do the questions, so they peek at others' test papers. There are mainly two characteristics when examinees can't do the questions. One is that after reading the questions, the examinee confirms that they can't do it after a short period of thinking and peeks at others' test papers, which is manifested as a short thinking time before the examinee rotates the face area; or the examinee confirms that they can't do it after a long period of thinking and then peeks at others' test papers, which is manifested as a long thinking time before the examinee rotates the face area. Therefore, by comparing the thinking time before the examinee rotates the face area with the normal thinking time of the examinee, the possibility of the examinee cheating can be judged.

[0119] Furthermore, it should be noted that under normal circumstances, examinees only do two things during the exam, stop writing to think, and use the pen to answer questions. That is, the interval between two adjacent times of using the pen to answer questions is the thinking time of the examinee. Therefore, obtain the time period when the examinee uses the pen to answer questions to get the time period when the examinee stops writing to think.

[0120] Furthermore, it should be noted that when the examinee uses the pen to answer questions, the gray value of the pixel points in the test paper area will change. Therefore, according to whether the gray value of the pixel points in the test paper area of the same examinee changes in two adjacent monitoring images, judge whether the examinee is answering questions, and then obtain the time period when the examinee stops writing to think.

[0121] Furthermore, it should be noted that when the examinee cheats by rotating the face area, after seeing clearly the test paper of others, the examinee quickly turns the face area back to the original position and writes the answer on the test paper. It is manifested that the examinee answers the test paper after a very short thinking time after rotating the face area. Therefore, by comparing the thinking time from after the examinee rotates the face area to before answering the questions with the normal thinking time of the examinee, the possibility of the examinee cheating can be judged.

[0122] It should be further noted that if a candidate has the thinking habit of turning their head during the exam, then after each time the candidate reads the question, they will turn their face area after a similar thinking time; when the candidate is cheating, the time from when the candidate reads the question in the test paper to when they realize they can't do it is relatively random, resulting in different time intervals for the cheating candidate to turn their head each time from when they finish reading the question. Therefore, according to the time interval from before each time the candidate turns their face area to when they stop writing to answer, the possibility of the candidate cheating is judged.

[0123] Specifically, the difference method is used to subtract the test paper area of the c-th candidate in the f-th monitoring image from the test paper area of the c-th candidate in the (f + 1)-th monitoring image to obtain the test paper comparison area of the c-th candidate in the f-th monitoring image.

[0124] Furthermore, a comparison threshold T is preset 4 , if the proportion of the number of pixels with a gray value of 0 in the test paper comparison area of the c-th candidate in the f-th monitoring image to the number of pixels in the test paper comparison area is greater than the comparison threshold T 4 , the f-th monitoring image is recorded as the thinking image of the c-th candidate; if the proportion of the number of pixels with a gray value of 0 in the test paper comparison area of the c-th candidate in the f-th monitoring image to the number of pixels in the test paper comparison area is less than or equal to the comparison threshold T 4 , the f-th monitoring image is recorded as the answer image of the c-th candidate. The comparison threshold T preset in this embodiment 4 = 0.6, and this is used as an example for description. In other embodiments, it can be set to other values.

[0125] If the test paper area of the c-th candidate in the f-th monitoring image is the same as the test paper area of the c-th candidate in the (f + 1)-th monitoring image, the f-th monitoring image is recorded as the thinking image of the c-th candidate. If the test paper area of the c-th candidate in the f-th monitoring image is different from the test paper area of the c-th candidate in the (f + 1)-th monitoring image, the f-th monitoring image is recorded as the answer image of the c-th candidate.

[0126] Furthermore, the number of monitoring images formed by consecutive thinking images of the c-th candidate in the data sequence of the monitoring images is recorded as the thinking time of the c-th candidate once. The average value of all the thinking times of the c-th candidate is recorded as the average thinking time of the c-th candidate.

[0127] Further, the number of images between the first face rotation image of the c-th candidate when rotating the face area for the t-th time and the answer image of the previous c-th candidate is recorded as the thinking time of the c-th candidate before the t-th head rotation; the number of images between the last face rotation image of the c-th candidate when rotating the face area for the t-th time and the answer image of the subsequent c-th candidate is recorded as the thinking time of the c-th candidate after the t-th head rotation.

[0128] Further, the specific calculation formula for obtaining the degree of cheating characteristic manifestation of the c-th candidate when rotating the face area for the t-th time is as follows:

[0129]

[0130] In the formula, l 1,c,t represents the degree of cheating characteristic manifestation of the c-th candidate when rotating the face area for the t-th time, K 1,c,t represents the degree of cheating characteristic embodiment of the c-th candidate when rotating the face area for the t-th time, Z c represents the average thinking time of the c-th candidate, Z 1,c,t represents the thinking time of the c-th candidate before the t-th head rotation, Z 2,c,t represents the thinking time of the c-th candidate after the t-th head rotation, and | | represents the absolute value function.

[0131] It should be noted that the larger the value of |Z c -Z 1,c,t -Z 2,c,t |, the greater the difference between the thinking time of the c-th candidate before and after the t-th head rotation and their normal thinking time. The larger the value of, the shorter or longer the thinking time of the c-th candidate before the t-th head rotation, indicating a greater possibility of this candidate cheating; The larger the value of, the shorter the thinking time of the c-th candidate after the t-th head rotation, indicating a greater possibility of this candidate peeking at others' test papers during this head rotation.

[0132] Further, the specific calculation formula for obtaining the cheating possibility of the c-th candidate when rotating the face area for the t-th time is as follows:

[0133]

[0134] In the formula, l 2,c,t represents the cheating possibility of the c-th candidate when rotating the face area for the t-th time, l 1,c,t represents the degree of cheating characteristic manifestation of the c-th candidate when rotating the head for the t-th time, δ 1,c,t represents the variance of the thinking time of the c-th candidate before all head rotations, δ 2,c,tIt represents the variance of the thinking time of the c-th candidate after all head rotations, and sigmoid() represents the normalization function.

[0135] It should be noted that the smaller the value of δ 1,c,t , the more it indicates that the c-th candidate has the habit of turning their head, and then the possibility of this candidate cheating by turning their head is relatively low; the smaller the value of δ 2,c,t , the more consistent the time from when the c-th candidate turns their head to when they start writing, which is more in line with the characteristic of copying after seeing others' answers when a candidate cheats.

[0136] Furthermore, a threshold T for reflecting the degree is preset 5 . If l 2,c,t >T 5 , several surveillance images when the c-th candidate rotates the facial area at the t-th time are recorded as surveillance images containing abnormal behaviors; abnormal behavior judgments are made on several surveillance images when all candidates rotate the facial area each time, and several surveillance images containing abnormal behaviors are obtained.

[0137] Mark the surveillance images of candidates with abnormal behaviors, and remind the surveillance personnel watching the video to watch several frames of surveillance images before and after the marked area to determine whether the candidates with abnormal behaviors are cheating, and the candidates who are cheating are obtained.

[0138] So far, this embodiment is completed.

[0139] Another embodiment of the present invention provides an examination violation behavior detection system based on surveillance video. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the above method steps S001 to step S005 are implemented.

[0140] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting examination irregularities based on surveillance video, characterized in that: The method comprises the following steps: Obtain surveillance video of examinees taking the test, and obtain a data sequence of surveillance images; obtain blank test papers and examinees' facial regions; Through edge detection, multiple detection areas in each monitoring image are obtained; according to the gray value that appears most frequently in each detection area in each monitoring image, the gray value that appears most frequently in the blank test paper, the gray value that appears most frequently in the facial area of ​​the examinee, and the edge chain code of each detection area, the test paper area and the examinee's facial area in each monitoring image are obtained, and then the facial area and test paper area of ​​each examinee are obtained; Performing template matching between the facial region of each examinee in each monitoring image and the facial region of the examinee, obtaining a number of monitoring images of each examinee when the facial region is rotated each time; dividing the monitoring image of each examinee when the facial region is rotated each time and the monitoring image of the previous frame of each facial region rotation into a plurality of pixel blocks, and obtaining the rotation amplitude of each examinee when the facial region is rotated each time according to the distribution of gray values ​​in the pixel blocks in different monitoring images; According to the rotation amplitude of each examinee when the face region is rotated each time, and the number of times each examinee rotates the face region, the cheating characteristic manifestation degree of each examinee when the face region is rotated each time is obtained; According to the test paper area of ​​the same examinee in multiple monitoring images, the answer image of each examinee and the average thinking time of each examinee are obtained; according to the answer image of each examinee, the thinking time of each examinee before each rotation of the face area and the thinking time of each examinee after each rotation of the face area are obtained; combining the average thinking time of each examinee and the cheating feature expression degree of each examinee when the face area is rotated each time, the cheating possibility of each examinee when the face area is rotated each time is obtained, and then the monitoring image containing abnormal behavior is obtained and cheating judgment is made; The method of obtaining the test paper area and the examinee's face area in each monitoring image according to the gray value that appears most frequently in each detection area in each monitoring image, the gray value that appears most frequently in the blank test paper, the gray value that appears most frequently in the examinee's face area, and the edge chain code of each detection area includes: Obtain the grayscale value of the pixel point that appears most frequently in the ath detection area in the dth monitoring image, and record it as the representative grayscale value of the ath detection area in the dth monitoring image; obtain the grayscale value of the pixel point that appears most frequently in the blank test paper area, and record it as the representative grayscale value of the blank test paper; Obtain the edge chain code of the a-th detection area in the d-th monitoring image, and record the number of chain code values ​​in the edge chain code of the a-th detection area in the d-th monitoring image that are the same as the chain code values ​​adjacent to the left and right sides as the edge straight line embodiment degree of the a-th detection area in the d-th monitoring image; The specific calculation formula for calculating the test paper feature embodiment degree of the ath detection area in the dth monitoring image is as follows: Where W d,a represents the degree of test paper feature expression of the ath detection area in the dth monitoring image, h d,a represents the representative gray value of the ath detection area in the dth monitoring image, h1 represents the representative gray value of the blank test paper, || represents the absolute value function, exp() is an exponential function with a natural constant as the base, n d,a represents the number of chain code values ​​in the edge chain code of the a-th detection area in the d-th monitoring image, n 1,d,a Indicates the degree of edge straight line reflection of the a-th detection area in the d-th monitoring image; A test paper representation degree threshold T1 is preset, and the detection area where the test paper feature representation degree is greater than the representation degree threshold is recorded as the test paper area; the detection area that is not the test paper area is recorded as the suspected face area; The grayscale value that appears most often in the f-th suspected face region in the d-th monitored image is recorded as the representative grayscale of the f-th suspected face region in the d-th monitored image, and the representative grayscales of all suspected face regions in the d-th monitored image are obtained; The gray value that appears most often in the c-th examinee's facial region is recorded as the c-th examinee's facial representative gray value; The suspected face region with the smallest difference between the representative grayscale in the d-th monitoring image and the representative grayscale of the face of the c-th examinee is recorded as the face region of the c-th examinee in the d-th monitoring image; The method of obtaining the facial area and test paper area of ​​each examinee includes: The test paper area in the d-th monitoring image that has the closest Euclidean distance between its center and the facial area of ​​the c-th examinee is recorded as the test paper area of ​​the c-th examinee in the d-th monitoring image.

2. The method for detecting examination irregularities based on surveillance video according to claim 1, characterized in that: The specific method of performing template matching between the facial area of ​​each examinee in each monitoring image and the facial area of ​​the examinee to obtain a plurality of monitoring images of each examinee when the facial area is rotated each time includes: Calculate the facial area of ​​the cth examinee in the dth monitoring image and the facial area of ​​the cth examinee for template matching, and record the template matching result as the degree of facial rotation of the cth examinee in the dth monitoring image; Assume a rotation degree threshold T2. If the rotation degree of the face of the c-th examinee in the d-th monitoring image is greater than the rotation degree threshold T2, the d-th monitoring image is recorded as the face rotation image of the c-th examinee. In the data sequence of monitoring images, an image segment consisting of a plurality of continuous facial rotation images is used as a number of monitoring images of the cth examinee when the facial region is rotated once.

3. The method for detecting examination irregularities based on surveillance video according to claim 1, characterized in that: The monitoring image of each examinee when the face area is rotated each time and the monitoring image of the previous frame of each face area rotation are divided into a plurality of pixel blocks, and the rotation amplitude of each examinee when the face area is rotated each time is obtained according to the distribution of gray values ​​in the pixel blocks in different monitoring images, including the specific method of: Using a superpixel segmentation algorithm, segment the face region of the c-th examinee in the monitoring image of the previous frame before the k-th rotation of the face region and the b-th monitoring image when the face region is rotated, and divide the face region of the c-th examinee in the monitoring image of the previous frame before the k-th rotation of the face region and the b-th monitoring image when the face region is rotated into a plurality of pixel blocks; The average of the averages of the absolute values ​​of the differences between the grayscale values ​​of all pixels with grayscale value i in the mth pixel block in the bth monitoring image when the cth examinee rotates the face area for the kth time and the grayscale values ​​of other pixels in the 8-neighborhood is recorded as the grayscale distribution of the pixel with grayscale value i in the mth pixel block in the bth monitoring image when the cth examinee rotates the face area for the kth time; The average of the averages of the absolute values ​​of the differences between the grayscale values ​​of all pixels with grayscale value i in the k-th pixel block in the monitoring image of the c-th examinee in the previous frame when the face region of the c-th examinee rotated for the k-th time and the grayscale values ​​of other pixels in the 8-neighborhood is recorded as the grayscale distribution of the pixels with grayscale value i in the k-th pixel block in the monitoring image of the c-th examinee in the previous frame when the face region of the c-th examinee rotated for the k-th time; The specific calculation formula for the grayscale distribution consistency between the qth pixel block in the monitoring image of the cth examinee in the previous frame when the face area was rotated for the kth time and the mth pixel block in the bth monitoring image when the face area was rotated is as follows: In the formula, S(c,k) b,m,q W(c,k) represents the grayscale distribution consistency between the qth pixel block in the monitoring image of the cth examinee in the previous frame when the face area was rotated for the kth time and the mth pixel block in the bth monitoring image when the face area was rotated. b,m,i W(c,k) represents the number of pixels with grayscale value i in the mth pixel block in the bth monitoring image when the cth examinee rotates his face area for the kth time. q,i represents the number of pixels with grayscale value i in the qth pixel block in the monitoring image of the cth examinee before the kth rotation of the face area, σ(c,k) b,m,i represents the grayscale distribution of the pixel with grayscale value i in the mth pixel block in the bth monitoring image when the cth examinee rotates his face area for the kth time, σ(c,k) q,i represents the grayscale distribution of the pixel with grayscale value i in the qth pixel block in the monitoring image of the cth examinee in the previous frame before the kth rotation of the face area, || represents the absolute value function, and exp() is an exponential function with a natural constant as the base; A distribution consistency threshold T3 is preset, and the pixel block in the monitoring image before the kth rotation of the face area of ​​the cth examinee corresponding to the two pixel blocks with the greatest grayscale distribution consistency between the qth pixel block in the monitoring image of the frame before the kth rotation of the face area of ​​the cth examinee and the mth pixel block in the bth monitoring image when the face area is rotated is recorded as a similar pixel block to the mth pixel block in the bth monitoring image when the face area of ​​the cth examinee is rotated for the kth time; If the grayscale distribution consistency between the mth pixel block in the bth monitoring image when the cth examinee rotates the face area for the kth time and its similar pixel block is greater than the distribution consistency threshold T3, the similar pixel block of the mth pixel block in the bth monitoring image when the cth examinee rotates the face area for the kth time is recorded as the corresponding pixel block of the mth pixel block in the bth monitoring image when the cth examinee rotates the face area for the kth time; According to the distribution of each pixel block and its corresponding pixel block in the monitoring image when each examinee rotates the facial region each time, the rotation amplitude of each examinee when the facial region is rotated each time is obtained.

4. The method for detecting examination irregularities based on surveillance video according to claim 3 is characterized in that: The method of obtaining the rotation amplitude of each examinee's face region each time when the examinee rotates the face region each time according to the distribution of each pixel block and its corresponding pixel block in the monitoring image when each examinee rotates the face region each time includes the following specific methods: The absolute value of the difference between the position of the center of the mth pixel block in the bth monitoring image when the cth candidate rotates his facial area for the kth time and the position of the center of the corresponding pixel block in the corresponding monitoring image is recorded as a rotation distance when the cth candidate rotates his facial area for the kth time; the maximum value of the rotation distances of all pixel blocks in all monitoring images when the cth candidate rotates his facial area for the kth time is recorded as the rotation amplitude of the cth candidate when he rotates his facial area for the kth time.

5. The method for detecting examination irregularities based on surveillance video according to claim 1, characterized in that: The cheating characteristic manifestation degree of each examinee when rotating the facial area each time is obtained according to the rotation amplitude of each examinee when rotating the facial area each time and the number of times each examinee rotates the facial area, including the specific method of: In the formula, K 1,c,t represents the cheating feature degree of the cth examinee when rotating the face area for the tth time, F c,t represents the rotation amplitude of the cth examinee when he rotates his face area for the tth time, F c,r N represents the rotation amplitude of the cth examinee when he rotates the face area for the rth time. c Indicates the number of times the cth candidate rotates the facial area.

6. The method for detecting examination irregularities based on surveillance video according to claim 1, characterized in that: The method of obtaining the answer image of each examinee and the average thinking time of each examinee according to the test paper area of ​​the same examinee in multiple monitoring images; obtaining the thinking time of each examinee before each rotation of the face area and the thinking time of each examinee after each rotation of the face area according to the answer image of each examinee includes the following specific methods: Subtract the test paper area of ​​the cth examinee in the fth monitoring image from the test paper area of ​​the cth examinee in the f+1th monitoring image to obtain the test paper comparison area of ​​the cth examinee in the fth monitoring image; A comparison threshold T4 is preset. If the ratio of the number of pixels with a gray value of 0 in the comparison area of ​​the test paper of the c-th examinee in the f-th monitoring image to the number of pixels in the comparison area of ​​the test paper is greater than the comparison threshold T4, the f-th monitoring image is recorded as the thinking image of the c-th examinee; if the ratio of the number of pixels with a gray value of 0 in the comparison area of ​​the test paper of the c-th examinee in the f-th monitoring image to the number of pixels in the comparison area of ​​the test paper is less than or equal to the comparison threshold T4, the f-th monitoring image is recorded as the answering image of the c-th examinee; The number of monitoring images composed of the continuous thinking images of the c-th examinee in the monitoring image data sequence is recorded as one thinking time of the c-th examinee; the average of all thinking times of the c-th examinee is recorded as the average thinking time of the c-th examinee; The number of images between the first face rotation image and the answer image of the previous c-th candidate when the c-th candidate rotates his face area for the tth time is recorded as the thinking time of the c-th candidate before the t-th head rotation; the number of images between the last face rotation image and the answer image of the next c-th candidate when the c-th candidate rotates his face area for the t-th time is recorded as the thinking time of the c-th candidate after the t-th head rotation.

7. The method for detecting examination irregularities based on surveillance video according to claim 1, characterized in that: The method of combining the average thinking time of each examinee with the cheating feature expression degree of each examinee when the face area is rotated each time to obtain the cheating possibility of each examinee when the face area is rotated each time, and then obtaining the monitoring image containing abnormal behavior includes the following specific methods: The specific calculation formula for obtaining the cheating feature expression degree of the c-th examinee when rotating the face area for the t-th time is as follows: In the formula, l 1,c,t represents the cheating characteristic level of the cth examinee when rotating the face area for the tth time, K 1,c,t represents the cheating feature degree of the cth examinee when rotating the face area for the tth time, Z c represents the average thinking time of the cth examinee, Z 1,c,t represents the thinking time of the cth examinee before the tth head turn, Z 2,c,t represents the thinking time of the cth examinee after the tth head turn, || represents the absolute value function; The specific calculation formula for obtaining the cheating possibility of the cth examinee when rotating the face area for the tth time is as follows: In the formula, l 2,c,t represents the cheating possibility of the cth examinee when he rotates the face area for the tth time, l 1,c,t represents the cheating characteristic level of the cth examinee when he turns his head for the tth time, δ 1,c,t represents the variance of the cth examinee’s thinking time before all head turns, δ 2,c,t represents the variance of the cth examinee’s thinking time after all head turns, sigmoid() represents the normalization function; The preset manifestation level threshold T5, if l 2,c,t >T5, record the monitoring image of the c-th examinee during the time period when he rotates his facial area for the t-th time as a monitoring image containing abnormal behavior.

8. A system for detecting irregularities in examinations based on surveillance video, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method for detecting examination irregularities based on surveillance video as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Examination cheat detection method and apparatus thereof

    CN107491717A

  • Online examination anti-cheating implementation method based on AI face recognition technology

    CN113657300A