CN108346199A - Demographic method and people counting device - Google Patents

Demographic method and people counting device Download PDF

Info

Publication number
CN108346199A
CN108346199A CN201710052943.2A CN201710052943A CN108346199A CN 108346199 A CN108346199 A CN 108346199A CN 201710052943 A CN201710052943 A CN 201710052943A CN 108346199 A CN108346199 A CN 108346199A
Authority
CN
China
Prior art keywords
video
data
features
configuration parameter
parsing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710052943.2A
Other languages
Chinese (zh)
Inventor
车航宇
鲁时雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to CN201710052943.2A priority Critical patent/CN108346199A/en
Publication of CN108346199A publication Critical patent/CN108346199A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/20Individual registration on entry or exit involving the use of a pass
    • G07C9/22Individual registration on entry or exit involving the use of a pass in combination with an identity check of the pass holder
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/53Recognition of crowd images, e.g. recognition of crowd congestion
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/20Individual registration on entry or exit involving the use of a pass
    • G07C9/27Individual registration on entry or exit involving the use of a pass with central registration

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides demographic method and people counting device, demographic method include:It obtains the first video that video parsing is carried out to the first video and is obtained and parses the first number acquisition step that number parses number as video to be corrected;Obtain the fisrt feature acquisition step of the configuration parameter of the timestamp of first video, video features, the environmental characteristic of video camera local environment when absorbing first video and video camera;With basis timestamp corresponding with first video, from the correction corresponding correction model of model library searching for including timestamp, video parsing number, video features, environmental characteristic and configuration parameter, input the video parsing number to be corrected, and the video features corresponding with first video, the environmental characteristic and the configuration parameter, the number aligning step of the number after being corrected.

Description

Demographic method and people counting device
Technical field
The present invention relates to a kind of demographic method and people counting devices, and video is based on more specifically to one kind Count the demographic method and people counting device of the number in the stipulated time by determined location section.
Background technology
In the prior art, (it is also referred to as " passenger flow people to count the number in the stipulated time by determined location section Number "), video parsing usually is carried out to the video that video camera absorbs using video analytical algorithm (for example, optical flow method).
Patent document 1 discloses a kind of bus passenger flow statistical method for behavioural analysis of doing more physical exercises based on passenger comprising Following steps:Obtain the video image of passenger or more bus;The video image of acquisition is handled, head of passenger mesh is extracted Mark generates rectangle frame and confines the head of passenger target extracted;In conjunction with head of passenger target centroid point distance to shape in consecutive frame Heart point is matched, and is updated centre of form dot position information and is preserved, and is connected each centroid point and is obtained movement locus;To the movement rail of acquisition Mark carries out trajectory clustering, analyzes passenger moving behavior;Judgement is counted, demographics result is obtained.According to this method, can overcome There is the deficiency judged by accident and failed to judge in existing passenger flow statistical method, and effectively improves the accuracy that patronage counts in bus.
Patent document 2 discloses a kind of passenger flow statistical method of the non-gate area in the passenger station based on video monitoring, The characteristics of blocking be susceptible to for the image of the non-gate area in passenger station shooting, propose using pedestrian be not easy to be blocked, And the head and shoulder portion haar-like features that are basically unchanged of form are detected pedestrian, detection discriminates whether the standard for pedestrian True rate is higher, the application scenarios blocked occurs suitable for pedestrian image;And complete detect after, by Kalman filter and with The method of upper detection pedestrian to carry out dual tracking in the position of every frame image to pedestrian, to ensure the accuracy rate of tracking.
Patent document 1:CN103646253A;
Patent document 2:CN106127812A.
Invention content
But patent document 1,2 has used simple video analytical algorithm, due to by external environment and algorithm itself Limitation, accuracy rate receives constraint.It was found that the passenger flow number obtained by video analytical algorithm and true number it Between there is stronger tendencys, therefore the precision of passenger flow statistics can be significantly increased by regression modeling method.Due to The performance of video analytical algorithm is influenced by many extraneous factors and is showed unstable.Even for example, same video camera, The same period of (for example, Friday) and day off (for example, Saturday) on weekdays, when the degree of crowding difference of passenger flow, depending on The parsing precision of frequency also can be different.Such as equally there are 5 passengers by video camera shooting in certain day morning and afternoon The same area, but pass through since the passenger in the morning is scattered with, the passenger in afternoon is crowded to be passed through together, therefore video camera is upper Noon may detect that 5 people, but in the afternoon when only detected 3 people.
The present invention provides a kind of demographic method and demographics to solve the above-mentioned problems in the prior art Device.In the demographic method and people counting device, it is special that we introduce real-time video features, the environment of video camera Sign and configuration parameter attribute etc. are added to the training of model, and calibration model can be made more to stablize, adapt to a variety of different environment.
The first aspect of the present invention is a kind of demographic method, which is characterized in that including:It obtains and the first video is carried out Video parses the first video parsing number (also referred to as " image analysis ") obtained and parses number as video to be corrected First number acquisition step;Obtain the timestamp of first video, video features, residing for video camera when absorbing first video The fisrt feature acquisition step of the environmental characteristic of environment and the configuration parameter of video camera;It is corresponding with first video with basis Timestamp is sought from the correction comprising timestamp, video parsing number, video features, environmental characteristic and configuration parameter with model library It looks for corresponding correction model, the input video parsing number to be corrected and corresponding with first video described regards Frequency feature, the environmental characteristic and the configuration parameter, the number aligning step of the number after being corrected.
The second aspect of the present invention is a kind of demographic method, on the basis of the demographic method of first aspect On, can also be configured to, the correction model library through the following steps that formed:It obtains and video solution is carried out to the second video Second number acquisition step of the second video the parsing number and true number corresponding with second video of analysis and acquisition;It obtains The video features of second video, video camera local environment when absorbing second video environmental characteristic and video camera configuration The second feature acquisition step of parameter;Make second video parsing number, the true number and with second video pair The video features, the environmental characteristic and the configuration parameter answered correspond, and generate the data set for including these features Data set generation step;According to the timestamp for including in the data set, the data set is temporally divided into multiple subnumbers According to the Sub Data Set generation step of collection;Correction model is generated with based on the Sub Data Set, by multiple correction models Constitute the model library generation step of correction model library.
The third aspect of the present invention is a kind of demographic method, on the basis of the demographic method of second aspect On, it can also be configured to:The true number is counted by the gate data generated when gate according to pedestrian, In the case of the video data of second video and the gate data existence time difference, before generating the data set, Further include seeking the time difference, the time unifying step for making the video data be aligned in time with the gate data.
The fourth aspect of the present invention is a kind of demographic method, on the basis of the demographic method of second aspect On, it can also be configured to:In the second feature acquisition step, further include from the video features, the environmental characteristic and The step of Partial Feature being removed in the feature that the configuration parameter is included.
The fifth aspect of the present invention is a kind of demographic method, the either side in first aspect~fourth aspect On the basis of demographic method, it can also be configured to:The video features include picture intensity of passenger flow, brightness change and comparison Degree, the picture intensity of passenger flow are the maximum values of the intensity of passenger flow of all frames in video, and the brightness change is that own in video The average value of the luminance difference of frame frame adjacent thereto, the contrast are the average value of the contrast of all frame pictures in video.
The sixth aspect of the present invention is a kind of demographic method, the either side in second aspect~fourth aspect On the basis of demographic method, it can also be configured to:In the model library generation step, using linear regression method to institute Sub Data Set is stated to be trained and generate the correction model.
The seventh aspect of the present invention is a kind of demographic method, the either side in first aspect~fourth aspect On the basis of demographic method, it can also be configured to:The video features include contrast, and the contrast refers to institute in video The average value for having the contrast of frame picture, using the contrast of predetermined region in every frame picture as the contrast of the frame picture, institute It is the front and back region for respectively accounting for 1 people from the passenger paid close attention in picture passes through section to state the predetermined region in picture.
The eighth aspect of the present invention is a kind of people counting device, which is characterized in that including:It obtains and the first video is carried out The first video parsing number that video is parsed and obtained obtains module as the first number of video parsing number to be corrected;It takes The timestamp of first video, video features, video camera local environment when absorbing first video environmental characteristic and take the photograph The fisrt feature of the configuration parameter of camera obtains module;With according to timestamp corresponding with first video from including the time Stamp, video parsing number, video features, environmental characteristic and the correction corresponding correction mould of model library searching for configuring parameter Type, input the video parsing number and the video features corresponding with first video, the environment to be corrected Feature and the configuration parameter, the number correction module of the number after being corrected.
The ninth aspect of the present invention is a kind of people counting device, on the basis of the people counting device of eighth aspect On, it can also be configured to, further include:Obtain to the second video carry out video parsing and obtain the second video parsing number and with Second number of the corresponding true number of second video obtains module;Obtain the video features of second video, absorb this The second feature of the environmental characteristic of video camera local environment when two videos and the configuration parameter of video camera obtains module;Make described Second video parses number, the true number and the video features corresponding with second video, the environmental characteristic It is corresponded with the configuration parameter, generates the dataset generation module of the data set comprising these features;According to the data The data set is temporally divided into the Sub Data Set generation module of multiple Sub Data Sets by the timestamp that concentration includes;With based on The Sub Data Set generates correction model, and the model library that correction model library is constituted by multiple corrections with model generates mould Block.
The tenth aspect of the present invention is a kind of people counting device, on the basis of the people counting device of the 9th aspect On, it can also be configured to:The true number is counted by the gate data generated when gate according to pedestrian, institute It further includes time unifying module to state people counting device, video data of the time unifying module in the video of described a period of time In the case of the gate data existence time difference, before generating the data set, the time difference is sought, makes described regard Frequency evidence is aligned in time with the gate data.
Invention effect
Demographic method and people counting device according to the present invention can obtain the statistics people closer to true number Number.
Description of the drawings
Fig. 1 is the flow chart for generating calibration model library for indicating embodiment 1.
Fig. 2 is the signal for indicating position of the predetermined region for being sought contrast in the frame picture in a frame picture Figure.
The case where between Fig. 3 (a) expression AFC data and video data when existence time difference Δ t, Fig. 3 (b) indicates AFC numbers According to the situation after time unifying between video data.
Fig. 4 is corrected to the passenger flow number obtained based on video analytical algorithm using calibration model in embodiment 1 Flow chart.
Fig. 5 is the flow chart for generating calibration model library for indicating embodiment 2.
Fig. 6 is the flow chart for generating calibration model library for indicating embodiment 3.
Specific implementation mode
(embodiment 1)
As described above, the accuracy rate that the external environment of video camera parses video is exerted one's influence.Also, the hair of the present invention Bright person also found, the configuration parameters of the video features of video, the environmental characteristic of the video camera and video camera also standard with video parsing True rate is related.
In order to count true passenger flow number, the present invention first against " video features ", " external environment of video camera Environmental characteristic " and " the configuration parameter of video camera " generate calibration model, then utilize the calibration model to utilizing traditional video The passenger flow number that analytic method obtains is corrected, to obtain more true passenger flow number.
Fig. 1 is the flow chart for generating calibration model library for indicating embodiment 1.
First, acquisition AFC (Auto Fare Collection:Automatic fare collection) data (step 1).AFC data are subways The brushing card data of ticket check gate, has recorded time when passenger passes through gate in standing, and can be used for counting some time granularity The true passenger flow number of a certain group of gate of upper disengaging.AFC data generally comprise:Card number, Card Type, the gate for the card that passenger uses The information such as the number at station where the number of equipment, exchange hour (charge time), trade date, gate number and gate. The length of one time granularity (time particle) can be 5 seconds, 30 seconds, 1 minute, 5 minutes, 1 hour etc., without special It limits, is determined according to actual application scenarios, present embodiment selects 30 seconds time granularities.About time granularity definition with Method is determined, due to belonging to the prior art, herein without illustrating.
As described above, in the present embodiment, the true of a certain group of gate is passed in and out on some time granularity in order to obtain Passenger flow number, according to AFC data come statistical number of person and using the number gone out according to AFC data statistics as true passenger flow number.But It is that the present invention is not limited thereto, as long as the true number in the stipulated time by determined location can be obtained, however it is not limited to Obtain the mode of true number.For example, it is also possible to obtain true number by manually counting.For example, we can pass through people Eye checks video, records the information such as date, time that passenger swipes the card and the camera number shot.Alternatively, can also Directly observe by human eye the passenger flow by gate at the scene that video camera is imaged, record date that passenger swipes the card, when Between and the information such as the camera number that is shot.
Then, video is carried out to the video of the time granularity absorbed by video camera using usually used video analytic method Parsing, counts the passenger flow number in the time granularity, and obtain the video features and timestamp (step of the video of the time granularity S2)。
Above-mentioned video features include:Picture intensity of passenger flow (d), brightness change (l) and contrast (g).Above-mentioned time granularity Video (hereinafter referred to as " one section of video ") be (be typically 25 frames/second) collectively constituted by the picture of many frames, can first profit Intensity of passenger flow, the brightness and contrast that each frame picture is obtained with usually used video analytic method, then seek above-mentioned one The video features of section video.
Wherein, picture intensity of passenger flow (d) refers to the maximum value of the intensity of passenger flow of all frames in video, can pass through following formula (1) it acquires." picture intensity of passenger flow " can be divided into (1,2,3,4,5,6) six grades according to every square metre of passenger flow number, In 1 indicate minimum intensity of passenger flow, 6 indicate maximum intensity of passenger flow.
D=maxidi(1)
Assuming that above-mentioned one section of video includes N frame pictures, then the value range of i is 1~N.
Brightness change (l) refers to the average value of the luminance difference of all frame frames adjacent thereto in one section of video, can by with Following formula (2) acquires.
L=avgi|li+1-li|(2)
Contrast (g) refers to the average value of the contrast of all frames in one section of video, can be acquired by following formula (3).
G=avgigi(3)
When seeking the contrast of each frame, the contrast of the picture of entire frame can be both sought, can also be sought in picture Predetermined region contrast of the contrast as the frame.Illustrate pair using the predetermined region in picture below with attached drawing 2 The case where than contrast of the degree as the frame.
Fig. 2 is the signal for indicating position of the predetermined region for being sought contrast in the frame picture in a frame picture Figure.In Fig. 2, the big box of outermost indicates that a frame picture (that is, a frame image), arrow " → " indicate that (circle "○" indicates passenger flow Pedestrian) direction of travel, boxed area shown in dotted line indicates that the predetermined region in above-mentioned picture, solid line indicate in picture Passenger's passage section of concern.The present invention can also seek comparison of the contrast as the frame of boxed area shown in the dotted line Degree.The size of boxed area shown in the dotted line can be:In fig. 2, front and back from the passenger paid close attention in picture passes through section Respectively account for the region of 1 people.More specifically, in fig. 2, boxed area shown in the dotted line is passed through disconnected with the passenger paid close attention in picture Centered on face (such as wicket of gate), the length of passenger's direction of travel is the length in region shared by 2 people in this direction, left and right The length in direction is the width for the passenger's passage section paid close attention in picture.Video camera can be not only erected at the gate of subway, The other positions such as subway station entrance, stair can also be erected at.Therefore, passenger's passage section in Fig. 2 can be not only lock Passenger's passage section of the wicket of machine can also be passenger's passage section of the other positions such as subway station entrance, stair.
The timestamp obtained in step S2 includes date, the starting and end time of above-mentioned one section of video.
After completing step S2, the environmental characteristic and configuration parameter (step S3) of acquisition camera.Wherein video camera Environmental characteristic includes " object pixel size (sz) ", " video camera and target angle (ag) ", " area type (ar) " and " crowded journey It spends (cr) ".
Wherein, " object pixel size " refers to the amount of the occupied pixel in number of people part of each of picture.For example, When object pixel size is 80 × 250, indicate that number of people part occupies 80 pixels in the width direction in picture, in length 250 pixels are occupied on direction.
About " video camera and target angle (ag) ", when video camera is parallel with horizontal plane, video camera is with target angle 0;When video camera and horizontal plane, video camera is 90 with target angle.
Area type refer to passenger flow by place, including " stair ", " subway station gate ", " subway station entrance " etc..
The degree of crowding is determined according to usually showing for the scene by expert, can be according to every square metre of passenger flow people Number is divided into " low, in, high " three grades.
It includes " brightness degree (lu) " and " video camera setting height (sh) " etc. 70 multinomial to configure parameter (lu, sh ... ...) Parameter.Wherein, " brightness degree " can be divided into six grades (1,2,3,4,5,6), " 1 " expression " minimum brightness ", and " 6 " indicate " maximum brightness ".Since the configuration parameter of video camera belongs to the prior art, omits in the present specification and this 70 multinomial is matched The detailed description for setting parameter only enumerates " brightness degree (lu) " and " video camera setting height (sh) " and is used as example in the present specification Son.
Then, the environmental characteristic that will the video features that be calculated in step s 2 (d, l, g) and obtain in step s3 (sz, ag, ar, cr) and configuration parameter (lu, sh ... ...) are aggregated into (d, l, g) (sz, ag, ar, cr) (lu, sh ... ...), and And in order to reduce calculation amount, the certain useless or use in removing (d, l, g) (sz, ag, ar, cr) (lu, sh ... ...) is not Big item (that is, certain useless or little use feature) carries out feature selecting, obtains feature vector (step S4).Here, Useful about which feature, which feature use is little, and it is a very ripe research neck to carry out feature selecting on this basis Domain is not the inventive point of the present invention, here without being described in detail.For example, when carrying out feature selecting, MRMR can be used (minimum-redundancy-maximum-relevance:Minimal redundancy maximal correlation) algorithm, select best feature set. Alternatively, it is also possible to which (d, l, g) (sz, ag, ar, cr) (lu, sh ... ...) is simply denoted as f1f2f3, wherein f1Indicate (d, l, G), f2It indicates (sz, ag, ar, cr), f3It indicates (lu, sh ... ...).
In step s 4, it is assumed that the feature of " sh " in configuration parameter is removed, then finally obtained feature vector f1f2f3 It is (d, l, g) (sz, ag, ar, cr) (lu ... ...).Wherein, for example, as described above, " cr " expression in these features " is gathered around The degree of squeezing ", value is one in (basic, normal, high).Due to the selection of these features and the value range category of each feature In the prior art, therefore description is omitted in the present specification.
In addition, in step s 4, deleting the feature of " sh " in configuration parameter, but not limited to this, can also delete The arbitrary characteristics of entire configuration parameter.
The data that gate in subway station obtains are stored in AFC servers, and the video data of video camera intake is stored in In camera server.When existence time difference between AFC servers and camera server, the AFC that is obtained from AFC servers The timestamp of the timestamp of data and the video data obtained from camera data server also can existence time it is poor, when such Between difference can influence the generation of calibration model.Calculate the time difference between AFC data and video data below, and by AFC data with Video data is aligned (step S5).
The case where between Fig. 3 (a) expression AFC data and video data when existence time difference Δ t, Fig. 3 (b) indicates AFC numbers According to the situation after being aligned between video data.In Fig. 3 (a), Fig. 3 (b), horizontal axis indicates that time, the longitudinal axis indicate that statistics obtains Passenger flow number, the deeper curve of color indicates that the passenger flow number obtained according to AFC data statistics, the shallower curve of color indicate The passenger flow number obtained by being parsed to video.
Formula below (4) can be used to seek the above-mentioned time difference Δ t of some day.
In above formula (4), Δ t indicates the value of finally obtained time difference, tt indicate two groups of data (that is, AFC data with Video data) time difference possibility value, such as can in the range of " -300 seconds~300 seconds " value, st indicate it is each The initial time of a time granularity.Wherein 04:00:00 time started operation for subway is (that is, starting to obtain AFC data and regard The time of frequency evidence), 24:00:00 stop operation for subway time (that is, stop obtaining AFC data and video data when Between), " video statistics value " refers to being parsed and being counted using the video of a time granularity of video analytical algorithm pair Passenger flow number, " AFC statistical values " refer to the passenger flow number obtained according to the AFC data statistics of the time of a time granularity.
In above formula (4), by making tt values in the range of " -300 seconds~300 seconds ", it is assumed for example that video camera takes The video data of business device is -300 seconds faster respectively than corresponding AFC data, -299 seconds, -298 seconds ..., 298 seconds, 299 seconds, 300 seconds, Find the time difference of wherein two groups data difference minimums, that is, find the value that the video data can be made to agree with the most with AFC data The value of time difference as 2 groups of data.
After so that video data is aligned in time with AFC data in method as described above, each time can be obtained (st), end time (et), video features (f at the beginning of the video of granularity1), environmental characteristic (f2), configuration parameter (f3)、 Video statistics passenger flow number (x) and AFC statistics passenger flow numbers (y), by these data summarizations together as version at the beginning of one Training set (st, et, f1, f2, f3, x, f) and (step S6).Wherein, " video statistics passenger flow number " refers to utilizing video analytical algorithm The passenger flow number that the video of the time granularity is parsed and is counted, when " AFC counts passenger flow number " refers to according to this Between the obtained passenger flow number of granularity AFC data statistics.
It is known that the trip custom that passenger goes on a journey with festivals or holidays and different seasons on weekdays is different from, and And it even if is differed if early evening peak on the same day is with the degree of crowding usually.In order to keep the model of generation more accurate For correcting, we can carry out cutting training set according to the period.Specifically, according to the timestamp for including in training set, The training set of first version is cut into multiple sub- training sets (step S7) according to festivals or holidays, season, hour etc..
For example, training set can be divided into training set on ordinary days and festivals or holidays training set, festivals or holidays include:The Spring Festival, the Dragon Boat Festival Section, National Day, International Labour Day, the Ching Ming Festival, New Year's Day and the Mid-autumn Festival.May further will on ordinary days training set be divided into working day training set and Weekend training set.Working day training set and weekend training set can be divided into spring practice collection, summer training set, autumn training again Collection and winter training set.And it is possible to which each training set is divided into 24 sub- training sets by the hour.
In addition, it is assumed that subway station daily 4 o'clock sharp comes into operation, 24 o'clock sharps terminated to operate, then did not had during 0 point~4 points Passenger flow, therefore the sub- training set of this period can also be omitted.
The format of each training set can be indicated by following matrix form (5).
It is the data of each time granularity per a line in the above matrix form (5).
In above formula (5), at the beginning of st is indicated per data, et is the end time, and n is the line number of data, f1nIndicate the video features of nth data, f2nIndicate the camera environment feature of nth data, f3nIndicate nth data The configuration parameter attribute of video camera, xnIndicate the video statistics passenger flow number of nth data, ynIndicate the AFC systems of nth data Count passenger flow number (that is, true passenger flow number).
Then, each sub- training set that cutting in the step s 7 obtains is corrected using linear regression method, is generated The model (hereinafter referred to as " calibration model ") of correction corresponding with each sub- training set, correction is constituted by these calibration models Model library (step S8).Specifically, when generating calibration model using linear regression method, by inputting X, Y come artificial line Property equation, wherein X be independent variable, Y is dependent variable.Here, video statistics passenger flow number and the combination of various features of video camera are enabled Vector [the f to get up1n, f2n, f3n, xn] it is independent variable X, it is dependent variable Y that AFC, which counts passenger flow number,.
In the case where having new AFC data and video data, step S1 can be back to, carry out again step S1~ S7 generates new calibration model.
It this concludes the description of the method for generating calibration model.Then, illustrate to utilize generated calibration model, to being based on passing The passenger flow number that the video analytical algorithm of system obtains is corrected, and the method for obtaining more accurate passenger flow number illustrates.
Fig. 4 is the corrected flow chart of passenger flow number to being obtained based on video analytical algorithm using calibration model.
It is corrected it in the passenger flow number to the video on the time granularity based on traditional video analytical algorithm acquisition Before, first, using usually used video analytic method pair video corresponding with the passenger flow number on the time granularity (hereinafter, Referred to as " object video ") video parsing is carried out, the passenger flow number of the object video is counted, and the video for obtaining the object video is special It seeks peace timestamp (step S11).Step S11 and step S2 are substantially identical, omit the detailed description to step S11.
Then, environmental characteristic when acquisition camera reference object video and configuration parameter (step S12).Step S12 with Step S3 is substantially identical, omits the detailed description to step S12.
Then, by the video features being calculated in step s 11 and the environmental characteristic obtained in step s3 and configuration Parameter summarizes, and in order to reduce calculation amount, can also remove certain influences in video features, environmental characteristic and configuration parameter Small item (that is, certain influence small feature), carries out feature selecting, obtains feature vector (step S13).Step S13 and step S4 is substantially identical, omits the detailed description to step S11.
Then, the feature vector obtained in step s 13 is summarized with the passenger flow number counted in step s 11, Obtain input vector (f1, f2, f3, x) and (step S14).
According to the timestamp of the object video obtained in step s 11, sought from the calibration model library generated in step S8 Look for calibration model (step S15) corresponding with the timestamp of the object video.It is assumed here that timestamp and the spring of object video Season, weekend, 7 points of model are corresponding, then the calibration model that step S15 is found is exactly spring, weekend, 7 points of calibration model. The obtained input vectors of step S14 are input in the calibration model that step S15 is found, so that it may after being corrected Passenger flow number (step S16).
By using above-described demographic method, compared with prior art, can obtain closer to true number Statistical number of person.
In the present embodiment, illustrate that video features include picture intensity of passenger flow, brightness change and contrast, video camera Environmental characteristic include object pixel size, video camera and target angle, area type and the degree of crowding, configuration parameter includes bright Spend the example of grade and video camera setting height.But the environmental characteristic of video features, video camera and configuration parameter are not limited to The every specific features stated can suitably increase or decrease certain features in the case where considering to calculate cost.
(embodiment 2)
In the embodiment 1, using the number gone out according to AFC data statistics as true passenger flow number.In AFC servers Between camera server when existence time difference, need to calculate the time difference between AFC data and video data, by AFC numbers According to be aligned with video data (that is, eliminate the two before time difference).Particular content please refers to the step S5 of embodiment 1.
Fig. 5 is the flow chart for generating calibration model library for indicating embodiment 2.
In present embodiment 2, in order to obtain the true passenger flow number for passing in and out a certain group of gate in some time granularity, Not by the way of counting true passenger flow number according to AFC data, and true passenger flow number is obtained by manually observing (S1’).Specifically, we, by eye-observation video, record passenger by information such as the date and times of gate to unite Count true passenger flow number;Or the scene imaged in video camera is directly observed by human eye and is obtained by the passenger of gate True passenger flow number.
Since the time difference being not present between the data obtained by eye-observation and video data, no It needs as Embodiment 1 into the step S5 for being about to AFC data and being aligned with video data.
In present embodiment 2, as shown in figure 5, after the step S4 for generate feature vector, enter step S6 generates the training set of just version.
In present embodiment 2, compared with embodiment 1, other than step S1 ' is different and step S5 is omitted, His step (S2~S4, S6~S8, S11~S16) is identical as embodiment 1.In the present embodiment, omission pair and embodiment The description of 1 identical content.
By using the demographic method that present embodiment 2 is recorded, compared with prior art, can obtain closer to true The statistical number of person of real number.
(embodiment 3)
In the embodiment 1, in order to reduce calculation amount, from video features (d, l, g), environmental characteristic (sz, ag, ar, cr) Small item (that is, certain influence small feature) is influenced with being eliminated in configuration parameter (lu, sh), for example, being removed from configuration parameter The feature of " video camera setting height " is gone.
In present embodiment 3, without carrying out the deletion of feature as Embodiment 1.
Fig. 6 is the flow chart for generating calibration model library for indicating embodiment 3.As shown in fig. 6, in present embodiment 3 In step S4 ', after video features, environmental characteristic and configuration parameter are summarized, feature vector is directly obtained.
In present embodiment 3, compared with embodiment 1, other than step S4 ' is different, other steps (S1~S3, S5~S8, S11~S16) it is identical as embodiment 1.In the present embodiment, it omits to content same as embodiment 1 Description.
By using the demographic method that present embodiment 3 is recorded, compared with prior art, can obtain closer to true The statistical number of person of real number.
The present invention is specifically described below with embodiment 1.
(embodiment 1)
Hereinafter, according to step S11~S16, confirms and utilize the calibration model library made according to step S1~S8 in the present invention The effect of acquisition.
First, we check video by human eye, record date (trade date) that the passenger in one section of video swipes the card, when Between (exchange hour), camera number for shooting.Swipe the card time of transaction is subject to the shooting time of video camera.
Table 1
Trade date Exchange hour Camera number
20160131 090236 43
20160131 090355 43
20160131 233110 43
Table 1 indicates the example of 3 data comprising trade date, exchange hour and camera number of record.In table 1 In, " 20160131 " indicate that trade date is on January 31st, 2016, and 2 divide 36 seconds when " 090236 " expression exchange hour is 9, " 43 " are camera numbers.The data manually demarcated serve as actual value in the training and test of model.
Then, the passenger flow number in the video of each time granularity is obtained by traditional video analytic method.It is below Table 2 indicates the data format of the passenger flow number of video camera.
Table 2
In with upper table 2, direction " 0 " indicates passenger from the direction of close video camera at a distance, if direction is " 1 ", table Show direction of the passenger far from video camera.
Then, the video features (please referring to table 3 below) of above-mentioned one section of video are obtained, the environmental characteristic of video camera (is asked With reference to table 4 below) and configuration parameter (please referring to table 5 below).
Table 3
Time started End time Picture intensity of passenger flow Brightness change Contrast
090000 090030 3 5.3 7.5
Table 4
Object pixel size Video camera and target angle Area type The degree of crowding
80×250 15 Gate In
Table 5
Brightness degree Video camera setting height
4 260
Also, based on traditional video analytical algorithm to carrying out video parsing with the preceding paragraph video, acquisition is each time The number of video in granularity.And check that video, the result of correction are also the number of the video on each time granularity by human eye.
Using above-mentioned data, table 1,2,3,4,5 is matched, generates the data set of just version.On January 31st, 2016 It is winter on Sunday, so edition data collection at the beginning of data is split according to each hour, and the Sub Data Set of fractionation is added Into the training set at " weekend in winter " each hour.Sub Data Set for " weekend in winter " each hour is trained, and generates school Positive model library.
When we need to be corrected the passenger flow number on some time granularity, if the video of correction is clapped When being photographed on 2 6th, the 2016 9: 34 21: morning, then the video acquired on this time granularity parses passenger flow number, video Feature, environmental characteristic and parameter attribute generate input vector.Since on 2 6th, 2016 be weekend in winter, therefore find " week in winter The calibration model at 9 points of end " inputs input vector, can obtain the passenger flow number after the correction on the time granularity.Following table 6 It describes in January, 2016 each day, the accuracy rate of video parsing when using traditional video analytical algorithm and based on this Invent the data of the accuracy rate after being corrected.
Table 6
In with the first row data in upper table 6, " 50172 " refer on January 9th, 2016 by video camera (number 43) The true passenger flow number of whole day in the video of shooting, " 6597 " refer to when utilizing traditional video analytical algorithm in grain of each time The summation of error number on degree (had both been included in the numbers detected in each time granularity more, and had been also included within each time granularity In the number that detects less), " 2832 " are the error numbers after being corrected based on the present invention, and " 86.85% " is using traditional The accuracy rate of video parsing when video analytical algorithm, " 94.36% " are the accuracys rate after being corrected based on the present invention.
It can be calculated using following formula (6) with the accuracy rate in upper table (6).
Wherein, xhourIndicate the passenger flow statistics number of each hour (after the passenger flow number gone out according to video statistics or correction Passenger flow number), yhourIndicate that true passenger flow number hourly, A% indicate accuracy rate.
According to table 6 it is found that by using demographic method of the invention, compared with existing video analytic method, energy Enough data obtained closer to true passenger flow number.
The above is only the preferred embodiments of the present invention, it is noted that for those skilled in the art, Under the premise of not departing from the principle of the invention and basis, several improvement, retouching can also be made, replace step combination etc., these Improvement, retouching, replacement step combination etc. should also be protection scope of the present invention.
It will be understood by those skilled in the art that the present invention is capable of providing as method, system or computer program product.This hair It is bright to be realized completely by hardware realization, completely by software realization or in conjunction with software and hardware.Moreover, the present invention can adopt (include but not limited to that disk is deposited used in the computer-usable storage medium that one or more includes computer usable program code Reservoir, CD-ROM, optical memory etc.) on the form of computer program product implemented.
The present invention be according to the flow chart of the method for the specific embodiment of the invention, system or computer program product and/ Or block diagram describes.It should be understood that each flow in flowchart and/or the block diagram can be realized by computer program instructions And/or the combination of the flow and/or box in box and flowchart and/or the block diagram.These computer programs can be referred to Order be supplied to the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices with Realize that an instruction executed by computer or the processor of other programmable data processing devices generates for realizing flowing The device for the function of being specified in one flow of journey figure or multiple flows and/or one box of block diagram or multiple boxes.
These computer program instructions can also be stored in can guide computer or other programmable data processing devices with In the computer-readable memory of ad hoc fashion work so that instruction stored in the computer readable memory, which generates, includes The manufacture of command device, the command device are realized in one flow of flow chart or multiple flows and/or one box of block diagram Or the function of being specified in multiple boxes.
These computer program instructions can be also loaded onto a computer or other programmable data processing device so that Series of operation steps are executed on computer or other programmable devices to generate computer implemented processing, in computer Or the instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram The step of function of being specified in one box or multiple boxes.
Industrial utilizability
The present invention demographic method and people counting device can promote statistical accuracy, can be suitable for subway station, The various regions for needing statistical number of person such as market, hospital are highly useful particularly with bus passenger flow statistics.

Claims (10)

1. a kind of demographic method, which is characterized in that including:
It obtains the first video parsing number that video parsing is carried out to the first video and is obtained and parses people as video to be corrected The first several number acquisition steps;
It is special to obtain the timestamp of first video, video features, the environment of video camera local environment when absorbing first video Seek peace video camera configuration parameter fisrt feature acquisition step;With
According to timestamp corresponding with first video, from including that timestamp, video parsing number, video features, environment are special The correction for configuration parameter of seeking peace finds corresponding correction model with model library, the input video parsing number to be corrected with And the video features corresponding with first video, the environmental characteristic and the configuration parameter, the people after being corrected Several number aligning steps.
2. demographic method as described in claim 1, it is characterised in that:
The correction model library through the following steps that formed:
It obtains and video parsing is carried out to the second video and the second video parsing number for obtaining and corresponding with second video true Second number acquisition step of real number;
The environmental characteristic of video camera local environment when obtaining the video features of second video, absorbing second video and camera shooting The second feature acquisition step of the configuration parameter of machine;
Make the second video parsing number, the true number and the video features corresponding with second video, institute It states environmental characteristic and the configuration parameter corresponds, generate the data set generation step of the data set comprising these features;
According to the timestamp for including in the data set, the data set is temporally divided into the Sub Data Set of multiple Sub Data Sets Generation step;With
Correction model is generated based on the Sub Data Set, the model of correction model library is constituted by multiple corrections with model Library generation step.
3. demographic method as claimed in claim 2, it is characterised in that:
The true number is counted by the gate data generated when gate according to pedestrian,
In the case of the video data of second video and the gate data existence time difference, the data set is being generated Before, further include seeking the time difference, the time unifying for making the video data be aligned in time with the gate data Step.
4. demographic method as claimed in claim 2, it is characterised in that:
Further include from the video features, the environmental characteristic and the configuration parameter in the second feature acquisition step Including feature in remove Partial Feature the step of.
5. demographic method as described in any one of claims 1 to 4, it is characterised in that:
The video features include picture intensity of passenger flow, brightness change and contrast, and the picture intensity of passenger flow is institute in video It is the average value of the luminance difference of all frame frames adjacent thereto in video to have the maximum value of the intensity of passenger flow of frame, the brightness change, The contrast is the average value of the contrast of all frame pictures in video.
6. the demographic method as described in any one of claim 2~4, it is characterised in that:
In the model library generation step, the Sub Data Set is trained using linear regression method and generates the school Just use model.
7. demographic method as described in any one of claims 1 to 4, it is characterised in that:
The video features include contrast, and the contrast is the average value of the contrast of all frame pictures in video, will be every Contrast of the contrast of predetermined region as the frame picture in frame picture,
Predetermined region in the picture is the front and back region for respectively accounting for 1 people from the passenger paid close attention in picture passes through section.
8. a kind of people counting device, which is characterized in that including:
It obtains the first video parsing number that video parsing is carried out to the first video and is obtained and parses people as video to be corrected The first several numbers obtains module;
It is special to obtain the timestamp of first video, video features, the environment of video camera local environment when absorbing first video Seek peace video camera configuration parameter fisrt feature obtain module;With
According to timestamp corresponding with first video, from including that timestamp, video parsing number, video features, environment are special The correction for configuration parameter of seeking peace finds corresponding correction model with model library, the input video parsing number to be corrected with And the video features corresponding with first video, the environmental characteristic and the configuration parameter, the people after being corrected Several number correction modules.
9. people counting device as claimed in claim 8, which is characterized in that further include:
It obtains and video parsing is carried out to the second video and the second video parsing number for obtaining and corresponding with second video true Second number of real number obtains module;
The environmental characteristic of video camera local environment when obtaining the video features of second video, absorbing second video and camera shooting The second feature of the configuration parameter of machine obtains module;
Make the second video parsing number, the true number and the video features corresponding with second video, institute It states environmental characteristic and the configuration parameter corresponds, generate the dataset generation module of the data set comprising these features;
According to the timestamp for including in the data set, the data set is temporally divided into the Sub Data Set of multiple Sub Data Sets Generation module;With
Correction model is generated based on the Sub Data Set, the model of correction model library is constituted by multiple corrections with model Library generation module.
10. people counting device as claimed in claim 9, it is characterised in that:
The true number is counted by the gate data generated when gate according to pedestrian,
The people counting device further includes time unifying module, and the video of the time unifying module in described a period of time regards Frequency according to the gate data existence time difference in the case of, before generating the data set, seek the time difference, make The video data is aligned in time with the gate data.
CN201710052943.2A 2017-01-22 2017-01-22 Demographic method and people counting device Pending CN108346199A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710052943.2A CN108346199A (en) 2017-01-22 2017-01-22 Demographic method and people counting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710052943.2A CN108346199A (en) 2017-01-22 2017-01-22 Demographic method and people counting device

Publications (1)

Publication Number Publication Date
CN108346199A true CN108346199A (en) 2018-07-31

Family

ID=62961800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710052943.2A Pending CN108346199A (en) 2017-01-22 2017-01-22 Demographic method and people counting device

Country Status (1)

Country Link
CN (1) CN108346199A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114299746A (en) * 2021-12-30 2022-04-08 武汉长飞智慧网络技术有限公司 Image recognition-based bus scheduling method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103854292A (en) * 2012-11-28 2014-06-11 中兴通讯股份有限公司 Method and device for calculating number of people and population motion direction
US20160019698A1 (en) * 2014-07-21 2016-01-21 Florida Atlantic University Systems and methods for people counting in sequential images
CN105631418A (en) * 2015-12-24 2016-06-01 浙江宇视科技有限公司 People counting method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103854292A (en) * 2012-11-28 2014-06-11 中兴通讯股份有限公司 Method and device for calculating number of people and population motion direction
US20160019698A1 (en) * 2014-07-21 2016-01-21 Florida Atlantic University Systems and methods for people counting in sequential images
CN105631418A (en) * 2015-12-24 2016-06-01 浙江宇视科技有限公司 People counting method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
PRAHLADKILAMBI,ETC: "Estimating pedestrian counts in groups", 《COMPUTER VISION AND IMAGE UNDERSTANDING》 *
YING-LI TIAN,ETC: "Automatic Counting of Interacting People by using a Single Uncalibrated Camera", 《2006 IEEE INTERNATIONAL CONFERENCE ON MULTIMEDIA AND EXPO》 *
彭博: "拥挤场景下人数统计的关键技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114299746A (en) * 2021-12-30 2022-04-08 武汉长飞智慧网络技术有限公司 Image recognition-based bus scheduling method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN103578119B (en) Target detection method in Codebook dynamic scene based on superpixels
CN109522967A (en) A kind of commodity attribute recognition methods, device, equipment and storage medium
US20190373220A1 (en) System and method for activity monitoring using video data
CN111460926A (en) Video pedestrian detection method fusing multi-target tracking clues
CN107679613A (en) A kind of statistical method of personal information, device, terminal device and storage medium
CA3169538C (en) System and method for privacy-aware analysis of video streams and operation and learning of computer-implemented classification module
CN107480624B (en) Permanent resident population's acquisition methods, apparatus and system, computer installation and storage medium
US20160019698A1 (en) Systems and methods for people counting in sequential images
CN111325051B (en) Face recognition method and device based on face image ROI selection
CN106203513A (en) A kind of based on pedestrian's head and shoulder multi-target detection and the statistical method of tracking
CN104166841A (en) Rapid detection identification method for specified pedestrian or vehicle in video monitoring network
CN103986910A (en) Method and system for passenger flow statistics based on cameras with intelligent analysis function
US9147128B1 (en) Machine learning enhanced facial recognition
CN110874583A (en) Passenger flow statistics method and device, storage medium and electronic equipment
CN112668525B (en) People flow counting method and device, electronic equipment and storage medium
CN106250825A (en) A kind of at the medical insurance adaptive face identification system of applications fields scape
WO2023029574A1 (en) Method and apparatus for acquiring passenger flow information, and computer device and storage medium
CN106446922A (en) Crowd abnormal behavior analysis method
CN109753917A (en) Face quality optimization method, system, computer readable storage medium and equipment
CN108363953A (en) A kind of method and binocular monitoring device of pedestrian detection
CN108875490A (en) The method, apparatus and computer storage medium of personnel's flow analysis
CN106570440A (en) People counting method and people counting device based on image analysis
US20230154192A1 (en) Person flow analysis method and system, electronic device, and readable storage medium
CN108346199A (en) Demographic method and people counting device
CN110189181B (en) Advertisement browsing beneficial accounting system for online video APP

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180731