CN110503659B - Moving object extraction method for video sequence - Google Patents

Moving object extraction method for video sequence Download PDF

Info

Publication number
CN110503659B
CN110503659B CN201910615786.0A CN201910615786A CN110503659B CN 110503659 B CN110503659 B CN 110503659B CN 201910615786 A CN201910615786 A CN 201910615786A CN 110503659 B CN110503659 B CN 110503659B
Authority
CN
China
Prior art keywords
pixel
video sequence
image
initmat
dist
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.)
Active
Application number
CN201910615786.0A
Other languages
Chinese (zh)
Other versions
CN110503659A (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.)
Zhejiang Haoteng Electron Technology Co ltd
Original Assignee
Zhejiang Haoteng Electron Technology Co 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 Zhejiang Haoteng Electron Technology Co ltd filed Critical Zhejiang Haoteng Electron Technology Co ltd
Priority to CN201910615786.0A priority Critical patent/CN110503659B/en
Publication of CN110503659A publication Critical patent/CN110503659A/en
Application granted granted Critical
Publication of CN110503659B publication Critical patent/CN110503659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a video sequence-oriented moving object extraction method, which comprises the following steps: step 1: extracting a first frame of a video sequence as an initialized image initMat, wherein the width of the image is width, and the height of the image is height; step 2: extracting the background RGB color of initMat, and step 3: the method has the beneficial effects that AVGR, AVGG and AVGB are fused into a ViBe algorithm: the invention can automatically extract single background pixels as a judgment basis on the premise of single background, well inhibit the ghost problem of the ViBe algorithm and effectively realize the extraction of the moving target facing the video sequence.

Description

Moving object extraction method for video sequence
Technical Field
The method is applied to the video sequence with a single background, and the automatic detection is carried out in the video sequence, so that the moving object and the static or slowly moving scene part are distinguished.
Background
With the development of the world, the number of cameras available worldwide has increased dramatically. This growth has resulted in a large increase in data, which means that video data cannot be stored or manually processed.
Since 2011 a paper of the ViBe algorithm, the ViBe algorithm is published, the ViBe algorithm is applied to moving target detection of a visual screen sequence, but a ghost problem (a detected moving object does not correspond to any real moving object) existing in the technology can cause wrong judgment of a downstream technology.
Disclosure of Invention
In order to overcome the ghost problem of the ViBe algorithm, the invention provides a single background initialization method, can be matched with a ghost elimination method of a ViBe updating strategy, and can effectively realize the extraction of a moving target facing a video sequence.
The technical scheme of the invention is as follows:
a method for extracting a moving object oriented to a video sequence is characterized by comprising the following steps:
step 1: extracting a first frame of a video sequence as an initialized image initMat, wherein the width of the image is width, and the height of the image is height;
step 2: extracting the background RGB color of initMat, which comprises the following steps:
step 2.1: segmentation of an image initMat into n block segs using a region growing methodi(i ═ 1,2,3, …, n), each partition having miPoints of each pixelij(j=1,2,3,…,mi) The RGB value of each pixel point is Rij、Gij、Bij
Step 2.2: find all miThe subscript is recorded as k;
step 2.3: calculating the average RGB value of each block and recording as ARi、AGi、ABiThe calculation formula is as follows:
Figure BDA0002123899630000011
Figure BDA0002123899630000012
Figure BDA0002123899630000013
step 2.4: calculate all segs according to equation (4)iAnd segkColor distance dist ofi(ii) a If distiLess than a certain threshold d0The index i is stored in a linkList set, as shown in equation (5):
Figure BDA0002123899630000014
linkList={i|disti<d0} (5)
step 2.5: all segs with the elements in the linkList as subscripts are calculated according to equations (6) - (9)iThe pixel sum M and the RGB average values AVGR, AVGG, AVGB:
Figure BDA0002123899630000021
Figure BDA0002123899630000022
Figure BDA0002123899630000023
Figure BDA0002123899630000024
and step 3: the method is characterized in that AVGR, AVGG and AVGB are fused into a ViBe algorithm, and the method comprises the following specific steps:
step 3.1: after initializing initMat by using a ViBe algorithm, detecting each frame of a video sequence except a first frame by using the ViBe algorithm, and when a current pixel is judged as a moving target by the ViBe algorithm, calculating distances DIST between an RGB value of the pixel and AVGR, AVGG and AVGB according to an expression (10):
Figure BDA0002123899630000025
wherein r, g and b are respectively RGB values of the current pixel;
step 3.2: if DIST<d0Storing the RGB value of the current pixel into the corresponding position of the pixel in the sample space of the ViBe algorithm according to the probability of 1/phi, wherein phi is a preset probability coefficient, d0A certain threshold set for the event.
The invention has the beneficial effects that: the invention can automatically extract single background pixels as a judgment basis on the premise of single background, well inhibit the ghost problem of the ViBe algorithm and effectively realize the extraction of the moving target facing the video sequence.
Detailed Description
The following examples are given to illustrate specific embodiments of the present invention.
A video sequence-oriented moving object extraction method specifically comprises the following steps:
step 1: extracting a first frame of a video sequence as an initialized image initMat, wherein the width of the image is width, and the height of the image is height;
step 2: extracting the background RGB color of initMat, which comprises the following steps:
step 2.1: segmentation of an image initMat into n block segs using a region growing methodi(i ═ 1,2,3, …, n), each partition having miPoints of each pixelj i(j=1,2,3,…,mi) The RGB value of each pixel point is respectively
Figure BDA0002123899630000026
Step 2.2: find all miRecord index as max _ i;
step 2.3: calculating the average RGB value of each block and recording as ARi、AGi、ABiThe calculation formula is as follows:
Figure BDA0002123899630000027
Figure BDA0002123899630000028
Figure BDA0002123899630000029
step 2.4: calculate all segs according to equation (4)iAnd segmax_iIs recorded as disti(ii) a If distiLess than a certain threshold d0The index i is stored in a linkList set, as shown in equation (5):
Figure BDA0002123899630000031
linkList={i|disti<d0} (5)
wherein d in this embodiment0=20;
Step 2.5: all segs with the elements in the linkList as subscripts are calculated according to equations (6) - (9)iThe pixel sum M and the RGB average values AVGR, AVGG, AVGB:
Figure BDA0002123899630000032
Figure BDA0002123899630000033
Figure BDA0002123899630000034
Figure BDA0002123899630000035
and step 3: the method is characterized in that AVGR, AVGG and AVGB are fused into a ViBe algorithm, and the method comprises the following specific steps:
step 3.1: after initializing initMat by using a ViBe algorithm, detecting each frame of a video sequence except a first frame by using the ViBe algorithm, and when a current pixel is judged as a moving target by the ViBe algorithm, calculating distances DIST between an RGB value of the pixel and AVGR, AVGG and AVGB according to an expression (10):
Figure BDA0002123899630000036
wherein r, g and b are respectively RGB values of the current pixel;
step 3.2: if DIST<d0Then the RGB value of the current pixel is stored into the sample space in the ViBe algorithm with the probability of 1/phiThe position corresponding to the pixel, where φ is a predetermined probability coefficient, d0A certain threshold set for the event; in this embodiment, phi is 16, d0=20。
The embodiments described in this specification are merely illustrative of implementations of the inventive concept and the scope of the present invention should not be considered limited to the specific forms set forth in the embodiments but rather by the equivalents thereof as may occur to those skilled in the art upon consideration of the present inventive concept.

Claims (1)

1. A method for extracting a moving object oriented to a video sequence is characterized by comprising the following steps:
step 1: extracting a first frame of a video sequence as an initialized image initMat, wherein the width of the image is width, and the height of the image is height;
step 2: extracting the background RGB color of initMat, which comprises the following steps:
step 2.1: segmentation of an image initMat into n block segs using a region growing methodi(i ═ 1,2,3, …, n), each partition having miPoints of each pixelij(j=1,2,3,…,mi) The RGB value of each pixel point is Rij、Gij、Bij
Step 2.2: find all miThe subscript is recorded as k;
step 2.3: calculating the average RGB value of each block and recording as ARi、AGi、ABiThe calculation formula is as follows:
Figure FDA0002123899620000011
Figure FDA0002123899620000012
Figure FDA0002123899620000013
step 2.4: calculate all segs according to equation (4)iAnd segkColor distance dist ofi(ii) a If distiLess than a certain threshold d0The index i is stored in a linkList set, as shown in equation (5):
Figure FDA0002123899620000014
linkList={i|disti<d0} (5)
step 2.5: all segs with the elements in the linkList as subscripts are calculated according to equations (6) - (9)iThe pixel sum M and the RGB average values AVGR, AVGG, AVGB:
Figure FDA0002123899620000015
Figure FDA0002123899620000016
Figure FDA0002123899620000017
Figure FDA0002123899620000018
and step 3: the method is characterized in that AVGR, AVGG and AVGB are fused into a ViBe algorithm, and the method comprises the following specific steps:
step 3.1: after initializing initMat by using a ViBe algorithm, detecting each frame of a video sequence except a first frame by using the ViBe algorithm, and when a current pixel is judged as a moving target by the ViBe algorithm, calculating distances DIST between an RGB value of the pixel and AVGR, AVGG and AVGB according to an expression (10):
Figure FDA0002123899620000021
wherein r, g and b are respectively RGB values of the current pixel;
step 3.2: if DIST<d0Storing the RGB value of the current pixel into the corresponding position of the pixel in the sample space of the ViBe algorithm according to the probability of 1/phi, wherein phi is a preset probability coefficient, d0A certain threshold set for the event.
CN201910615786.0A 2019-07-09 2019-07-09 Moving object extraction method for video sequence Active CN110503659B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910615786.0A CN110503659B (en) 2019-07-09 2019-07-09 Moving object extraction method for video sequence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910615786.0A CN110503659B (en) 2019-07-09 2019-07-09 Moving object extraction method for video sequence

Publications (2)

Publication Number Publication Date
CN110503659A CN110503659A (en) 2019-11-26
CN110503659B true CN110503659B (en) 2021-09-28

Family

ID=68585571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910615786.0A Active CN110503659B (en) 2019-07-09 2019-07-09 Moving object extraction method for video sequence

Country Status (1)

Country Link
CN (1) CN110503659B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111915687B (en) * 2020-07-13 2024-07-05 浙江工业大学 Background extraction method with depth information and color information

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104134222A (en) * 2014-07-09 2014-11-05 郑州大学 Traffic flow monitoring image detecting and tracking system and method based on multi-feature fusion
CN104899839A (en) * 2015-06-05 2015-09-09 河海大学 Ghost quick-inhibition method based on ViBe algorithm
CN106097393A (en) * 2016-06-17 2016-11-09 浙江工业大学 A kind of based on multiple dimensioned and adaptive updates method for tracking target
CN106407909A (en) * 2016-08-31 2017-02-15 北京云图微动科技有限公司 Face recognition method, device and system
CN106504268A (en) * 2016-10-20 2017-03-15 电子科技大学 A kind of improvement Mean Shift trackings based on information fusion
CN109271904A (en) * 2018-09-03 2019-01-25 东南大学 A kind of black smoke vehicle detection method based on pixel adaptivenon-uniform sampling and Bayesian model
CN109785356A (en) * 2018-12-18 2019-05-21 北京中科晶上超媒体信息技术有限公司 A kind of background modeling method of video image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10269123B2 (en) * 2017-01-09 2019-04-23 Qualcomm Incorporated Methods and apparatus for video background subtraction

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104134222A (en) * 2014-07-09 2014-11-05 郑州大学 Traffic flow monitoring image detecting and tracking system and method based on multi-feature fusion
CN104899839A (en) * 2015-06-05 2015-09-09 河海大学 Ghost quick-inhibition method based on ViBe algorithm
CN106097393A (en) * 2016-06-17 2016-11-09 浙江工业大学 A kind of based on multiple dimensioned and adaptive updates method for tracking target
CN106407909A (en) * 2016-08-31 2017-02-15 北京云图微动科技有限公司 Face recognition method, device and system
CN106504268A (en) * 2016-10-20 2017-03-15 电子科技大学 A kind of improvement Mean Shift trackings based on information fusion
CN109271904A (en) * 2018-09-03 2019-01-25 东南大学 A kind of black smoke vehicle detection method based on pixel adaptivenon-uniform sampling and Bayesian model
CN109785356A (en) * 2018-12-18 2019-05-21 北京中科晶上超媒体信息技术有限公司 A kind of background modeling method of video image

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
automatic brain tumor detection and segmentation from muti-modal MRI images based on region growing and level set evolution;I Zabir;《WIECON-ECE》;20160331;论文全文 *
基于 Vibe 背景建模的运动目标检测算法;丁哲;《计算机***应用》;20190327;论文全文 *
融合ViBe与帧差法的交叉路口多车辆检测方法;高飞;《测试与故障诊断》;20171231;论文全文 *

Also Published As

Publication number Publication date
CN110503659A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN110428433B (en) Canny edge detection algorithm based on local threshold
CN109785291B (en) Lane line self-adaptive detection method
CN113298810B (en) Road line detection method combining image enhancement and depth convolution neural network
US8879841B2 (en) Anisotropic denoising method
CN109376641B (en) Moving vehicle detection method based on unmanned aerial vehicle aerial video
CN106327488B (en) Self-adaptive foreground detection method and detection device thereof
EP2396748A1 (en) Video matting based on foreground-background constraint propagation
CN112991193B (en) Depth image restoration method, device and computer-readable storage medium
US9948913B2 (en) Image processing method and apparatus for processing an image pair
Fang et al. Single image dehazing and denoising with variational method
CN110310305B (en) Target tracking method and device based on BSSD detection and Kalman filtering
Zhu et al. Automatic object detection and segmentation from underwater images via saliency-based region merging
CN110503659B (en) Moving object extraction method for video sequence
KR102362345B1 (en) Method and apparatus for processing image
KR102315471B1 (en) Image processing method and device
Liu et al. Texture filtering based physically plausible image dehazing
WO2013029231A1 (en) Anisotropic gradient regularization for image denoising, compression, and interpolation
KR101195978B1 (en) Method and apparatus of processing object included in video
CN114004850A (en) Sky segmentation method, image defogging method, electronic device and storage medium
CN102292724B (en) Matching weighting information extracting device
Lai et al. Single image dehazing with optimal transmission map
CN110069664B (en) Method and system for extracting cover picture of cartoon work
CN107704864B (en) Salient object detection method based on image object semantic detection
CN115511804A (en) Offshore infrared dim target detection method based on pipeline adaptive filtering
CN112949389A (en) Haze image target detection method based on improved target detection network

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
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Motion Object Extraction Method for Video Sequences

Effective date of registration: 20231127

Granted publication date: 20210928

Pledgee: Zhejiang Lishui Liandu Rural Commercial Bank Co.,Ltd.

Pledgor: ZHEJIANG HAOTENG ELECTRON TECHNOLOGY CO.,LTD.

Registration number: Y2023980067610

PE01 Entry into force of the registration of the contract for pledge of patent right