Examination violation behavior detection method and system based on monitoring video
By using edge detection and template matching technology in surveillance videos, the test paper area and face area are identified, and the rotation amplitude and cheating characteristics are calculated in combination with the answer image and thinking time, the problem of misjudgment behavior in the existing technology is solved. Improves the accuracy and efficiency of detection.
Patent Information
- Application Number
- CN202411521853.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-29
AI Technical Summary
When detecting examination violations in surveillance videos, the candidates' normal behavior is easily misjudged as abnormal behavior, resulting in an increase in unnecessary workload.
Through edge detection and template matching, the test paper area and the candidate's face area in the monitoring image are accurately identified, combined with the candidate's answering image and thinking time, the rotation amplitude and cheating characteristics are calculated, and the possibility of cheating is judged.
It improves the accuracy of the test, reduces the increase in the workload of invigilators, and ensures the fairness and efficiency of the exam.
Smart Images

Figure CN119399838A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for detecting examination irregularities based on surveillance videos. Background Art
[0002] The fairness, justice and security of examinations are social focus issues that concern the public. In order to ensure the fairness and justice of examinations, cameras will be installed in the examination rooms, and invigilators will monitor the examination behavior of candidates through the cameras to identify candidates who cheat.
[0003] Currently, the examination room surveillance video obtained by the surveillance camera is analyzed to obtain the rotation of each candidate's face area and judge whether the candidate has abnormal behavior. This method ignores the behavioral habit of some candidates to rotate their face area during thinking, and misjudges the normal behavior of some candidates as abnormal behavior, resulting in an increase in surveillance images containing abnormal behavior and increasing the workload of the invigilator. Summary of the invention
[0004] The present invention provides a method and system for detecting examination irregularities based on monitoring videos to solve the existing problems.
[0005] The method and system for detecting examination irregularities based on surveillance video of the present invention adopt the following technical solutions:
[0006] The present invention proposes a method for detecting examination irregularities based on surveillance video, which comprises the following steps:
[0007] Obtain surveillance video of examinees taking the test, and obtain a data sequence of surveillance images; obtain blank test papers and examinees' facial regions;
[0008] 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;
[0009] 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;
[0010] 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;
[0011] Based on the test paper area of the same candidate in multiple monitoring images, the answer image of each candidate and the average thinking time of each candidate are obtained; based on the answer image of each candidate, the thinking time of each candidate before each rotation of the facial area and the thinking time of each candidate after each rotation of the facial area are obtained; combined with the average thinking time of each candidate and the degree of cheating characteristics of each candidate when the facial area is rotated each time, the cheating possibility of each candidate when the facial area is rotated each time is obtained, and then the monitoring image containing abnormal behavior is obtained and cheating judgment is made.
[0012] Furthermore, 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 the following specific methods:
[0013] 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;
[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 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;
[0015] 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:
[0016]
[0017] 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;
[0018] 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;
[0019] 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;
[0020] 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;
[0021] The suspected face region whose representative grayscale in the d-th monitoring image has the smallest difference with 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.
[0022] Furthermore, the method of obtaining the facial area and the test paper area of each examinee includes:
[0023] 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.
[0024] Furthermore, the template matching of the facial region of each examinee in each monitoring image with the facial region of the examinee to obtain a plurality of monitoring images of each examinee each time the facial region is rotated includes the following specific methods:
[0025] 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;
[0026] 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.
[0027] 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.
[0028] Furthermore, the monitoring image of each examinee when the face area is rotated each time and the monitoring image of the previous frame of each rotation of the face area 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:
[0029] 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;
[0030] 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;
[0031] 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;
[0032] 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:
[0033]
[0034] 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 gray 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;
[0035] 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;
[0036] 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;
[0037] 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.
[0038] Furthermore, 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:
[0039] 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.
[0040] Furthermore, 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:
[0041]
[0042] 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. cIndicates the number of times the cth candidate rotates the facial area.
[0043] Further, 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 the 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:
[0044] 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 a test paper comparison image of the cth examinee in the fth monitoring image;
[0045] A comparison threshold T4 is preset. If the normalized number of pixels with a grayscale value of 0 in the comparison image of the test paper of the c-th examinee in the f-th monitoring image 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 normalized number of pixels with a grayscale value of 0 in the comparison image of the test paper of the c-th examinee in the f-th monitoring image 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;
[0046] 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;
[0047] 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.
[0048] Furthermore, the cheating possibility of each examinee at each facial region rotation is obtained by combining the average thinking time of each examinee with the cheating characteristic manifestation degree of each examinee at each facial region rotation, and then obtaining the monitoring image containing abnormal behavior, including the specific method of:
[0049] The specific calculation formula for obtaining the cheating feature expression degree of the cth examinee when rotating the face area for the tth time is as follows:
[0050]
[0051] In the formula, l 1,c,trepresents 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;
[0052] 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:
[0053]
[0054] 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;
[0055] 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.
[0056] The present invention also proposes an examination violation detection system based on surveillance video, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein 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] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following, in combination with the accompanying drawings and preferred embodiments, describes in detail the specific implementation methods, structures, features and effects of the examination violation detection method and system based on surveillance video proposed by the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0062] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0063] The specific scheme of the examination violation detection method and system based on monitoring video provided by the present invention is described in detail below with reference to the accompanying drawings.
[0064] See also Figure 1 , which shows a flowchart of a method for detecting examination irregularities based on surveillance video provided by an embodiment of the present invention, the method comprising the following steps:
[0065] Step S001: Obtain a surveillance video of a candidate taking an exam to obtain a data sequence of surveillance images; obtain a blank test paper and the candidate's facial area.
[0066] Specifically, the monitoring video of the examination room during the examination is obtained through the monitoring installed in the examination room. Each second of the examination room monitoring video is converted into n frames of monitoring images. The obtained monitoring image is as follows: Figure 2 As shown, the surveillance images are sorted from front to back according to the video to obtain a data sequence of the surveillance images. Among them, converting the video into multiple frames is a known technology, which will not be described in detail in this embodiment. The number of video frames preset in this embodiment is n=30, and this is used as an example for description.
[0067] Furthermore, after opening the test paper, the invigilator in the examination room takes a photo of the blank test paper to obtain an image of the blank test paper. The facial image of the examinee in the test admission ticket is obtained from the registration system to obtain the examinee's facial region and the grayscale value of the pixel points in the examinee's facial region.
[0068] Step S002: Obtain multiple detection areas in each monitoring image through edge detection; obtain the test paper area and the examinee's facial area in each monitoring image based on the grayscale value that appears most frequently in each detection area in each monitoring image, the grayscale value that appears most frequently in the blank test paper, the grayscale value that appears most frequently in the examinee's facial area, and the edge chain code of each detection area, and then obtain the test paper area and the examinee's facial area in each monitoring image, and then obtain the facial area and the test paper area of each examinee.
[0069] It should be noted that, since there are large differences in the grayscale values of pixels in the test paper area, desktop area and examinee's face area in the surveillance image, edge detection is performed on each surveillance image.
[0070] It should be further explained that, since the distribution of pixel grayscale values in the test paper area in the monitoring image is relatively similar to that in the blank test paper area, the test paper feature expression degree of each detection area is obtained based on the similarity between the distribution of pixel grayscale values in each detection area in the monitoring image and the blank test paper.
[0071] It should be further explained that the detection area formed by the scarf or clothes worn by the examinee may be similar to the distribution of the grayscale values of the pixels in the blank test paper area, making some non-test paper areas have a greater test paper feature expression. The blank test paper area can be approximately regarded as an area composed of four straight lines, so that the edge chain code of the test paper area has more pixel chain code values that are the same as the chain code values of the surrounding pixels. The test paper feature expression degree of each detection area in the monitoring image is corrected to obtain the test paper feature expression degree of each detection area.
[0072] Specifically, the canny edge detection algorithm is used to perform edge detection on the dth monitoring image to obtain the detection area in the dth monitoring image. The canny edge detection algorithm is a well-known technology and will not be described in detail in this embodiment.
[0073] Furthermore, the grayscale value of the pixel that appears most times in the ath detection area in the dth monitoring image is obtained, and recorded as the representative grayscale value of the ath detection area in the dth monitoring image; the grayscale value of the pixel that appears most times in the blank test paper area is obtained, and recorded as the representative grayscale value of the blank test paper.
[0074] Furthermore, according to the representative gray value of the ath detection area in the dth monitoring image and the representative gray value of the blank test paper, the specific calculation formula for the test paper feature expression degree of the ath detection area in the dth monitoring image is obtained as follows:
[0075] P d,a =exp(-|h d,a -h1|)
[0076] Where P d,a represents the 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, and this embodiment adopts the exp(-x) model 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 The smaller the value of -h1| is, the smaller the difference between the grayscale value of the pixel that appears most frequently in the a-th detection area in the d-th monitoring image and the grayscale value of the pixel that appears most frequently in the blank test paper is, which further indicates that the distribution of the grayscale values of the pixels in the a-th detection area in the d-th monitoring image is more similar to the distribution of the grayscale values of the pixels in the blank test paper, that is, the greater the possibility that the a-th detection area in the d-th monitoring image is the test paper area.
[0078] Further, the edge chain code of the ath detection area in the dth monitoring image is obtained. Obtaining the edge chain code of each area is a known technology and is not described in detail in this embodiment. 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 chain code values adjacent to the left and right sides is obtained, and recorded as the edge straight line embodiment degree of the ath detection area in the dth monitoring image.
[0079] Furthermore, according to the edge straight line expression degree of the ath detection area in the dth monitoring image and the test paper feature expression degree, the specific calculation formula for the test paper feature expression degree of the ath detection area in the dth monitoring image is obtained as follows:
[0080]
[0081] Where W d,a represents the degree of test paper feature expression 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 a-th detection area in the d-th monitoring image, n 1,d,a Indicates the degree of edge straight line reflection of the ath detection area in the dth monitoring image.
[0082] It should be noted that The larger the value of is, the more obvious the straight line feature of the edge of the a-th detection area in the d-th monitoring image is, which further indicates that the possibility that the a-th detection area in the d-th monitoring image is the test paper area is greater.
[0083] Furthermore, a test paper manifestation degree threshold T1 is preset, and the detection area where the test paper feature manifestation degree is greater than the manifestation degree threshold is recorded as the test paper area. Among them, the test paper manifestation degree threshold T1=0.6 preset in this embodiment is described as an example, and other implementations can be set to other values. The detection area that is not the test paper area in the dth monitoring image is recorded as the suspected face area.
[0084] It should be noted that since the distribution of the grayscale values of the pixels in the face area of each examinee is similar to the distribution of the grayscale values of the pixels in the face area of his / her admission ticket, the face area of each examinee in the monitoring image is obtained according to the distribution of the grayscale values of the pixels in the face area of each examinee's admission ticket.
[0085] Specifically, 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 grayscale of all suspected face regions in the d-th monitored image is obtained. The grayscale value that appears most often in the facial region of the c-th examinee is recorded as the representative grayscale of the c-th examinee's face.
[0086] Furthermore, the suspected face region with the smallest difference (absolute value of the 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.
[0087] Furthermore, if there are multiple suspected face regions in the d-th monitoring image whose representative grayscale has the smallest difference with the representative grayscale of the face of the c-th examinee. Calculate the information entropy of the grayscale values of the pixels in the facial region of the c-th examinee, and calculate the information entropy of the grayscale values of the pixels in the suspected face region in the d-th monitoring image whose representative grayscale has the smallest difference with the representative grayscale of the face of the c-th examinee. The suspected face region with the smallest absolute value of the difference between the information entropy of the grayscale values of the pixels in the multiple suspected face regions in which the representative grayscale of the d-th monitoring image has the smallest difference with the representative grayscale of the face of the c-th examinee and the information entropy of the grayscale values of the pixels in the facial region of the c-th examinee is recorded as the facial region of the c-th examinee in the d-th monitoring image. Among them, obtaining the information entropy of the grayscale values of the pixels in each region is a prior art known in the art and will not be elaborated in this embodiment.
[0088] Furthermore, the test paper region in the d-th monitoring image whose Euclidean distance to the center of the facial region of the c-th examinee is closest is recorded as the test paper region of the c-th examinee in the d-th monitoring image.
[0089] At this point, the facial area and test paper area of each examinee in each monitoring image are obtained.
[0090] Step S003: Template matching is performed between the facial area of each examinee in each monitoring image and the examinee's facial area to obtain a number of monitoring images for each examinee each time the facial area is rotated; the monitoring image for each examinee each time the facial area is rotated and the monitoring image of the previous frame each time the facial area is rotated are divided into a plurality of pixel blocks, and the rotation amplitude of each examinee each time the facial area is rotated is obtained according to the distribution of gray values in the pixel blocks in different monitoring images.
[0091] It should be noted that when a candidate peeks at other people's test papers, the facial area will be rotated in order to see the contents of other people's test papers clearly. Therefore, multiple monitoring images are used to determine whether the candidate has rotated the facial area and obtain the rotation direction of the candidate's facial area.
[0092] It should be noted that when the examinee is taking the test normally in the examination room, the match between the examinee's facial area and the facial area in the admission ticket is high, while when the examinee is turning his head, the match between the examinee's facial area and the facial area in the admission ticket is low. Therefore, the match between the examinee's facial area and the facial area in the admission ticket is used to determine whether the examinee is turning his head. Since when the examinee turns his head, the head first turns from the normal position to one side and then returns to the normal position, the multiple rotations between the two returns to the normal position are regarded as one rotation of the facial area.
[0093] It should be further explained that when the candidate's facial area is rotated, the distribution of the grayscale values of the pixels in a part of the facial area does not change, but the facial area of this part moves to one side as a whole. For example, when the candidate's facial area is rotated to the right, the distribution of the grayscale values of the pixels in the left facial area of the candidate does not change, but the left facial area of the candidate moves to the right as a whole. Based on the distribution of the grayscale values of the pixels in the candidate's facial area, the rotation direction of the candidate's facial area is obtained, and the rotation amplitude of the candidate's face is obtained.
[0094] Specifically, the facial area of the cth examinee in the dth monitoring image is calculated and the facial area of the cth examinee is matched with the template, and the template matching result is recorded as the degree of facial rotation of the cth examinee in the dth monitoring image.
[0095] Furthermore, a rotation degree threshold T2 is preset. In this embodiment, the rotation degree threshold T2=0.6 is preset. This is used as an example for description. Other implementations may be set to other values. If the degree of facial rotation of the c-th examinee in the d-th monitoring image is greater than the rotation degree threshold T3, the d-th monitoring image is recorded as the facial rotation image of the c-th examinee. In the data sequence of the monitoring image, an image segment composed of multiple continuous facial rotation images is used as a number of monitoring images of the c-th examinee when the facial area is rotated once.
[0096] Specifically, the facial region of the c-th examinee in the monitoring image of the previous frame before the k-th rotation of the facial region and the b-th monitoring image when the facial region is rotated is segmented using a superpixel segmentation algorithm, and the facial region of the c-th examinee in the monitoring image of the previous frame before the k-th rotation of the facial region and the b-th monitoring image when the facial region is rotated is divided into a plurality of pixel blocks. The superpixel segmentation algorithm is a well-known technology and will not be described in detail in this embodiment.
[0097] Further, according to the distribution of the grayscale values of the pixels in the mth pixel block in the bth monitoring image when the cth examinee rotates the face area for the kth time and the distribution of the grayscale values of the pixels in the qth pixel block in the monitoring image of the previous frame when the cth examinee rotates the face area for the kth time, the specific calculation steps for obtaining 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 the qth pixel block in the monitoring image of the previous frame when the cth examinee rotates the face area for the kth time are as follows:
[0098] Further, the average of the averages of the absolute values of the differences between the grayscale values of all pixels with a grayscale value of 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 pixels with a grayscale value of 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 a grayscale value of i in the kth pixel block in the monitoring image of the previous frame when the cth examinee rotates the face area for the kth time and the grayscale distribution of the pixels with a grayscale value of i in the kth pixel block in the monitoring image of the previous frame when the cth examinee rotates the face area for the kth time is recorded as the grayscale distribution of the pixels with a grayscale value of i in the kth pixel block in the monitoring image of the previous frame when the cth examinee rotates the face area for the kth time.
[0099] Furthermore, the specific calculation formula for obtaining 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 is rotated for the kth time and the mth pixel block in the bth monitoring image when the face area is rotated is as follows:
[0100]
[0101] 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 gray 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,irepresents 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 facial area, || represents the absolute value function, exp() is an exponential function with a natural constant as the base, and this embodiment adopts the exp(-x) model 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 of |, the closer the number of pixels with grayscale value i in the two pixel blocks is, which further indicates that the grayscale distribution consistency between the mth pixel block in the bth monitoring image and the qth pixel block in the monitoring image before the face area is rotated is better; |σ(c,k) b,m,i -σ(c,k) b+1,q,i The smaller the value of | is, the more consistent the distribution of the grayscale values of the pixels around the pixel with the grayscale 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 area is rotated is, which further indicates the consistency of the grayscale distribution 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 area is rotated.
[0103] Further, a distribution consistency threshold T3 is preset. The distribution consistency threshold T3=0.5 preset in this embodiment is described as an example. Other implementation methods may be set to other values. The pixel blocks in the monitoring image before the kth rotation of the face area corresponding to the two pixel blocks with the largest grayscale distribution consistency between the qth pixel block in the monitoring image of the previous frame of the cth examinee's face area rotation and the mth pixel block in the bth monitoring image when the face area is rotated are recorded as similar pixel blocks of the mth pixel block in the bth monitoring image when the cth examinee rotates the face area 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 blocks 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.
[0104] Furthermore, 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.
[0105] Step S004: According to the rotation amplitude of each examinee each time the facial region is rotated and the number of times each examinee rotates the facial region, the cheating characteristic manifestation degree of each examinee each time the facial region is rotated is obtained.
[0106] It should be noted that when the examinee is taking the exam, 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. Therefore, the degree of cheating characteristics of the examinee each time the examinee rotates the facial area is calculated based on the rotation amplitude of the examinee's facial area each time the examinee rotates the facial area.
[0107] It should be further explained that if a candidate has the habit of rotating his face area when thinking about a problem, then the candidate will think many times during the test, causing the candidate to rotate his face area many times. When the candidate is taking the test, since the invigilator will constantly patrol, the candidate will not frequently turn his head to peek at other people's test papers and cheat during the test. Therefore, according to the number of times the candidate rotates his face area during the test, the cheating feature expression degree of the candidate each time the face area is rotated is obtained.
[0108] It should be further explained that when the examinee has the habit of rotating the facial area while thinking about a problem, the rotation of the facial area is caused by the examinee's habit, so the amplitude of the examinee's facial area rotation each time is relatively similar. When the examinee cheats, the examinee rotates the facial area in order to see other people's test papers clearly; because the content that the examinee needs to see when rotating the facial area is in different areas of the test paper, the examinee who cheats by rotating the facial area has different rotation amplitudes each time the facial area is rotated. Therefore, according to the rotation amplitude of the examinee's facial area each time, the degree of cheating feature manifestation of the examinee each time the facial area is rotated is obtained.
[0109] Specifically, the specific calculation formula for obtaining the cheating performance degree of the c-th examinee when the face area is rotated for the t-th time is as follows:
[0110]
[0111] In the formula, K c,trepresents the cheating performance of the cth examinee when rotating the face area for the tth time, F c,t N represents the rotation amplitude of the cth examinee when he rotates the face area for the tth time. c Indicates the number of times the cth candidate rotates the facial area.
[0112] It should be noted that F c,t The larger the value of is, the larger the rotation amplitude of the c-th examinee when he rotates the face area for the t-th time is, which further indicates that the c-th examinee is more likely to see other examinees' test papers clearly when he rotates the face area for the t-th time, that is, the c-th examinee is more likely to cheat when he rotates the face area for the t-th time; N c The larger the value of , the more it means that the c-th examinee has rotated his face area multiple times during the test, which further indicates that the c-th examinee has the habit of rotating his face area to think during the test, that is, the possibility of the c-th examinee cheating when rotating his face area is low.
[0113] Furthermore, according to the rotation amplitude of the c-th examinee when rotating the facial area each time, the specific calculation formula for the cheating characteristic manifestation degree of the c-th examinee when rotating the facial area for the tth time is as follows:
[0114]
[0115] 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, K c,t represents the cheating performance 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 represents the rotation amplitude of the cth examinee when he rotates the facial area for the rth time, and || represents the absolute value function.
[0116] It should be noted that The smaller the value of , the more similar the rotation amplitude of the c-th examinee when he rotates the facial area for the tth time is to the rotation amplitude of the examinee's other rotations of the facial area. This is consistent with the characteristic that the examinee has the habit of rotating the facial area during the thinking process and the rotation amplitude of the examinee's facial area is similar each time. In other words, the possibility of cheating by the c-th examinee when he rotates the facial area for the tth time is lower.
[0117] Step S005: Based on the test paper area of the same examinee in multiple monitoring images, obtain each examinee's answer image and each examinee's average thinking time; based on each examinee's answer image, obtain each examinee's thinking time before each rotation of the facial area and each examinee's thinking time after each rotation of the facial area; combine each examinee's average thinking time and the degree of cheating feature expression of each examinee when the facial area is rotated each time, obtain the cheating possibility of each examinee when the facial area is rotated each time, and then obtain the monitoring image containing abnormal behavior and make a cheating judgment.
[0118] It should be noted that candidates cheat during the exam because they do not know how to answer the questions, so they peek at other people's papers. There are two main characteristics of candidates not knowing how to answer the questions. One is that after reading the questions, candidates think for a short time and confirm that they do not know how to answer them, so they peek at other people's papers. This is manifested by the short thinking time before the candidates turn their face area. Or, after thinking for a long time, candidates confirm that they do not know how to answer them, and then peek at other people's papers. This is manifested by the candidates thinking for a long time before turning their face area. Therefore, the possibility of candidates cheating can be judged by comparing the thinking time before turning the face area with the normal thinking time of the candidates.
[0119] It should be further explained that, under normal circumstances, candidates will only do two things during the test: stop writing to think and use the pen to answer questions. That is, the interval between two consecutive times of using the pen to answer questions is the candidate's thinking time. Therefore, the time period when the candidate uses the pen to answer questions is obtained, and the time period when the candidate stops writing to think is obtained.
[0120] It should be further explained that when the examinee uses a pen to answer questions, the grayscale value of the pixels in the test paper area will change. Therefore, based on whether the grayscale value of the pixels in the test paper area of the same examinee changes in two adjacent surveillance images, it is possible to judge whether the examinee is answering questions, and then obtain the time period when the examinee stops writing to think.
[0121] It is further necessary to explain that when a candidate cheats by rotating the face area, after seeing the test paper of others clearly, the candidate quickly rotates the face area back to its original position and writes the answer on the test paper. This means that the candidate answers the test paper after a very short thinking time after rotating the face area. Therefore, the possibility of cheating by comparing the thinking time after the candidate rotates the face area to the normal thinking time of the candidate can be judged.
[0122] It should be further explained that if a candidate has the habit of turning his head while thinking during the test, then this candidate will rotate his facial area after a similar amount of thinking time each time after reading the questions. When a candidate cheats, the time from when he finishes reading the questions on the test paper to when he realizes that he cannot do the answers is relatively random, which makes the time interval from when the cheating candidate finishes reading the questions to when he turns his head different each time. Therefore, the possibility of cheating by the candidate is judged based on the time interval from when the candidate rotates his facial area each time to when he stops writing to answer.
[0123] Specifically, the difference method is used to subtract the test paper area of the cth candidate in the fth monitoring image from the test paper area of the cth candidate in the f+1th monitoring image to obtain the test paper comparison area of the cth candidate in the fth monitoring image.
[0124] Furthermore, a comparison threshold T4 is preset. If the ratio of the number of pixels with a gray value of 0 in the test paper comparison area of the cth examinee in the fth monitoring image to the number of pixels in the test paper comparison area is greater than the comparison threshold T4, the fth monitoring image is recorded as the thinking image of the cth examinee; if the ratio of the number of pixels with a gray value of 0 in the test paper comparison area of the cth examinee in the fth monitoring image to the number of pixels in the test paper comparison area is less than or equal to the comparison threshold T4, the fth monitoring image is recorded as the answer image of the cth examinee. The preset comparison threshold T4=0.6 in this embodiment is described as an example, and other values can be set in other implementations.
[0125] If the examination paper area of the cth candidate in the fth monitoring image is the same as the examination paper area of the cth candidate in the f+1th monitoring image, the fth monitoring image is recorded as the thinking image of the cth candidate. If the examination paper area of the cth candidate in the fth monitoring image is different from the examination paper area of the cth candidate in the f+1th monitoring image, the fth monitoring image is recorded as the answering image of the cth candidate.
[0126] Furthermore, the number of monitoring images consisting of the continuous thinking images of the cth examinee in the monitoring image data sequence is recorded as one thinking time of the cth examinee. The average of all thinking times of the cth examinee is recorded as the average thinking time of the cth examinee.
[0127] Furthermore, the number of images between the first face rotation image when the c-th candidate rotates the facial area for the tth 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 when the c-th candidate rotates the facial area for the t-th time and the answer image of the next c-th candidate is recorded as the thinking time of the c-th candidate after the t-th head rotation.
[0128] Furthermore, the specific calculation formula for obtaining the cheating feature expression degree of the c-th examinee when rotating the facial area for the t-th time is as follows:
[0129]
[0130] 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 candidate after the tth head turn, and | | represents the absolute value function.
[0131] It should be noted that |Z c -Z 1,c,t -Z 2,c,t The larger the value of | is, the greater the difference between the cth examinee's thinking time before and after the tth head turn and his normal thinking time is. The larger the value of is, the shorter or longer the thinking time of the c examinee before turning his head for the tth time is, which means that the examinee is more likely to cheat; The larger the value of , the shorter the thinking time of the c-th examinee after the t-th head turn, which means that this examinee is more likely to peek at other people's test papers during this head turn.
[0132] Furthermore, the specific calculation formula for obtaining the cheating possibility of the c-th examinee 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 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, and sigmoid() represents the normalization function.
[0135] It should be noted that δ 1,c,t The smaller the value of is, the more likely the cth examinee is to turn his head, and the less likely the examinee is to cheat by turning his head. 2,c,tThe smaller the value is, the more consistent the time from when the cth candidate turns his head to when he starts writing is, which is more consistent with the characteristic of cheating when the candidate copies the answer after seeing others'.
[0136] Furthermore, the preset embodiment level threshold T5, if l 2,c,t >T5, record the several monitoring images of the c-th examinee when he rotates his face area for the t-th time as monitoring images containing abnormal behavior; perform abnormal behavior judgment on the several monitoring images of all examinees when they rotate their face areas each time, and obtain several monitoring images containing abnormal behavior.
[0137] The surveillance images of examinees with abnormal behavior are marked, and the monitors watching the video are reminded to watch the surveillance images before and after the marked surveillance images for multiple frames to determine whether the examinees with abnormal behavior are cheating, and identify the examinees who are cheating.
[0138] At this point, this embodiment is completed.
[0139] Another embodiment of the present invention provides an examination violation detection system based on surveillance video, which 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 S005 are implemented.
[0140] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should 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; Based on the test paper area of the same candidate in multiple monitoring images, the answer image of each candidate and the average thinking time of each candidate are obtained; based on the answer image of each candidate, the thinking time of each candidate before each rotation of the facial area and the thinking time of each candidate after each rotation of the facial area are obtained; combined with the average thinking time of each candidate and the degree of cheating characteristics of each candidate when the facial area is rotated each time, the cheating possibility of each candidate when the facial area is rotated each time is obtained, and then the monitoring image containing abnormal behavior is obtained and cheating judgment is made.
2. The method for detecting examination irregularities based on surveillance video according to claim 1, characterized in that: 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 the following specific methods: 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 manifestation degree threshold T1 is preset, and the detection area where the test paper feature manifestation degree is greater than the manifestation degree threshold is recorded as the test paper area; The detected 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 whose representative grayscale in the d-th monitoring image has the smallest difference with 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.
3. The method for detecting examination irregularities based on surveillance video according to claim 1, characterized in that: The specific method of obtaining the facial area and the 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.
4. 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.
5. 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 gray 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.
6. The method for detecting examination irregularities based on surveillance video according to claim 5, 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.
7. 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.
8. 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 data sequence of monitoring images 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.
9. 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 cth examinee when rotating the face area for the tth 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.
10. 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 9 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
Functional breaker having side fastening part
KR1020230173779A
Monitoring device and system for remote test taking
US20150037781A1