CN104156729A - Counting method for people in classroom - Google Patents

Counting method for people in classroom Download PDF

Info

Publication number
CN104156729A
CN104156729A CN201410347427.9A CN201410347427A CN104156729A CN 104156729 A CN104156729 A CN 104156729A CN 201410347427 A CN201410347427 A CN 201410347427A CN 104156729 A CN104156729 A CN 104156729A
Authority
CN
China
Prior art keywords
value
classroom
human body
point
human
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410347427.9A
Other languages
Chinese (zh)
Other versions
CN104156729B (en
Inventor
徐华中
罗俊
杨忍
李志强
李鲍
张帆
向云
孟雪平
梁红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University of Technology WUT
Original Assignee
Wuhan University of Technology WUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University of Technology WUT filed Critical Wuhan University of Technology WUT
Priority to CN201410347427.9A priority Critical patent/CN104156729B/en
Publication of CN104156729A publication Critical patent/CN104156729A/en
Application granted granted Critical
Publication of CN104156729B publication Critical patent/CN104156729B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a counting method for people in a classroom. The counting method comprises the following steps: building a background model when the classroom is unoccupied, and building a two-value model for the edge of the upper part of the human body; conducting dilation operation on a two-value foreground image to obtain the possible active area of the human body; searching two-value peak points in the two-value foreground image, and adding the two-value peak points into the vertex detection set; comparing similarity of the two-value model for the edge of the upper part of the human body and an edge image in a window every time after sliding, and adding the area of the upper part of the human body greater than the threshold value into the human body detection set; conducting the people counting by adopting cluster analysis in combination with the vertex detection set and the human body detection set to realize the people counting of a current frame. The counting method is low in calculation and high in obtained people counting accuracy, has the counting effect on people either sitting or moving in the classroom, facilitates reasonable allocation of the classroom resource and intelligent management of electric equipment, and has a wide application prospect.

Description

A kind of classroom demographic method
Technical field
The present invention relates to image and process and area of pattern recognition, refer to particularly a kind of classroom demographic method and system of processing by camera collection classroom, classroom image.
Background technology
At University Classroom's or room for individual study, generally all have camera monitoring system, by camera collection to the picture in classroom the number in classroom is added up, be conducive to the understanding of student to classroom state, facilitated student to select room for individual study, improved efficiency; Be conducive to the centralized control to teaching in classroom electrical equipment, reduce the waste of resource.
Chinese patent application CN 102184241 discloses classroom status inquiry system and statistical method thereof, the demographic method that this system uses mainly utilizes the human body of dynamic identifying method statistics motion, the human body that the method statistic that adopts classroom template to contrast is sat down, system comprises camera, cradle head controllor, main control computer, switch and the server etc. with The Cloud Terrace.The weak point of this system is:
The first, do not relate to classroom template renewal method, can affect the process of follow-up demographics;
The second, camera shooting picture is moved with The Cloud Terrace, can exert an influence to the process of the human body of dynamic identifying method statistics motion;
The 3rd, demographic method more complicated, because will process the image information in a plurality of classrooms simultaneously, complicated method can affect real-time.
Summary of the invention
In order to address the above problem, the object of the invention is to design a kind of classroom demographic method, can be in real time and add up exactly the number in classroom.
Solve the problems of the technologies described above adopted technical scheme and be to provide a kind of classroom demographic method, the method comprises the following steps:
S1, initialization background model are set up background model under the unmanned state of classroom, and set up upper half of human body edge two value models;
S2, employing background subtraction technology obtain the two-value foreground image in classroom, and two-value foreground image is carried out to dilation operation, obtain possible physical activity region;
S3, search for the two-value peak point in described two-value foreground image, add the crown to detect set;
The marginal information in physical activity region in S4, extraction present frame, adopt the method for moving window coupling, edge image in window by upper half of human body edge two value models of setting up in step S1 and after sliding each time carries out similarity comparison, set similarity threshold, the upper half of human body region that is greater than threshold value is added to human detection set;
S5, in conjunction with crown detected set, close and human detection set, adopt the mode of cluster analysis to carry out demographics, realize the demographics to present frame;
S6, in the process of above-mentioned demographics, online regional background renewal is carried out in non-human region, or demographics is to upgrade global context model at 0 o'clock.
In technique scheme, upper half of human body edge two value models described in step S1 are the probability Distribution Model that adopt the later in fact half body picture of a large amount of normalization to add up and obtain, use a plurality of upper half of human body two-value profiles in classroom to carry out pixel cumulative statistics, last divided by the probability distribution image obtaining after total pixel number.
In technique scheme, in step S2, two-value foreground image obtains by following steps: present frame and background model are carried out to gray processing and Gaussian Blur, then corresponding pixel points is done poor taking absolute value, and the pixel that respectively absolute value is greater than and is less than threshold value is set as foreground point and background dot.
In technique scheme, the two-value peak point described in step S3 is the peak point of each prospect two-value agglomerate, is defined as the point that height value is minimum and mediate, i.e. possible human body crown point.
In technique scheme, in step S5, adopting clustering method to carry out demographics comprises the following steps: the body of upper half of human body model of take is wide is maximum cluster diameter, the point that the crown is detected in set is cluster centre, the match point obtaining in human detection set is carried out to cluster, when match point reaches certain quantity identification number, add one, the point that exceeds diameter range re-establishes new cluster centre.
Classroom provided by the invention demographic method can obtain the number in classroom by the image information gathering in classroom, the inventive method operand is little, and the demographics accuracy of gained is high, both can meet PC and a plurality of classrooms monitor video carried out to the rate request of processing in real time, also meet ARM, the rate request to the real-time processing of single classroom monitor video such as DSP.This method is to the people who sits quietly in classroom or the people who walks about has statistics effect.To the demographic method of this intermittent open public place, classroom and the reasonable distribution that system is conducive to classroom resources, the intelligent management of electrical equipment, has broad application prospects.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of classroom demographic method in the embodiment of the present invention.
Fig. 2 is upper half of human body two-value model training schematic diagram in the embodiment of the present invention.
Fig. 3 is cluster process schematic diagram in the embodiment of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, classroom provided by the invention demographic method is described in further detail.
As shown in Figure 1, in the embodiment of the present invention, classroom demographic method comprises the following steps:
S1, the present embodiment classroom demographic method are before classroom is open, and the former two field pictures in receiver, video monitoring image, carry out, after Gaussian smoothing, setting up the background model in classroom, meanwhile, set up upper half of human body two value models.The foundation of upper half of human body two value models is the probability Distribution Model that adopt the later in fact half body picture of a large amount of normalization to add up and obtain, the probability Distribution Model that specifically adopts the later in fact half body picture of a large amount of normalization to add up and obtain, use a plurality of upper half of human body two-value profiles in classroom to carry out pixel cumulative statistics, last divided by the probability distribution image obtaining after total pixel number.
Fig. 2 is the present embodiment upper half of human body two-value model training schematic diagram, and the training process of upper half of human body model comprises: 1, gather the upper half of human body sample that classroom is used, sample is carried out to edge extracting; 2, sample edge binary images is carried out to yardstick normalization, unified 32 * 32 the size that normalizes in this embodiment; 3, the distribution of marginal point in the statistical sample of subregion, when wherein the cumulative probability in a certain region distributes over threshold value, it is labeled as to marginal point in upper half of human body probability Distribution Model, and finally the sample accumulation through some obtains upper half of human body two value models.
S2, after classroom is open, receive successively each two field picture as present frame and carry out following steps: adopting existing background subtraction technology to obtain the two-value foreground image in classroom, concrete implementation step is: present frame and background model are carried out to gray processing and Gaussian Blur, then corresponding pixel points is done poor taking absolute value, the pixel that respectively absolute value is greater than and is less than threshold value is set as foreground point (gray-scale value is 255) and background dot (gray-scale value is 0) carries out dilation operation to two-value foreground image, obtains possible physical activity region;
The present embodiment is being set up background model and is being done before difference, consider effect and the real-time of algorithm, adopt Gaussian smoothing to carry out pre-service to present frame, the interference of noise decrease, to doing the two-value foreground image of poor rear threshold process, first corrodes the morphology denoising of rear expansion, in addition, after morphology denoising, this bianry image is suitably expanded again, make it cover as much as possible the fringe region of human body.
Step S3, the two-value peak point in the two-value foreground image of search human body zone of action, adds the crown to detect set.
In this step, two-value peak point is regarded as how much summits of two-value agglomerate, here can be by extracting the profile diagram of physical activity region bianry image, deposit the profile of different agglomerates in different list, then search for the point that height value is minimum and mediate, add the crown to detect set them, and store.
The marginal information in physical activity region in step S4, extraction present frame, adopt the method for moving window coupling, edge image in window by upper half of human body edge two value models of setting up in step S1 and after sliding each time carries out similarity comparison, set similarity threshold, similarity threshold comes from the empirical value of great many of experiments, and the upper half of human body region that is greater than threshold value is added to human detection set;
In step S4, it should be noted that, in the process of window sliding, adopt the window of fixed size, but upper half of human body two value models that are used for mating are according to the distance of classroom scene, by far increasing closely successively.
Step S5, closes and human detection set in conjunction with crown detected set, adopts the mode of cluster analysis to carry out demographics.
This step clustering method used adopts the K means clustering method after improving, specifically be expressed as: the body of upper half of human body model of take is wide is maximum cluster diameter, the point that the crown is detected in set is cluster centre, the match point obtaining in human detection set is carried out to cluster, when match point reaches certain quantity identification number, add one, the point that exceeds diameter range re-establishes new cluster centre.
Fig. 3 is the present embodiment cluster process schematic diagram, and in initial clustering process, the point in first crown detected set being closed carries out K mean cluster, and cluster centre is now stored, and now most of crown can be searched out, and shows as cluster centre.As shown in Figure 3, when occurring blocking, human region joins together, and the human body contour outline of left-hand component can not be found.Then the width value of upper half of human body model of take is maximum cluster diameter, the point that the crown is detected in set is cluster centre, the match point obtaining in human detection set is carried out to cluster, when reaching certain quantity identification number, match point adds one, the point that exceeds diameter range re-establishes new cluster centre, thereby find undetected human body, and add demographics.
Step S6, carries out regional background renewal to non-human region, when demographics is 0, upgrades global context model.
In this step, profile information in moving window and upper half of human body two-value distortion are during lower than threshold value, the region that this moving window comprises will be updated into background model, and the corresponding region that is about to background model replaces with current region, obtains next frame and does poor new background model.When demographics module is output as 0, whole present frame is upgraded into background model.
The inventive method operating process finishes.

Claims (6)

1. a classroom demographic method, is characterized in that, comprising:
S1, initialization background model are set up background model under the unmanned state of classroom, and set up upper half of human body edge two value models;
S2, employing background subtraction technology obtain the two-value foreground image in classroom, and two-value foreground image is carried out to dilation operation, obtain possible physical activity region;
S3, search for the two-value peak point in described two-value foreground image, add the crown to detect set;
The marginal information in physical activity region in S4, extraction present frame, adopt the method for moving window coupling, edge image in window by upper half of human body edge two value models of setting up in step S1 and after sliding each time carries out similarity comparison, set similarity threshold, the upper half of human body region that is greater than threshold value is added to human detection set;
S5, in conjunction with crown detected set, close and human detection set, adopt the mode of cluster analysis to carry out demographics, realize the demographics to present frame;
S6, in the process of above-mentioned demographics, online regional background renewal is carried out in non-human region, or demographics is to upgrade global context model at 0 o'clock.
2. classroom according to claim 1 demographic method, it is characterized in that: upper half of human body edge two value models described in step S1 are the probability Distribution Model that adopt the later in fact half body picture of a large amount of normalization to add up and obtain, use a plurality of upper half of human body two-value profiles in classroom to carry out pixel cumulative statistics, last divided by the probability distribution image obtaining after total pixel number.
3. classroom according to claim 1 demographic method, is characterized in that in step S2, two-value foreground image obtains by following steps:
Present frame and background model are carried out to gray processing and Gaussian Blur, and then corresponding pixel points is done poor taking absolute value, and the pixel that respectively absolute value is greater than and is less than threshold value is set as foreground point and background dot.
4. classroom according to claim 1 demographic method, is characterized in that: the two-value peak point described in step S3 is the peak point of each prospect two-value agglomerate, is defined as the point that height value is minimum and mediate, i.e. possible human body crown point.
5. classroom according to claim 1 demographic method, is characterized in that in step S5, adopting clustering method to carry out demographics comprises the following steps:
The body of upper half of human body model of take is wide is maximum cluster diameter, the point that the crown is detected in set is cluster centre, the match point obtaining in human detection set is carried out to cluster, when match point reaches certain quantity identification number, add one, the point that exceeds diameter range re-establishes new cluster centre.
6. classroom according to claim 1 demographic method and system, is characterized in that: described in step S6, regional background is carried out in non-human region and be updated to and non-human zone of action and coupling are regarded as to non-human area update enter background model.
CN201410347427.9A 2014-07-21 2014-07-21 A kind of classroom demographic method Expired - Fee Related CN104156729B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410347427.9A CN104156729B (en) 2014-07-21 2014-07-21 A kind of classroom demographic method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410347427.9A CN104156729B (en) 2014-07-21 2014-07-21 A kind of classroom demographic method

Publications (2)

Publication Number Publication Date
CN104156729A true CN104156729A (en) 2014-11-19
CN104156729B CN104156729B (en) 2018-02-09

Family

ID=51882226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410347427.9A Expired - Fee Related CN104156729B (en) 2014-07-21 2014-07-21 A kind of classroom demographic method

Country Status (1)

Country Link
CN (1) CN104156729B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899598A (en) * 2015-05-14 2015-09-09 中国农业大学 Method and device for counting persons in classroom based on two-dimensional Fourier transform
CN105117998A (en) * 2015-08-11 2015-12-02 南京信息工程大学 Classroom spare degree calculation method, classroom allocation method and classroom allocation device
CN105469059A (en) * 2015-12-01 2016-04-06 上海电机学院 Pedestrian recognition, positioning and counting method for video
CN108595600A (en) * 2018-04-18 2018-09-28 努比亚技术有限公司 Photo classification method, mobile terminal and readable storage medium storing program for executing
CN110033463A (en) * 2019-04-12 2019-07-19 腾讯科技(深圳)有限公司 A kind of foreground data generates and its application method, relevant apparatus and system
CN110032930A (en) * 2019-03-01 2019-07-19 中南大学 A kind of classroom demographic method and its system, device, storage medium
CN116452667A (en) * 2023-06-16 2023-07-18 成都实时技术股份有限公司 Target identification and positioning method based on image processing
US11961237B2 (en) 2019-04-12 2024-04-16 Tencent Technology (Shenzhen) Company Limited Foreground data generation method and method for applying same, related apparatus, and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070273101A1 (en) * 2006-05-19 2007-11-29 Alana Berke Identity Guessing Game and Methods of Playing
CN102184241A (en) * 2011-05-16 2011-09-14 中国民航大学 System for counting and inquiring classroom state and method for counting classroom state

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070273101A1 (en) * 2006-05-19 2007-11-29 Alana Berke Identity Guessing Game and Methods of Playing
CN102184241A (en) * 2011-05-16 2011-09-14 中国民航大学 System for counting and inquiring classroom state and method for counting classroom state

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
崔宇巍: "运动目标检测与跟踪中有关问题的研究", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 *
张丙坤: "基于人头检测的人数统计算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899598A (en) * 2015-05-14 2015-09-09 中国农业大学 Method and device for counting persons in classroom based on two-dimensional Fourier transform
CN105117998A (en) * 2015-08-11 2015-12-02 南京信息工程大学 Classroom spare degree calculation method, classroom allocation method and classroom allocation device
CN105469059A (en) * 2015-12-01 2016-04-06 上海电机学院 Pedestrian recognition, positioning and counting method for video
CN108595600A (en) * 2018-04-18 2018-09-28 努比亚技术有限公司 Photo classification method, mobile terminal and readable storage medium storing program for executing
CN108595600B (en) * 2018-04-18 2023-12-15 努比亚技术有限公司 Photo classification method, mobile terminal and readable storage medium
CN110032930A (en) * 2019-03-01 2019-07-19 中南大学 A kind of classroom demographic method and its system, device, storage medium
CN110033463A (en) * 2019-04-12 2019-07-19 腾讯科技(深圳)有限公司 A kind of foreground data generates and its application method, relevant apparatus and system
CN110033463B (en) * 2019-04-12 2021-06-04 腾讯科技(深圳)有限公司 Foreground data generation and application method thereof, and related device and system
US11961237B2 (en) 2019-04-12 2024-04-16 Tencent Technology (Shenzhen) Company Limited Foreground data generation method and method for applying same, related apparatus, and system
CN116452667A (en) * 2023-06-16 2023-07-18 成都实时技术股份有限公司 Target identification and positioning method based on image processing
CN116452667B (en) * 2023-06-16 2023-08-22 成都实时技术股份有限公司 Target identification and positioning method based on image processing

Also Published As

Publication number Publication date
CN104156729B (en) 2018-02-09

Similar Documents

Publication Publication Date Title
CN104156729A (en) Counting method for people in classroom
WO2021017606A1 (en) Video processing method and apparatus, and electronic device and storage medium
Zou et al. Occupancy detection in the office by analyzing surveillance videos and its application to building energy conservation
CN105069472B (en) A kind of vehicle checking method adaptive based on convolutional neural networks
CN110751022A (en) Urban pet activity track monitoring method based on image recognition and related equipment
CN101470809B (en) Moving object detection method based on expansion mixed gauss model
Avgerinakis et al. Recognition of activities of daily living for smart home environments
CN103105924B (en) Man-machine interaction method and device
CN103477352A (en) Gesture recognition using depth images
CN102184551A (en) Automatic target tracking method and system by combining multi-characteristic matching and particle filtering
CN102063613A (en) People counting method and device based on head recognition
CN110287907B (en) Object detection method and device
CN103700114A (en) Complex background modeling method based on variable Gaussian mixture number
CN110717408B (en) People flow counting method based on TOF camera
CN101483763A (en) Digital video processing method oriented to social security monitoring and apparatus thereof
CN105513053A (en) Background modeling method for video analysis
CN111723773A (en) Remnant detection method, device, electronic equipment and readable storage medium
CN112068555A (en) Voice control type mobile robot based on semantic SLAM method
CN104159088A (en) System and method of remote monitoring of intelligent vehicle
CN109308444A (en) A kind of abnormal behaviour recognition methods under indoor environment
CN102314591B (en) Method and equipment for detecting static foreground object
CN109343701A (en) A kind of intelligent human-machine interaction method based on dynamic hand gesture recognition
CN107273810A (en) A kind of method that Face datection interest region delimited in automatic study
CN108629327A (en) A kind of demographic method and device based on image procossing
Wang et al. Video background/foreground separation model based on non-convex rank approximation RPCA and superpixel motion detection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180209

Termination date: 20180721