CN101237562A - A motion detection method for monitoring terminal based on frame comparison - Google Patents

A motion detection method for monitoring terminal based on frame comparison Download PDF

Info

Publication number
CN101237562A
CN101237562A CNA2007100028045A CN200710002804A CN101237562A CN 101237562 A CN101237562 A CN 101237562A CN A2007100028045 A CNA2007100028045 A CN A2007100028045A CN 200710002804 A CN200710002804 A CN 200710002804A CN 101237562 A CN101237562 A CN 101237562A
Authority
CN
China
Prior art keywords
frame
picture element
comparing unit
primitive
value
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
CNA2007100028045A
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNA2007100028045A priority Critical patent/CN101237562A/en
Publication of CN101237562A publication Critical patent/CN101237562A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

A motion detection method of a monitor terminal based on frame comparison comprises the following steps: a frame is extracted from a monitor image acquired from the monitor terminal at a time interval and is used as a sampling frame; moreover, one sampling frame is set as an original frame, and a sampling frame behind the original frame is set as a current frame; the brightness values of the pixel points in a comparison unit corresponding to the original frame and the current frame are compared one by one; when the differential pixel point of both frames reaches a preset threshold, the method judges that a mobile is detected; when the differential pixel point of both frames does not reach a preset threshold, a new original frame and a new current frame are set and are compared according to the comparison mode.

Description

A kind of monitor terminal is based on frame method for testing motion relatively
Technical field
The present invention relates to a kind of method for supervising, especially a kind of monitor terminal carries out the method for motion detection.
Background technology
Traditional monitoring product generally all is based on wiredly, and the product that wherein is used for burglar alarm is to adopt infrared heat source to detect or simple physics schemes such as magnetic blocking-up are carried out mostly.Do real-time motion detection (Motion Detect) if desired, generally can use tailor-made algorithm chip at a high speed, or adopt the very strong PC of operational capability to be used as main frame.
Only based on the product of GPRS and CDMA2000, still owing to the restriction of data transmission bauds, can't accomplish immediately check, more impossible motion detection of by software accomplishing intelligence in the past by the product of GPRS and CDMA2000 for wireless monitoring product.Along with the large-scale application of 3G in the whole world, increasing people brings into use the 3G portable terminal.Be main mode with video telephone simultaneously, support the 3G mobile monitoring terminal of video monitoring to begin that also some application are arranged.These monitor terminals are equipped with the camera of supporting infrared mode, can carry out round-the-clock monitoring by video telephone.But the video monitoring that with antitheft is main purpose requires to carry out real-time motion detection, and the CPU operational capability of 3G terminal is far smaller than general PC, can not adopt very complicated algorithm to carry out motion detection, consider cost and integrated difficulty in addition, also can not adopt special compute chip to do, therefore can only realize with software algorithm in conjunction with the characteristics of terminal self.
Summary of the invention
The objective of the invention is to little at existing portable terminal operational capability, as can't to carry out the computing of compound movement detection algorithm characteristics, a kind of algorithm that is applied to mobile monitoring terminal method for testing motion simply and fast and effectively is provided.
Technical scheme of the present invention is as follows:
A kind of monitor terminal may further comprise the steps based on frame method for testing motion relatively:
(1) from the monitoring image that monitor terminal obtains, extracts a frame as sample frame every a time interval, and one of them sample frame is set at primitive frame, a sample frame after the primitive frame is set at present frame;
(2) primitive frame and present frame are divided into several comparing units that number equates in an identical manner respectively, comprise at least one picture element in each comparing unit;
(3) set a picture element difference threshold value and a comparing unit difference number threshold value, and a counter is set;
(4) brightness value of the picture element in the comparing unit of primitive frame and present frame correspondence relatively one by one, when the difference of the brightness value that a predetermined quantity corresponding picture element is arranged in the comparing unit of certain comparing unit of primitive frame and present frame correspondence during greater than described picture element difference threshold value, described counter increases progressively a fixed value;
(5) after all comparing units of primitive frame and present frame relatively finished, relatively the value and the comparing unit difference number threshold value of counter detected moving object if the value of counter more than or equal to comparing unit difference number threshold value, is then judged; If the value of counter then with counter O reset, and resets primitive frame and present frame less than comparing unit difference number threshold value, repeat described step (3) step afterwards.
In the above-mentioned steps (2), can be with primitive frame and each picture element of present frame as a comparing unit, in the then described step (4), when the brightness value difference of picture element corresponding in certain picture element in the primitive frame and the present frame during greater than picture element difference threshold value, counter increases progressively a fixed value.
Perhaps, in above-mentioned steps (2), primitive frame and present frame can be divided into a plurality of respectively, each piece comprises more than one picture element, with each piece as a comparing unit; Correspondingly, in the described step (4), when the luminance difference that a predetermined quantity picture element is arranged in certain piece of primitive frame piece corresponding with present frame during greater than described picture element difference threshold value, counter increases progressively a fixed value.
In the described step (5), reset primitive frame and present frame, be with the present frame in the comparison procedure last time as new primitive frame, and with a sample frame after the new primitive frame as new present frame.
Adopt the method for the invention at the requirement of using on the characteristics of portable terminal self and the mobile monitoring terminal, compare with general motion detection technique, algorithm is simple and effectively, is easy to realize, and is real-time; And method of the present invention realizes not relying on specific hardware and software platform, and is widely applicable, not only can be applied in neatly on the mobile monitoring terminal, also can be applicable on other the monitor terminal product.
Description of drawings
Fig. 1 is the flow chart of one embodiment of the present of invention
Fig. 2 is with the single pixel embodiment schematic diagram of unit as a comparison
Fig. 3 is the blockage embodiment schematic diagram of unit as a comparison that will comprise a plurality of pixels
Embodiment
Below to be applied to mobile monitoring terminal with method of the present invention be example, embodiments of the present invention are described.
After monitoring camera obtains raw image data, be transferred to the motion detection program of mobile monitoring terminal.Motion detection program is every a time interval, as extracting a frame as sample frame from monitoring image every 1 second, and one of them sample frame is set at primitive frame P0, and a sample frame after the primitive frame is set at present frame P1; Primitive frame P0 and present frame P1 are divided into several comparing units that number equates in an identical manner respectively, so that primitive frame and present frame are compared.Comprise at least one picture element in each comparing unit.
Set a picture element difference threshold xi 1 and a comparing unit difference number threshold xi 2, and a counter C is set, its initial value can be set at 0; The brightness value that compares picture element corresponding in the comparing unit of primitive frame and present frame correspondence one by one, when the difference of the brightness value Y that a predetermined quantity picture element is arranged in the comparing unit during greater than picture element difference threshold xi 1, then counter C increases progressively a fixed value (as add 1 at every turn), and specific algorithm is as follows:
If f Current(x, y) (x is y) at P for the expression picture element 1In brightness Y value, and f Previous(x, y) (x is y) at P for the remarked pixel point 0In brightness Y value,
a ( x , y ) = 1 | f current ( x , y ) - f previous ( x , y ) | > ξ 1 0 | f current ( x , y ) - f previous ( x , y ) | ≤ ξ 1
If a (x, y)=1, C=C+1 then
The concrete quantity of an above-mentioned predetermined quantity picture element is according to the picture element quantity in each comparing unit and accuracy of detection and decide.As, in each comparing unit, having only a picture element, this predetermined quantity can only be one; An above picture element is arranged in each comparing unit, as 4 picture elements are arranged in each comparing unit, can comparing unit of pre-settled primitive frame and present frame in corresponding comparing unit in the difference of 2 or 3 picture element brightness values is arranged greater than ξ 1, think that then the corresponding comparing unit in the comparing unit of this primitive frame and the present frame is variant, the value of counter C is increased progressively 1.
After all picture elements of primitive frame P0 and present frame P1 or comparing unit relatively finished, counter C can obtain the value of an accumulative total; Relatively value and the comparing unit difference number threshold xi 2 of counter C detect moving object if the value of counter C more than or equal to comparing unit difference number threshold xi 2, is then judged; If the value of counter C is less than comparing unit difference number threshold xi 2, then with the value zero clearing of counter, and reset primitive frame and present frame, repeat the comparison of above-mentioned primitive frame and present frame.
Primitive frame that resets and present frame, can with last time present frame relatively as primitive frame, with the sample frame after the primitive frame as present frame; Also can be again from monitoring image, extract a sample frame as primitive frame, with the sample frame behind the new primitive frame as present frame.
Below in conjunction with accompanying drawing and preferred embodiment, method of the present invention is further specified.
Accompanying drawing 1 is the flow chart of one embodiment of the present of invention.
Obtain raw image data after the monitoring camera sampling, be transferred to motion detection program then.The speed that common setting camera obtains image is 10 frame per seconds, because for the motion detection on the monitor terminal, too fast speed has little significance.
To be converted to yuv format from the data that camera obtains.For camera, this conversion is all supported, even do not support, should be used for saying the view data that also can obtain rgb format for mobile phone, can change mutually between RGB and the YUV.Yuv format is convenient to follow-up arthmetic statement, also is convenient to algorithm and realizes.
The resolution sizes that is used for detected image that setting obtains from camera, this size can influence the time complexity that subsequent step carries out computing, because time complexity between picture frame relatively is unsuitable excessive, so resolution is preferably got a value at QCIF (176 * 144) between QVGA (320 * 240).
Motion detection program extracted a sample frame every 1 second from the image that the camera transmission comes.When extracting sample frame, begin to extract sample frame again after can beginning to obtain monitoring image a period of time (about) at the mobile monitoring terminal camera as 1 second, just abandon some frames of the 1 second left and right sides length that camera begins to transmit earlier, according to the sample rate of 10 frame per seconds, abandon 10~15 frames approximately.Be subjected to the camera parameter influence and differ greatly because camera has just begun image transmitted, therefore abandon this part frame and be necessary.
Setting a frame in the sample frame of said extracted is primitive frame P 0, a sample frame after the primitive frame is set at present frame P 1
Determine the mode that compares between primitive frame P0 and the present frame P1.Can will be that comparing unit compares with single picture element between primitive frame P0 and the present frame P1; Also can will be divided into a plurality of by same dividing mode between primitive frame P0 and the present frame P1, each piece includes several picture elements, is that comparing unit compares with the piece between primitive frame P0 and the present frame P1.
Set pixel difference threshold values ξ 1, the luminance difference between certain picture element of primitive frame P0 and present frame P1 correspondence surpasses this threshold xi 1, then thinks variant between these two picture elements.Because brightness value Y component is between 0~255, according to the color similarity scope, ξ 1 is preferably 10~15 values.
A counter is set, and the value C of counter is initially 0.
Compare primitive frame P0 and present frame P1 by predetermined mode.
Shown in Figure 2 is that each comparing unit contains a picture element, is that comparing unit compares with single picture element between primitive frame P0 and the present frame P1 promptly.Among Fig. 2 arrow indication be in the primitive frame picture element and in present frame corresponding picture element.The brightness value of corresponding picture element between primitive frame P0 and present frame P1 relatively one by one, when the brightness value difference of picture element corresponding in certain picture element in the primitive frame and the present frame during greater than picture element difference threshold xi 1, the value C of counter just adds 1.
Shown in Figure 3 is that primitive frame and present frame are divided into a plurality of blockages respectively, and each blockage comprises 2 * 2 picture elements, is that comparing unit compares with the piece between primitive frame P0 and the present frame P1.Among Fig. 3 arrow indication be in the primitive frame blockage and in present frame corresponding blockage.The brightness value that compares the corresponding picture element in the square corresponding between primitive frame P0 and present frame P1 one by one, can preestablish when the luminance difference that 2 corresponding picture elements are arranged in certain blockage of primitive frame blockage corresponding with present frame during greater than ξ 1, then think variant between these two pieces, this moment, Counter Value C added 1.This mode can be eliminated some independent noise.Among the embodiment shown in Figure 3, using 2 * 2 blockage size, is a kind of preferred mode, and the division of piece can also be adopted similarly other modes certainly.
Set comparing unit difference number threshold values ξ 2.
When with the picture element being unit when comparing, comparing unit difference number threshold values ξ 2 is exactly the number of discrepant picture element between primitive frame P0 and the present frame P1.According to the actual detected permissible accuracy, can set ξ 2 and get final product for an appropriate ratio of single-frame images number of total picture element.Tried data are that it is 50~500 that high-precision motion detection can be set ξ 2 when the single-frame images size is QCIF (176 * 144), and the detection of low precision can be set at 10000.Concrete ratio data can obtain by the method for test of many times.
When with the piece being the unit comparison, comparing unit difference number threshold values ξ 2 is difference numbers of the piece between primitive frame P0 and the present frame P1.
After all picture elements of primitive frame P0 and present frame P1 relatively finished, relatively the value C and the comparing unit difference number threshold xi 2 of counter detected moving object if the value C of counter more than or equal to ξ 2, then judges; If the value C of counter is less than comparing unit difference number threshold xi 2,, the present frame in the last time comparison procedure as new primitive frame, as new present frame, is repeated above-mentioned comparison procedure with the sample frame after the new primitive frame then with counter O reset.

Claims (10)

1. a monitor terminal may further comprise the steps based on frame method for testing motion relatively:
(1) from the monitoring image that monitor terminal obtains, extracts a frame as sample frame every a time interval, and one of them sample frame is set at primitive frame, a sample frame after the primitive frame is set at present frame;
(2) primitive frame and present frame are divided into several comparing units that number equates in an identical manner respectively, comprise at least one picture element in each comparing unit;
(3) set a picture element difference threshold value and a comparing unit difference number threshold value, and a counter is set;
(4) brightness value of the picture element in the comparing unit of primitive frame and present frame correspondence relatively one by one, when the difference of the brightness value that a predetermined quantity corresponding picture element is arranged in the comparing unit of certain comparing unit of primitive frame and present frame correspondence during greater than described picture element difference threshold value, described counter increases progressively a fixed value;
(5) after all comparing units of primitive frame and present frame relatively finished, relatively the value and the comparing unit difference number threshold value of counter detected moving object if the value of counter more than or equal to comparing unit difference number threshold value, is then judged; If the value of counter then with counter O reset, and resets primitive frame and present frame less than comparing unit difference number threshold value, repeat described step (3) step afterwards.
2. the method for claim 1, it is characterized in that: the resolution of the monitoring image described in the step (1) is between 176 * 144 to 320 * 240.
3. the method for claim 1, it is characterized in that: the time interval described in the step (1) is 1 second.
4. the method for claim 1 is characterized in that: in the described step (1), begin to obtain monitoring image at monitor terminal and begin to extract sample frame after a period of time.
5. the method for claim 1, it is characterized in that: in the described step (2), each comparing unit comprises a picture element.
6. method as claimed in claim 5 is characterized in that: in the described step (4), when the brightness value difference of picture element corresponding in certain picture element in the primitive frame and the present frame during greater than described picture element difference threshold value, counter increases progressively a fixed value.
7. the method for claim 1, it is characterized in that: in the described step (2), primitive frame and present frame are divided into a plurality of respectively, as a comparing unit, each piece comprises more than one picture element with each piece.
8. method as claimed in claim 7, it is characterized in that: in the described step (4), when the luminance difference that a predetermined quantity corresponding picture element is arranged in certain piece of primitive frame piece corresponding with present frame during greater than described picture element difference threshold value, counter increases progressively a fixed value.
9. the method for claim 1 is characterized in that: described picture element difference threshold value value between 10-15.
10. the method for claim 1, it is characterized in that: in the described step (5), reset primitive frame and present frame, be with the present frame in the comparison procedure last time as new primitive frame, and with a sample frame after the new primitive frame as new present frame.
CNA2007100028045A 2007-01-30 2007-01-30 A motion detection method for monitoring terminal based on frame comparison Pending CN101237562A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007100028045A CN101237562A (en) 2007-01-30 2007-01-30 A motion detection method for monitoring terminal based on frame comparison

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007100028045A CN101237562A (en) 2007-01-30 2007-01-30 A motion detection method for monitoring terminal based on frame comparison

Publications (1)

Publication Number Publication Date
CN101237562A true CN101237562A (en) 2008-08-06

Family

ID=39920876

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007100028045A Pending CN101237562A (en) 2007-01-30 2007-01-30 A motion detection method for monitoring terminal based on frame comparison

Country Status (1)

Country Link
CN (1) CN101237562A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799928A (en) * 2010-03-30 2010-08-11 深圳市融创天下科技发展有限公司 High-efficient low-complexity motion detection method applicable to image processing
CN102148959A (en) * 2010-02-09 2011-08-10 北京中星微电子有限公司 Video monitoring system and method for detecting moving target of image thereof
CN102340619A (en) * 2010-07-21 2012-02-01 杭州华三通信技术有限公司 Mobile detection method and device
CN103179384A (en) * 2013-03-21 2013-06-26 鸿富锦精密工业(深圳)有限公司 Video data processing system for video monitoring and video broadcasting system
CN103905706A (en) * 2014-04-21 2014-07-02 天彩电子(深圳)有限公司 Internet protocol camera and control method thereof
CN104077785A (en) * 2009-05-14 2014-10-01 索尼公司 Moving object detecting device, moving object detecting method, and computer program
CN105136121A (en) * 2015-09-15 2015-12-09 歌尔声学股份有限公司 Image detection method and system for determining tool state
CN105245817A (en) * 2014-06-19 2016-01-13 深圳中兴力维技术有限公司 Video playback method and video playback device
CN105575037A (en) * 2014-10-15 2016-05-11 阿里巴巴集团控股有限公司 Monitoring method of environment in vehicle and system thereof
CN105681626A (en) * 2016-02-25 2016-06-15 广东欧珀移动通信有限公司 Detection method, control method, detection device, control device and electronic device
CN105844829A (en) * 2016-06-06 2016-08-10 广西南宁德通网络有限公司 Image detection anti-theft alarm
CN106060340A (en) * 2016-07-06 2016-10-26 福建鼎心网络科技有限公司 Motion detection method and system
CN106331644A (en) * 2016-09-07 2017-01-11 中车唐山机车车辆有限公司 Video monitoring method, device and train monitoring system
CN109030499A (en) * 2018-07-27 2018-12-18 江苏理工学院 A kind of device and method preventing defect counts repeat count suitable for target defect continuous on-line detection

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077785A (en) * 2009-05-14 2014-10-01 索尼公司 Moving object detecting device, moving object detecting method, and computer program
CN102148959A (en) * 2010-02-09 2011-08-10 北京中星微电子有限公司 Video monitoring system and method for detecting moving target of image thereof
CN102148959B (en) * 2010-02-09 2016-01-20 北京中星微电子有限公司 The moving target detecting method of a kind of video monitoring system and image thereof
CN101799928A (en) * 2010-03-30 2010-08-11 深圳市融创天下科技发展有限公司 High-efficient low-complexity motion detection method applicable to image processing
CN101799928B (en) * 2010-03-30 2013-07-03 深圳市融创天下科技股份有限公司 High-efficient low-complexity motion detection method applicable to image processing
CN102340619A (en) * 2010-07-21 2012-02-01 杭州华三通信技术有限公司 Mobile detection method and device
CN103179384A (en) * 2013-03-21 2013-06-26 鸿富锦精密工业(深圳)有限公司 Video data processing system for video monitoring and video broadcasting system
CN103905706A (en) * 2014-04-21 2014-07-02 天彩电子(深圳)有限公司 Internet protocol camera and control method thereof
CN105245817B (en) * 2014-06-19 2019-08-30 深圳力维智联技术有限公司 Video recording playback method and its device
CN105245817A (en) * 2014-06-19 2016-01-13 深圳中兴力维技术有限公司 Video playback method and video playback device
CN105575037A (en) * 2014-10-15 2016-05-11 阿里巴巴集团控股有限公司 Monitoring method of environment in vehicle and system thereof
CN105575037B (en) * 2014-10-15 2018-05-01 阿里巴巴集团控股有限公司 The monitoring method and system of environment inside car
CN105136121A (en) * 2015-09-15 2015-12-09 歌尔声学股份有限公司 Image detection method and system for determining tool state
CN105681626A (en) * 2016-02-25 2016-06-15 广东欧珀移动通信有限公司 Detection method, control method, detection device, control device and electronic device
CN105681626B (en) * 2016-02-25 2019-02-05 Oppo广东移动通信有限公司 Detection method, control method, detection device, control device and electronic device
CN105844829A (en) * 2016-06-06 2016-08-10 广西南宁德通网络有限公司 Image detection anti-theft alarm
CN105844829B (en) * 2016-06-06 2019-01-18 广东衡启科技有限公司 Image Detective theft-proof alarm
CN106060340A (en) * 2016-07-06 2016-10-26 福建鼎心网络科技有限公司 Motion detection method and system
CN106060340B (en) * 2016-07-06 2018-12-04 百味迹忆(厦门)网络科技有限公司 Mobile detection method and system
CN106331644A (en) * 2016-09-07 2017-01-11 中车唐山机车车辆有限公司 Video monitoring method, device and train monitoring system
CN109030499A (en) * 2018-07-27 2018-12-18 江苏理工学院 A kind of device and method preventing defect counts repeat count suitable for target defect continuous on-line detection

Similar Documents

Publication Publication Date Title
CN101237562A (en) A motion detection method for monitoring terminal based on frame comparison
CN100531427C (en) Motion detection method and system applied at the mobile monitoring terminal
CN101360184B (en) System and method for extracting key frame of video
JP6090390B2 (en) Video data processing method and system
US8180170B2 (en) Apparatus and method of recognizing image feature pixel point
US20050263678A1 (en) Image processing apparatus
US20110064129A1 (en) Video capture and generation at variable frame rates
US20130142425A1 (en) System and method of detecting abnormal segments of video
US7248743B2 (en) Image processing apparatus, mobile terminal device and image processing computer readable program
CA2420013A1 (en) Image processing apparatus and method and image pickup apparatus
CN101179725A (en) Motion detecting method and apparatus
US20230086804A1 (en) Selectively identifying data based on motion data from a digital video to provide as input to an image processing model
CN105574896A (en) High-efficiency background modeling method for high-resolution video
TWI521473B (en) Device, method for image analysis and computer-readable medium
CN112085768A (en) Optical flow information prediction method, optical flow information prediction device, electronic device, and storage medium
CN101102504B (en) A mixing motion detection method combining with video encoder
CN113037997A (en) Image processing method and device and electronic equipment
JP7255841B2 (en) Information processing device, information processing system, control method, and program
CN101425129B (en) Target abnormal detecting method and device based on JPEG image
CN101277436B (en) Control system and control method for multi-crossfire type network camera
Fu et al. A method of shot-boundary detection based on HSV space
CN113038179A (en) Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment
CN105635718A (en) Image capture device
CN108009516A (en) Video matching method, device and terminal
CN1436426A (en) Adaptive early exit techniques for image correlation minimum distortion calculation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20080806