CN108765451A - A kind of movement of traffic object detection method of adaptive RTS threshold adjustment - Google Patents
A kind of movement of traffic object detection method of adaptive RTS threshold adjustment Download PDFInfo
- Publication number
- CN108765451A CN108765451A CN201810428604.4A CN201810428604A CN108765451A CN 108765451 A CN108765451 A CN 108765451A CN 201810428604 A CN201810428604 A CN 201810428604A CN 108765451 A CN108765451 A CN 108765451A
- Authority
- CN
- China
- Prior art keywords
- image
- background image
- movement
- formula
- background
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Traffic Control Systems (AREA)
Abstract
The present invention discloses a kind of movement of traffic object detection method of adaptive RTS threshold adjustment, solves the problems, such as that movement of traffic target detection is easy to be influenced by outer scene variation.The present invention uses median method to extract background image that is reliable, stablizing from sequence of video images first, then current frame image and the background image of extraction are made into difference, set determining threshold value, obtain error image, certain post processing of image is finally carried out to error image, including the morphologic processing such as burn into expansion and opening and closing, you can obtain required movement of traffic target.The present invention can effectively improve the accuracy of movement of traffic target detection, have good real-time and robustness.
Description
Technical field
The present invention relates to a kind of movement of traffic object detection methods of adaptive RTS threshold adjustment, belong to Activity recognition, target
The interleaving techniques fields such as detection.
Background technology
The detection of moving target is a step crucial in computer vision technique and target identification and processing in image sequence,
In recent years, being used to detect the moving target in video image there has been proposed many methods, general way is prominent movement
Target object eliminates background image, mainly there is optical flow method, frame differential method and background subtraction etc., and different methods is each
There are advantage and disadvantage, is suitable for different situations.
For background subtraction compared with other object detection methods, biggest advantage is opposite in the background image due to extraction
Stablize, influence of the moving target to background image itself can be reduced, more accurately extracts the region of moving target, but background
The obtained background image of calculus of finite differences can change with the change of time, caused by the external environment conditions such as illumination and weather
Scene changes are also more sensitive, thus will appear pseudo-motion target point, can thus influence the effect of target detection.Background difference
Method is easily achieved, can be more accurate in the case where background is stablized detect moving target object, disadvantage be exactly be easy by
The influence of the external conditions such as ambient light variation, this just needs constantly to update background image, to adapt to background image
Continuous variation.
Invention content
Technical problem:The context update detected the technical problem to be solved by the present invention is to operational objective in traffic video is asked
Topic, effectively to improve to movement of traffic target detection accuracy.
Technical solution:A kind of movement of traffic object detection method of adaptive RTS threshold adjustment of the present invention includes following step
Suddenly:
Step 1) inputs traffic video, by the kth frame image F of movement of traffic target to be detected in the videokAs current
Frame;
Step 2) obtains initial background image B using median methodk, to each pixel (x, y), the acquisition of background uses
Following formula:
The B (x, y) is the gray value of pixel in initial background image, Fi(x, y) is the i-th frame image in image sequence
The gray value of pixel, N are that certain time period samples to obtain the frame number of image;
Step 3) is updated background image:First with the relevance between current frame image and background image,
Current frame image is divided into m*m blocks respectively with former background image, and then newer object is current frame image and former background image
In each fritter, the update between each block is independent, does not influence, is updated to each block diagram picture between each other, finally right
Each updated block diagram picture is overlapped, that is, obtains new background image, more new formula is as follows:
BI, k(x, y)=(1-a) BI, k_1(x, y)+afI, k(x, y) (1≤i≤m2)
The i indicates the i-th fritter in image, 1≤i≤m2, k and k-1 indicate present image frame number and previous image
Frame number, fI, k(x, y) indicates i-th piece of current frame image, BI, k-1(x, y) indicates i-th of the former background image before context update
Block, BI, k(x, y indicate i-th piece of new background image, Bk(x, y) indicates that the new background image after context update, a indicate update system
Number, value range are 0~1;
Step 4) carries out background difference and binary conversion treatment, and processing formula is as follows:
Dk(x, y)=| Fk(x, y)-Bk(x, y) |
The T is the color difference threshold of setting, formula Dk(x, y)=| Fk(x, y)-Bk(x, y) | it calculates by pretreatment
Current frame image FkWith background image BkDifference, by formulaTo differential chart
As DkCarry out binary conversion treatment;
Step 5) is to binary image RkThe corrosion in mathematical morphology and dilation operation are carried out, movement of traffic mesh is obtained
Mark, formula are as follows:
A is corroded with B:
A is expanded with B:
Wherein, Φ indicates empty set.
It is preferred that the specific method is as follows for the step 3):
Step 3.1) will be divided into 4 × 4 block per frame image;
Step 3.2) is formula B to each pieceI, k(x, y)=(1-a) BI, k-1(x, y)+afI, k(x, y) (1≤i≤m2)
Update is calculated, a takes 0.5;
Step 3.3) repeats step (2), and every piece until background image is all updated;
Step 3.4) utilizes formulaNew background is obtained to all block image additions.
It is preferred that color difference threshold T takes 95 in step 4).
Advantageous effect:The present invention has the following technical effects using above technical scheme is compared with the prior art:
The present invention is based on background subtractions to be constantly updated background image, be made background using adaptive context update algorithm
Influence of the outer scene variation to movement of traffic target detection effect can be reduced constantly close to perfect condition.
Description of the drawings
Fig. 1 is the target vehicle detection method flow diagram of adaptive RTS threshold adjustment.
Specific implementation mode
The some embodiments of attached drawing of the present invention are described in more detail below:
With reference to the accompanying drawings 1, the specific embodiment of the invention is:Input has the traffic video of operational objective, will be waited in the video
Detect the kth frame image F of movement of traffic targetkAs present frame;Input video obtains current frame image Fk;It is obtained using median method
Take initial background image Bk, to each pixel (x, y), useObtain background.Having
During body is implemented, B (x, y) is the gray value of pixel in initial background image, Fi(x, y) is the i-th frame image slices in image sequence
The gray value of vegetarian refreshments, N are that certain time period samples to obtain the frame number of image.
The present invention proposes a kind of improved background update method, is carried out more to background image using the thought of piecemeal
Newly.Specific implementation process is:When being updated to preceding background image, make full use of between current frame image and background image
Current frame image and former background image are divided into bulk by relevance, and then newer object is current frame image and former background
Each fritter in image, and the update between each block is independent, is not influenced between each other, is carried out to each block diagram picture
Corresponding update, is finally overlapped each updated block diagram picture, you can obtain new background image, reach to Background
As updating in real time and accurately, more new formula is:BI, k(x, y)=(1-a) BI, k-1(x, y)+afI, k(x, y) (1≤i≤m2),The i indicates that the i-th fritter in image, k and k-1 indicate present image frame number and previous figure
The frame number of picture, fI, k(x, y) indicates i-th piece of current frame image, BI, k-1(x, y) indicates the former background image before context update
I-th piece, BI, k(x, y) indicates i-th piece of new background image, Bk(x, y) indicates that the new background image after context update, a indicate more
New coefficient, value range are 0~1.
The specific implementation step for updating background image is as follows:
(1) block of m × m will be divided into per frame image.The number of piecemeal determines that piecemeal is more, as a result will by testing
It is more accurate, but calculation amount also can be bigger, and it is appropriate to be generally divided into 4 × 4;
(2) each piece of calculating for doing formula (2) is updated;
(3) step (2) is repeated, every piece until background image is all updated;
(4) formula (3) is utilized, new background is obtained to all block image additions;
Above-mentioned steps are completed, background difference is being carried out below and binary conversion treatment, formula is as follows:
Dk(x, y)=| Fk(x, y)-Bk(x, y) |
In specific implementation, above-mentioned T is the threshold value of setting, and T takes 95, and formula (4) first is calculated by pretreated
Current frame image FkWith background image BkDifference, then by formula (5) to error image DkCarry out binary conversion treatment;
In specific implementation, below to binary image RkThe corrosion in mathematical morphology and dilation operation are carried out, when A is used
B corrodes:When A is expanded with B:Both traffic can be obtained
Moving target.
Claims (3)
1. a kind of movement of traffic object detection method of adaptive RTS threshold adjustment, which is characterized in that include the following steps:
Step 1) inputs traffic video, by the kth frame image F of movement of traffic target to be detected in the videokAs present frame;
Step 2) obtains initial background image B using median methodk, to each pixel (x, y), the acquisition of background uses following formula:
The B (x, y) is the gray value of pixel in initial background image, Fi(x, y) is the i-th frame image pixel in image sequence
The gray value of point, N is that certain time period samples to obtain the frame number of image;
Step 3) is updated background image:First with the relevance between current frame image and background image, current
Frame image is divided into m*m blocks respectively with former background image, and then newer object is in current frame image and former background image
Each fritter, the update between each block is independent, does not influence, is updated to each block diagram picture, finally to each between each other
Updated block diagram picture is overlapped, that is, obtains new background image, and more new formula is as follows:
BI, k(x, y)=(1-a) BI, k-1(x, y)+afI, k(x, y) (1≤i≤m2)
The i indicates the i-th fritter in image, 1≤i≤m2, the frame number of k and k-1 expression present image frame number and previous image,
fI, k(x, y) indicates i-th piece of current frame image, BI, k-1(x, y) indicates i-th piece of the former background image before context update, BI, k
(x, y) indicates i-th piece of new background image, Bk(x, y) indicates that the new background image after context update, a indicate update coefficient,
Value range is 0~1;
Step 4) carries out background difference and binary conversion treatment, and processing formula is as follows:
Dk(x, y)=| Fk(x, y)-Bk(x, y) |
The T is the color difference threshold of setting, formula Dk(x, y)=| Fk(x, y)-Bk(x, y) | it calculates and works as by pretreated
Prior image frame FkWith background image BkDifference, by formulaTo error image Dk
Carry out binary conversion treatment;
Step 5) is to binary image RkThe corrosion in mathematical morphology and dilation operation are carried out, movement of traffic target, formula are obtained
It is as follows:
A is corroded with B:
A is expanded with B:
Wherein, Φ indicates empty set.
2. a kind of movement of traffic object detection method of adaptive RTS threshold adjustment according to claim 1, which is characterized in that
The specific method is as follows for the step 3):
Step 3.1) will be divided into 4 × 4 block per frame image;
Step 3.2) is formula B to each pieceI, k(x, y)=(1-a) BI, k-1(x, y)+afI, k(x, y) (1≤i≤m2) calculating
Update, a take 0.5;
Step 3.3) repeats step (2), and every piece until background image is all updated;
Step 3.4) utilizes formulaNew background is obtained to all block image additions.
3. a kind of movement of traffic object detection method of adaptive RTS threshold adjustment according to claim 1, which is characterized in that
Color difference threshold T takes 95 in step 4).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810428604.4A CN108765451A (en) | 2018-05-07 | 2018-05-07 | A kind of movement of traffic object detection method of adaptive RTS threshold adjustment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810428604.4A CN108765451A (en) | 2018-05-07 | 2018-05-07 | A kind of movement of traffic object detection method of adaptive RTS threshold adjustment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108765451A true CN108765451A (en) | 2018-11-06 |
Family
ID=64010241
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810428604.4A Pending CN108765451A (en) | 2018-05-07 | 2018-05-07 | A kind of movement of traffic object detection method of adaptive RTS threshold adjustment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108765451A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111260684A (en) * | 2020-03-02 | 2020-06-09 | 成都信息工程大学 | Foreground pixel extraction method and system based on combination of frame difference method and background difference method |
CN112651993A (en) * | 2020-11-18 | 2021-04-13 | 合肥市卓迩无人机科技服务有限责任公司 | Moving target analysis and recognition algorithm for multi-path 4K quasi-real-time spliced video |
CN115330834A (en) * | 2022-07-13 | 2022-11-11 | 广东交通职业技术学院 | Moving target detection method, system, device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5606376A (en) * | 1994-06-08 | 1997-02-25 | Matsushita Electric Industrial Co., Ltd. | Differential motion detection method using background image |
CN103700116A (en) * | 2012-09-27 | 2014-04-02 | 中国航天科工集团第二研究院二O七所 | Background modeling method for movement target detection |
CN107909599A (en) * | 2017-10-24 | 2018-04-13 | 天津大学 | A kind of object detecting and tracking system |
-
2018
- 2018-05-07 CN CN201810428604.4A patent/CN108765451A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5606376A (en) * | 1994-06-08 | 1997-02-25 | Matsushita Electric Industrial Co., Ltd. | Differential motion detection method using background image |
CN103700116A (en) * | 2012-09-27 | 2014-04-02 | 中国航天科工集团第二研究院二O七所 | Background modeling method for movement target detection |
CN107909599A (en) * | 2017-10-24 | 2018-04-13 | 天津大学 | A kind of object detecting and tracking system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111260684A (en) * | 2020-03-02 | 2020-06-09 | 成都信息工程大学 | Foreground pixel extraction method and system based on combination of frame difference method and background difference method |
CN112651993A (en) * | 2020-11-18 | 2021-04-13 | 合肥市卓迩无人机科技服务有限责任公司 | Moving target analysis and recognition algorithm for multi-path 4K quasi-real-time spliced video |
CN115330834A (en) * | 2022-07-13 | 2022-11-11 | 广东交通职业技术学院 | Moving target detection method, system, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106327520B (en) | Moving target detection method and system | |
CN108109162B (en) | Multi-scale target tracking method using self-adaptive feature fusion | |
CN109974743B (en) | Visual odometer based on GMS feature matching and sliding window pose graph optimization | |
CN105374049B (en) | Multi-corner point tracking method and device based on sparse optical flow method | |
CN108765451A (en) | A kind of movement of traffic object detection method of adaptive RTS threshold adjustment | |
CN110866943B (en) | Fish position tracking method for water quality monitoring | |
US20100277586A1 (en) | Method and apparatus for updating background | |
CN107622507B (en) | Air target tracking method based on deep learning | |
CN113608663B (en) | Fingertip tracking method based on deep learning and K-curvature method | |
CN110555868A (en) | method for detecting small moving target under complex ground background | |
CN111178261A (en) | Face detection acceleration method based on video coding technology | |
CN105279771A (en) | Method for detecting moving object on basis of online dynamic background modeling in video | |
CN104408741A (en) | Video global motion estimation method with sequential consistency constraint | |
CN111192294A (en) | Target tracking method and system based on target detection | |
KR20170038144A (en) | Attention detection apparatus and attention detection method | |
CN116524062B (en) | Diffusion model-based 2D human body posture estimation method | |
CN107992790A (en) | Target long time-tracking method and system, storage medium and electric terminal | |
CN110766711A (en) | Video shot segmentation method, system, device and storage medium | |
CN103473792A (en) | Method for detecting moving target | |
CN111191535A (en) | Pedestrian detection model construction method based on deep learning and pedestrian detection method | |
CN113705380B (en) | Target detection method and device for foggy days, electronic equipment and storage medium | |
US20240185590A1 (en) | Method for training object detection model, object detection method and apparatus | |
CN108010050B (en) | Foreground detection method based on adaptive background updating and selective background updating | |
CN103093481B (en) | A kind of based on moving target detecting method under the static background of watershed segmentation | |
CN102930541B (en) | Background extracting and updating method of video images |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181106 |
|
RJ01 | Rejection of invention patent application after publication |