CN102968797B - A kind of display foreground and the method and apparatus of background segment - Google Patents

A kind of display foreground and the method and apparatus of background segment Download PDF

Info

Publication number
CN102968797B
CN102968797B CN201210515922.7A CN201210515922A CN102968797B CN 102968797 B CN102968797 B CN 102968797B CN 201210515922 A CN201210515922 A CN 201210515922A CN 102968797 B CN102968797 B CN 102968797B
Authority
CN
China
Prior art keywords
block
image
kinestate
target frame
frame image
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
CN201210515922.7A
Other languages
Chinese (zh)
Other versions
CN102968797A (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.)
Guangzhou Ncast Electronic Science & Technology Co Ltd
Original Assignee
Guangzhou Ncast Electronic Science & 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 Guangzhou Ncast Electronic Science & Technology Co Ltd filed Critical Guangzhou Ncast Electronic Science & Technology Co Ltd
Priority to CN201210515922.7A priority Critical patent/CN102968797B/en
Publication of CN102968797A publication Critical patent/CN102968797A/en
Application granted granted Critical
Publication of CN102968797B publication Critical patent/CN102968797B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The method and apparatus that the invention provides a kind of display foreground and background segment, the method comprise the steps that and target frame image is divided into some blocks;Determining the kinestate of described each block, described kinestate includes static and dynamic;It is static block for described kinestate, adds up its time being in static state;When the time that certain block is in static state is more than the first predetermined threshold value, carry out the refreshing of background image for this block;From described target frame image, foreground image is extracted according to the background image refreshed.The present invention can simplify the processing procedure of display foreground and background segment, meets the real-time processing requirement of embedded device, improves the accuracy of image segmentation, and saves resource, improves treatment effeciency.

Description

A kind of display foreground and the method and apparatus of background segment
Technical field
The present invention relates to the technical field of image segmentation, particularly relate to a kind of display foreground and background The method of segmentation, and, a kind of display foreground and the device of background segment.
Background technology
Along with the development of computer science and technology, image procossing and analysis have gradually formed oneself Scientific system, new processing method emerges in an endless stream, although its developing history is the longest, but causes The extensive concern of each side personage.In the research application process of image, people are often in image Some part interested, these parts are referred to as target or foreground image, and they generally correspond to image In region the most with unique properties and analyze target, need these region disconnectings or extraction Out, it is possible to utilization further to target on this basis.Image segmentation is exactly according to one Piece image or scenery are divided into several specific, with unique properties by fixed principle and rule Region part or subset, and extract technology and the process of interesting target prospect.Image segmentation is Image procossing, to the committed step of graphical analysis, is also the basis of further image understanding.
In prior art, commonly used gauss hybrid models carry out foreground image and background image point Cut.Specifically, gauss hybrid models uses 3 to 5 Gauss models to carry out each picture in phenogram picture The feature of vegetarian refreshments, updates gauss hybrid models, with in target frame image after target frame image obtains Each pixel mate with gauss hybrid models, if success; would judge that this is as background image Pixel, is otherwise the pixel of foreground image.The expression of Gauss model in Computer Image Processing Formula is usually: background image=target frame image * learning rate+background image * (1-learning rate). Described target frame image and background image are carried out difference processing, i.e. can get foreground image.Prospect Image is contained in target frame image, i.e. foreground image the most constantly can be entered background by brush Image, if movable or static a period of time will in little scope for the moving target in foreground image Produce smear.Specifically it is referred to the schematic diagram of the display foreground shown in Fig. 1 and background segment, from figure It can be seen that be again started up after automobile has stopped several seconds in 1, its monitoring image can produce such as Fig. 1 Shown smear.In the background model exist smear, do target detection can have a strong impact on foreground segmentation Result.
The problem producing smear for solving gauss hybrid models, proposes multiple solution in prior art Algorithm, although these algorithms can effectively solve the problem that gauss hybrid models foreground image as a rule The smear problem produced during segmentation, but when target frame image there being target enter monitoring range length When time is static, or, when there is the target moved once in a while in target frame image, described target Will be unable to be brushed into background in time;Or, when prospect image segmentation process is only capable of recognizing part When target or its profile, still may produce smear.Additionally, the algorithm in existing solution is big Calculate complexity, it is impossible to meet the real-time processing requirement of embedded device more.
Thus, a technical problem that those skilled in the art urgently solve is presently required is exactly: as What provides a kind of display foreground and the mechanism of background segment, to simplify display foreground and background segment Processing procedure, meets the real-time processing requirement of embedded device, improves the accuracy of image segmentation, And save resource, improve treatment effeciency.
Summary of the invention
A kind of method that the invention provides display foreground and background segment, can simplify display foreground With the processing procedure of background segment, meet the real-time processing requirement of embedded device, improve image and divide The accuracy cut, and save resource, improve treatment effeciency.
Accordingly, present invention also offers the device of a kind of display foreground and background segment, in order to protect The realization of card said method and application.
In order to solve the problems referred to above, the present invention discloses the side of a kind of display foreground and background segment in fact Method, including:
Target frame image is divided into some blocks;
Determining the kinestate of described each block, described kinestate includes static and dynamic;
It is static block for described kinestate, adds up its time being in static state;
When the time that certain block is in static state is more than the first predetermined threshold value, carry on the back for this block The refreshing of scape image;
From described target frame image, foreground image is extracted according to the background image refreshed.
Preferably, before the described step that target frame image is divided into some blocks, also include:
Described target frame image is carried out pretreatment, and described pretreatment includes that noise reduction, illuminance abrupt variation press down System.
Preferably, the described step that target frame image is divided into some blocks farther includes:
Target frame image is divided into several evenly sized districts by the mode using block averagely to split Block;
Or,
Target frame image is divided into several non-homogeneous sizes by the mode using the non-average mark of block to cut Block.
Preferably, the step of the described kinestate determining each block farther includes:
In the bounds of each block, carry out target frame image and each pixel ash in previous frame image The calculus of differences of angle value, determines the kinestate of each pixel of block, and in statistics block, kinestate is Dynamic pixel;
If kinestate is that the dynamic pixel ratio with the pixel of block is less than second in described block Predetermined threshold value, then judge that the kinestate of described block is as static state;
If kinestate is that the dynamic pixel ratio with the pixel of block is higher than second in described block Predetermined threshold value, then judge that the kinestate of described block is as dynamically.
Preferably, enumerator is set for each block;
It is static block for described kinestate, uses equation below to add up it and be in static state Time Cx:
Cx=Cx+1。
Preferably, described first predetermined threshold value is the product of preset quiet hour threshold value and frame per second, The span of described preset quiet hour threshold value is 10 seconds to 50 seconds.
Preferably, the step of the described refreshing carrying out background image for this block farther includes:
Equation below is used to carry out the refreshing of background image for described block,
y″x=(1-ρ) y "x+ρyx,
Wherein, yxFor the gray value of certain pixel, y in described target frame image "xFor described background image The grey scale pixel value of middle same position block, ρ is default learning rate, taking of described grey scale pixel value Value scope is 0 to 255, and the span of described learning rate is 0.01 to 0.2.
Preferably, described target frame image is the image extracted the most frame by frame or is in video Every the image that frame extracts.
The invention also discloses the device of a kind of display foreground and background segment, including:
Image block module, for being divided into some blocks by target frame image;
Moving state determining module, for determining the kinestate of described each block, described motion shape State includes static and dynamic;
Counter module, for being static block for described kinestate, adds up it and is in quiet The time of state;
Piecemeal refresh module, is used for when the time that certain block is in static state is more than the first predetermined threshold value, The refreshing of background image is carried out for this block;
Foreground segmentation module, for extracting from described target frame image according to the background image refreshed Go out foreground image.
Preferably, pretreatment module, for before calling described image block module, to described Target frame image carries out pretreatment, and described pretreatment includes that noise reduction, illuminance abrupt variation suppress.
Preferably, described image block module farther includes:
First piecemeal submodule, splits target frame image for the mode using block averagely to split For the block that several are evenly sized;
Or,
Second piecemeal submodule, divides target frame image for the mode using the non-average mark of block to cut It is segmented into the block of several non-homogeneous sizes.
Preferably, described moving state determining module farther includes:
Difference algorithm submodule, in the bounds of each block, carry out target frame image with The calculus of differences of each grey scale pixel value in previous frame image, determines the kinestate of each pixel of block, In statistics block, kinestate is dynamic pixel;
First kinestate submodule, for kinestate in described block be dynamic pixel with When the ratio of the pixel of block is less than the second predetermined threshold value, it is determined that the kinestate of described block is quiet State;
Second kinestate submodule, for kinestate in described block be dynamic pixel with When the ratio of the pixel of block is higher than the second predetermined threshold value, it is determined that the kinestate of described block is State.
Preferably, enumerator arranges module, for arranging enumerator for each block;
Counter module, for being static block for described kinestate, uses equation below Add up its time C being in static statex:
Cx=Cx+1。
Compared with prior art, the present invention includes advantages below:
In method described in the invention, the threshold value of its key is the first predetermined threshold value.Work as block When the present static time is more than the first predetermined threshold value, background image will be carried out for this block Refreshing, this process judges simple, it is easy to accomplish, therefore, it is possible to simplify display foreground and background segment Processing procedure.
Present invention determine that the algorithm complex that the kinestate of each block is used is low, it realizes difficulty Fairly simple, owing to this simple and effective feature makes the method be more suitably applied to embedded device, Process the image procossing product that requirement of real-time is higher.
The algorithm that the present invention uses is without the result of calculation of reference movement target, the i.e. brush of background image New process is unrelated with target recognition result, it is ensured that the foundation of background image model is not calculated by other The impact of process, it is to avoid the refreshing of the background image caused due to target recognition mistake is abnormal, energy Enough it is effectively improved the accuracy of image segmentation, saves resource, improve treatment effeciency.
Accompanying drawing explanation
Fig. 1 shows in prior art display foreground and background segment example in a kind of video monitoring Schematic diagram;
Fig. 2 shows the step stream of the method for a kind of display foreground that the present invention provides and background segment Cheng Tu;
Fig. 3 shows the structural frames of the device of a kind of display foreground that the present invention provides and background segment Figure.
Detailed description of the invention
Understandable for enabling the above-mentioned purpose of the present invention, feature and advantage to become apparent from, below in conjunction with The present invention is further detailed explanation for the drawings and specific embodiments.
One of core idea of the embodiment of the present invention is, by being divided into some by target frame image Block, then judge the kinestate of each block described, with each block described be in static state time Between be foundation, it is determined whether refresh each block in this target frame image, then according to the back of the body refreshed Scape image extracts foreground image from described target frame image, thus splits image background and prospect.
With reference to Fig. 2, it is shown that embodiment of the present invention one display foreground and background segment embodiment of the method Flow chart of steps, specifically may comprise steps of:
Step 101, is divided into some blocks by target frame image;
In one preferred embodiment of the invention, before performing described step 101, can be to institute State target frame image and carry out the pretreatment such as noise reduction, illuminance abrupt variation suppression, thus process for subsequent step Accuracy provide safeguard.The mode of described Image semantic classification can be by those skilled in the art according to real Border situation is arbitrarily selected, the invention is not limited in this regard.
In one preferred embodiment of the invention, described step 101 can also include following sub-step Rapid:
Sub-step S1a, it is equal that target frame image is divided into several by the mode using block averagely to split The block of even size;
Or,
Sub-step S1b, target frame image is divided into several by the mode using the non-average mark of block to cut The block of non-homogeneous size.
In implementing, for reducing the consuming of system resource, it is divided into for target frame image The block of several evenly sized or non-homogeneous sizes, can be by real for each block data Ground storage, and only need to record the coordinate range of each block, the boundary value calculated as subsequent algorithm ?.
Step 102, determines the kinestate of described each block, and described kinestate includes static and dynamic State;
In one preferred embodiment of the invention, described step 102 specifically can also include as follows Sub-step:
Sub-step S2a, in the bounds of each block, carries out target frame image and previous frame image In the calculus of differences of each grey scale pixel value, determine the kinestate of each pixel of block, in statistics block Kinestate is dynamic pixel;
Sub-step S2b, if kinestate is the ratio of the dynamic pixel pixel with block in described block Value less than the second predetermined threshold value, then judges that the kinestate of described block is as static state;
Sub-step S2c, if kinestate is the ratio of the dynamic pixel pixel with block in described block Value higher than the second predetermined threshold value, then judges that the kinestate of described block is as dynamically.
In brief, the processing procedure of described sub-step S2a-S2c is, in the range of each block, Utilize inter-frame difference algorithm, calculate target frame image and the difference of each grey scale pixel value in previous frame image Value, determines the kinestate of each pixel of block, and statistics block kinestate is dynamic pixel, if In described block, kinestate is dynamic pixel and the ratio of the pixel of block presets threshold less than second Value, then judge that the kinestate of described block, as static state, is otherwise dynamic.
A kind of example specifically applied as the embodiment of the present invention, it is assumed that target frame image is divided into Some blocks include: M1、M2...Mn, at M1、M2...MnTarget is done respectively in the border retrained Two field picture and the calculus of differences of previous frame image, calculate its quantity of motion difference.
With block MxAs a example by illustrate, this block comprises n pixel, if yxFor certain picture in target frame image The gray value of element, y 'xFor the grey scale pixel value of previous frame image same position, yxWith y 'xBroadly fall into Mx, The span of described grey scale pixel value can be 0 to 255.
If | yx-y′x| >=k, then the kinestate of this pixel is dynamic;
A kind of example specifically applied as the embodiment of the present invention, the value model of described grey scale pixel value k Enclosing can be 0 to 255, and its preferred span can be 20 to 50.
Statistics obtains block MxThe motion pixel comprised is c, if c/n is < p, then judges block MxFortune Dynamic state is static;
If c/n is > p, then judge block MxKinestate be dynamic;
A kind of example specifically applied as the embodiment of the present invention, the preferred span of described p is permissible It is 5 ‰ to 50 ‰.
In implementing, the step of the described kinestate determining each block, it is not restricted to Difference algorithm, any algorithm that can determine that block motion amount can, the present invention to this without in addition Limit.Owing to the application judges that the algorithm of block motion state is simple, complexity is relatively low, therefore fits Together in the equipment that embedded device or other disposal abilities are more weak, it is used for processing requirement of real-time relatively High image procossing product.
Step 103, is static block for described kinestate, add up its be in static state time Between;
In one preferred embodiment of the invention, performing before described step 103, can be for Described each block arranges enumerator, in order to add up the static persistent period of block.
With block MxAs a example by illustrate, if being determined that the kinestate of this block is static by step 102, Then enumerator adds one, is formulated, and is Cx=Cx+ 1, wherein, CxFor block MxIt is in quiet The time of state.
It should be noted that determined that kinestate is dynamic block by step 102, add up at it When the static time, counter clear, it is formulated, is Cx=0, wherein, CxFor district Block MxIt is in the time of static state.
Step 104, when the time that certain block is in static state is more than the first predetermined threshold value, for this district Block carries out the refreshing of background image;
A kind of example specifically applied as the embodiment of the present invention, described first predetermined threshold value can be Preset quiet hour threshold value and the product of frame per second, preferably taking of described preset quiet hour threshold value Value may range from 10 seconds to 50 seconds.
In implementing, the refreshing of block background image can meet a newly-increased condition, i.e. Enumerator is more than the first predetermined threshold value.
With block MxAs a example by illustrate, if Cx>=q, then judge that this block meets flush condition,
Wherein, described CxFor block MxBeing in the time of static state, described q is the first predetermined threshold value, Its value can be frame per second and the product of preset quiet hour threshold value, and described frame per second is that algorithm is per second The frame number taken.If described preset quiet hour threshold value is T, described frame per second is that 10 frames are per second, So q=T*10.Such as, the preferred span of described frame per second T can be 10s to 50s, institute Stating preset quiet hour threshold value T is that 10 frames are per second, then the span of q can be 100 to 500。
In implementing, the threshold value of its key is the first predetermined threshold value, when i.e. block static state continues Between.
For meeting the block of background image flush condition, equation below can be used for described district Block carries out the refreshing of background image,
y″x=(1-ρ) y "x+ρyx,
Wherein, yxFor the gray value of certain pixel, y in described target frame image "xFor described background image The grey scale pixel value of middle same position block, yxWith y "xBelong to block Mx, ρ is Gaussian Mixture mould The learning rate that type background refreshes.
A kind of example specifically applied as the embodiment of the present invention, described yxWith y "xSpan can Thinking 0 to 255, the preferred span of described ρ can be 0.01 to 0.2.
In implementing, after using said method blockette to refresh each block meeting condition, I.e. obtain stable background image.
If target frame image enters the visual field, when the enumerator of its residing one or more blocks exceedes During the first predetermined threshold value, gradually will brush into background according to gauss hybrid models algorithm.Said process without Need the result of calculation of reference movement target, i.e. background refresh process unrelated with target recognition result, protect Demonstrate,prove the foundation of background model not calculated processes by other and affected, it is to avoid owing to target recognition is wrong Mislead the background caused and refresh abnormal.
In practice, in the case of hypothesis background image is static, any significant moving object Body is foreground image.Modeling basic thought for extract foreground image from target frame image, Its purpose is to make background image closer to the background of current frame of video.I.e. utilize target frame image and regard Current background image in frequency sequence is weighted averagely updating background image, but due to illumination Sudden change and the impact of other external environments, the background image after general modeling is the cleanest clear Clear, and gauss hybrid models (GMM, Gaussian mixture model) be model the most successful One of method.
Gauss hybrid models is most crucial in image procossing act as setting up background image, mathematical table Reach mode more professional, also have multiple concrete algorithm, but usual in Computer Image Processing For following form:
Background image=target frame image * learning rate+background image * (1-learning rate).
Step 105, extracts foreground picture according to the background image refreshed from described target frame image Picture;
A kind of example specifically applied as the embodiment of the present invention, described in the foreground image that extracts It is moving target.
In implementing, background image is that blockette refreshes, and no longer refreshes for monoblock, then foundation The background image refreshed extracts foreground image from described target frame image, i.e. can be carried on the back by image Scape and foreground segmentation.
A kind of example specifically applied as the embodiment of the present invention, described target frame image is at video In the image that extracts frame by frame, but to be equally applicable to the present invention real for the image extracted every frame in video Execute example, be specifically referred to the target frame image motion speed of handled scene, for mean motion Speed scene the most slowly, processes every frame and can preferably obtain quantity of motion statistics.And for flat The scene that all movement velocity is the fastest, processes frame by frame it can be avoided that target frame missing image, improves knot Really precision.
It should be noted that for embodiment of the method, in order to be briefly described, therefore it is all expressed as A series of combination of actions, but those skilled in the art should know, and the present invention is by being retouched The restriction of the sequence of movement stated because according to the present invention, some step can use other orders or Person is carried out simultaneously.Secondly, those skilled in the art also should know, reality described in this description Execute example and belong to preferred embodiment, necessary to the involved action not necessarily present invention.
With reference to Fig. 3, it is shown that a kind of display foreground of embodiment of the present invention offer and the place of background segment The structured flowchart of reason device embodiment, specifically can include with lower module:
Image block module 201, for being divided into some blocks by target frame image;
In implementing, also include pretreatment module, for calling described image block module Before, described target frame image being carried out pretreatment, described pretreatment includes noise reduction, illuminance abrupt variation Suppression.After the described preprocessed resume module of target frame image, output is to image block module.
In one preferred embodiment of the invention, described image block module 201 can include as Lower submodule:
First piecemeal submodule, splits target frame image for the mode using block averagely to split For the block that several are evenly sized;
Or,
Second piecemeal submodule, divides target frame image for the mode using the non-average mark of block to cut It is segmented into the block of several non-homogeneous sizes.
Moving state determining module 202, for determining the kinestate of described each block, described motion State includes static and dynamic;
In one preferred embodiment of the invention, described moving state determining module 202 can include Following submodule:
Difference algorithm submodule, in the bounds of each block, carry out target frame image with The calculus of differences of each grey scale pixel value in previous frame image, determines the kinestate of each pixel of block, In statistics block, kinestate is dynamic pixel;
First kinestate submodule, for kinestate in described block be dynamic pixel with When the ratio of the pixel of block is less than the second predetermined threshold value, it is determined that the kinestate of described block is quiet State;
Second kinestate submodule, for kinestate in described block be dynamic pixel with When the ratio of the pixel of block is higher than the second predetermined threshold value, it is determined that the kinestate of described block is State.
Counter module 203, for being static block for described kinestate, adds up it and is in The static time;
In one preferred embodiment of the invention, also include that enumerator arranges module, for for Each block arranges enumerator.
A kind of example specifically applied as the embodiment of the present invention, described counter module 203 is for pin It is static block to kinestate, equation below can be used to add up its time C being in static statex:
Cx=Cx+1。
Piecemeal refresh module 204, for being in the time of static state more than the first predetermined threshold value at certain block Time, the refreshing of background image is carried out for this block;
A kind of example specifically applied as the embodiment of the present invention, described first predetermined threshold value is preset The product of quiet hour threshold value and frame per second, the span of described preset quiet hour threshold value can Think 10 seconds to 50 seconds.
As a kind of preferred embodiment of the embodiment of the present invention, described piecemeal refresh module 204 is permissible Equation below is used to carry out the refreshing of background image for described block,
y″x=(1-ρ) y "x+ρyx, wherein,
yxFor the gray value of certain pixel, y in described target frame image "xFor identical in described background image The grey scale pixel value of position block, ρ is the learning rate that gauss hybrid models background refreshes.
A kind of example specifically applied as the embodiment of the present invention, described yxWith y "xSpan permissible Being 0 to 255, the preferred span of described ρ can be 0.01 to 0.2, described target frame image Can be the image extracted the most frame by frame can be maybe in video every frame extract image.
Foreground segmentation module 205, for carrying from described target frame image according to the background image refreshed Take out foreground image.
For device embodiment described in Fig. 3, due to itself and embodiment of the method basic simlarity, institute Fairly simple with describe, relevant part sees the part of embodiment of the method and illustrates.
Each embodiment in this specification all uses the mode gone forward one by one to describe, each embodiment emphasis Illustrate is all the difference with other embodiments, identical similar part between each embodiment See mutually.
Those skilled in the art it should be appreciated that the embodiment of the embodiment of the present invention can be provided as method, System or computer program.Therefore, the embodiment of the present invention can use complete hardware embodiment, Completely software implementation or the form of the embodiment in terms of combining software and hardware.And, this Bright embodiment can use at one or more computers wherein including computer usable program code Usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) is upper real The form of the computer program executed.
The embodiment of the present invention be with reference to according to embodiments of the present invention method, terminal unit (system) and The flow chart of computer program and/or block diagram describe.It should be understood that can be by computer journey Sequence instructs each flow process in flowchart and/or block diagram and/or square frame and flow chart And/or the flow process in block diagram and/or the combination of square frame.These computer program instructions can be provided To general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing terminals The processor of equipment is to produce a machine so that processed by computer or other programmable datas The instruction that the processor of terminal unit performs produces for realizing at one flow process of flow chart or multiple stream The device of the function specified in journey and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide at computer or other programmable datas In the computer-readable memory that reason terminal unit works in a specific way so that be stored in this calculating Instruction in machine readable memory produces the manufacture including command device, and this command device realizes One flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame are specified Function.
These computer program instructions also can be loaded into computer or other programmable data processing terminals On equipment so that on computer or other programmable terminal equipment perform sequence of operations step with Produce computer implemented process, thus perform on computer or other programmable terminal equipment Instruction provides for realizing at one flow process of flow chart or multiple flow process and/or one square frame of block diagram Or the step of the function specified in multiple square frame.
Although have been described for the preferred embodiment of the embodiment of the present invention, but those skilled in the art Once know basic creative concept, then these embodiments can be made other change and amendment. So, claims are intended to be construed to include preferred embodiment and fall into the embodiment of the present invention All changes of scope and amendment.
Finally, in addition it is also necessary to explanation, in this article, the relation of such as first and second or the like Term is used merely to separate an entity or operation with another entity or operating space, and not Necessarily require or imply and there is the relation of any this reality or suitable between these entities or operation Sequence.And, term " includes ", " comprising " or its any other variant are intended to nonexcludability Comprise, so that include the process of a series of key element, method, article or terminal unit not only Including those key elements, but also include other key elements being not expressly set out, or also include for The key element that this process, method, article or terminal unit are intrinsic.There is no more restriction In the case of, statement " including ... " key element limited, it is not excluded that including described key element Process, method, article or terminal unit there is also other identical element.
A kind of the display foreground above embodiment of the present invention provided and the method for background segment, with And, a kind of display foreground and the device of background segment, it is described in detail, used herein Principle and the embodiment of the embodiment of the present invention are set forth by specific case, above example Method and the core concept thereof being only intended to help to understand the embodiment of the present invention is described;Simultaneously for One of ordinary skill in the art, according to the thought of the embodiment of the present invention, in detailed description of the invention and All will change in range of application, in sum, this specification content should not be construed as this The restriction of inventive embodiments.

Claims (10)

1. a display foreground and the method for background segment, it is characterised in that including:
Target frame image is divided into some blocks;
Determine that the kinestate of each block, described kinestate include static and dynamic;
It is static block for described kinestate, adds up its time being in static state;
When the time that certain block is in static state is more than the first predetermined threshold value, carry out for this block The refreshing of background image;
From described target frame image, foreground image is extracted according to the background image refreshed;
Wherein, the described step that target frame image is divided into some blocks farther includes:
It is evenly sized that target frame image is divided into several by the mode using block averagely to split Block;
Or, it is non-that target frame image is divided into several by the mode using the non-average mark of block to cut Evenly sized block;
Wherein, the described step that target frame image is divided into some blocks is long-pending block of record Coordinate range, as subsequent algorithm calculate boundary value;
Wherein, described first predetermined threshold value is the product of preset quiet hour threshold value and frame per second, The span of described preset quiet hour threshold value is 10 seconds to 50 seconds.
Method the most according to claim 1, it is characterised in that described by target frame Before image is divided into the step of some blocks, also include:
Described target frame image is carried out pretreatment, and described pretreatment includes noise reduction, illuminance abrupt variation Suppression.
Method the most according to claim 1 and 2, it is characterised in that described determine each The step of the kinestate of block farther includes:
In the bounds of each block, carry out target frame image and each pixel in previous frame image The calculus of differences of gray value, determines the kinestate of each pixel of block, motion shape in statistics block State is dynamic pixel;
If kinestate is the pixel quantity of dynamic pixel quantity and block in described block Ratio is less than the second predetermined threshold value, then judge that the kinestate of described block is as static state;
If kinestate is the pixel quantity of dynamic pixel quantity and block in described block Ratio is higher than the second predetermined threshold value, then judge that the kinestate of described block is as dynamically.
Method the most according to claim 1 and 2, it is characterised in that also include, pin Each block is arranged enumerator;
It is static block for described kinestate, uses equation below to add up it and be in static state Time Cx:
Cx=Cx+1。
Method the most according to claim 1 and 2, it is characterised in that described for this The step of the refreshing that block carries out background image farther includes:
Equation below is used to carry out the refreshing of background image for described block,
y”x=(1-ρ) y "x+ρyx,
Wherein, yxFor the gray value of certain pixel, y in described target frame image "xFor described background The grey scale pixel value of same position block in image, ρ is default learning rate, described pixel ash The span of angle value is 0 to 255, and the span of described learning rate is 0.01 to 0.2.
Method the most according to claim 1 and 2, it is characterised in that described target frame Image is the image extracted the most frame by frame or is the image extracted every frame in video.
7. a display foreground and the device of background segment, it is characterised in that including:
Image block module, for being divided into some blocks by target frame image;
Moving state determining module, for determining the kinestate of each block, described kinestate Including static and dynamic;
Counter module, for being static block for described kinestate, adds up it and is in The static time;
Piecemeal refresh module, for being in the time of static state more than the first predetermined threshold value at certain block Time, the refreshing of background image is carried out for this block;
Foreground segmentation module, for carrying from described target frame image according to the background image refreshed Take out foreground image;
Wherein, described image block module farther includes:
First piecemeal submodule, divides target frame image for the mode using block averagely to split It is segmented into several evenly sized blocks;
Or, the second piecemeal submodule, the mode being used for using the non-average mark of block to cut is by target Two field picture is divided into the block of several non-homogeneous sizes;
Wherein, described image block module is further used for recording the coordinate range of each block, The boundary value calculated as subsequent algorithm;
Wherein, described first predetermined threshold value is the product of preset quiet hour threshold value and frame per second, The span of described preset quiet hour threshold value is 10 seconds to 50 seconds.
Device the most according to claim 7, it is characterised in that also include:
Pretreatment module, for before calling described image block module, to described target frame Image carries out pretreatment, and described pretreatment includes that noise reduction, illuminance abrupt variation suppress.
9. according to the device described in claim 7 or 8, it is characterised in that described motion shape State determines that module farther includes:
Difference algorithm submodule, in the bounds of each block, carries out target frame image With the calculus of differences of grey scale pixel value each in previous frame image, determine the motion shape of each pixel of block State, in statistics block, kinestate is dynamic pixel;
First kinestate submodule, is dynamic pixel for kinestate in described block When the ratio of the pixel quantity of quantity and block is less than the second predetermined threshold value, it is determined that described block Kinestate is static;
Second kinestate submodule, is dynamic pixel for kinestate in described block When the ratio of the pixel quantity of quantity and block is higher than the second predetermined threshold value, it is determined that described block Kinestate is dynamic.
10. according to the device described in claim 7 or 8, it is characterised in that also include:
Enumerator arranges module, for arranging enumerator for each block;
Counter module, for being static block for described kinestate, uses following public Formula adds up its time C being in static statex:
Cx=Cx+1。
CN201210515922.7A 2012-12-03 2012-12-03 A kind of display foreground and the method and apparatus of background segment Active CN102968797B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210515922.7A CN102968797B (en) 2012-12-03 2012-12-03 A kind of display foreground and the method and apparatus of background segment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210515922.7A CN102968797B (en) 2012-12-03 2012-12-03 A kind of display foreground and the method and apparatus of background segment

Publications (2)

Publication Number Publication Date
CN102968797A CN102968797A (en) 2013-03-13
CN102968797B true CN102968797B (en) 2016-08-17

Family

ID=47798923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210515922.7A Active CN102968797B (en) 2012-12-03 2012-12-03 A kind of display foreground and the method and apparatus of background segment

Country Status (1)

Country Link
CN (1) CN102968797B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103347170A (en) * 2013-06-27 2013-10-09 郑永春 Image processing method used for intelligent monitoring and high-resolution camera applied in image processing method
CN104317397A (en) * 2014-10-14 2015-01-28 奇瑞汽车股份有限公司 Vehicle-mounted man-machine interactive method
CN107481249A (en) * 2017-08-11 2017-12-15 上海博超联石智能科技有限公司 A kind of data processing method of computer supervisory control system
CN110021026B (en) * 2019-04-12 2021-07-23 武汉高德智感科技有限公司 Image background reconstruction method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017573A (en) * 2007-02-09 2007-08-15 南京大学 Method for detecting and identifying moving target based on video monitoring

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7424175B2 (en) * 2001-03-23 2008-09-09 Objectvideo, Inc. Video segmentation using statistical pixel modeling

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017573A (en) * 2007-02-09 2007-08-15 南京大学 Method for detecting and identifying moving target based on video monitoring

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种有效的动态背景提取及更新方法;袁伟才等;《计算机工程与应用》;20101231;第46卷(第4期);191-192,235 *

Also Published As

Publication number Publication date
CN102968797A (en) 2013-03-13

Similar Documents

Publication Publication Date Title
Liu et al. Mobile video object detection with temporally-aware feature maps
CN107004287B (en) Avatar video apparatus and method
US20220277596A1 (en) Face anti-spoofing recognition method and apparatus, device, and storage medium
US20210248718A1 (en) Image processing method and apparatus, electronic device and storage medium
CN107862270B (en) Face classifier training method, face detection method and device and electronic equipment
Nguyen et al. Yolo based real-time human detection for smart video surveillance at the edge
CN110622176A (en) Video partitioning
CN102968797B (en) A kind of display foreground and the method and apparatus of background segment
CN111027507A (en) Training data set generation method and device based on video data identification
CN114519880B (en) Active speaker recognition method based on cross-modal self-supervision learning
CN114494815B (en) Neural network training method, target detection method, device, equipment and medium
CN106073804B (en) A kind of fatigue detection method and mobile terminal
CN111311634A (en) Face image detection method, device and equipment
CN112364799A (en) Gesture recognition method and device
CN113359995B (en) Man-machine interaction method, device, equipment and storage medium
CN104392467A (en) Video target tracking method based on compressive sensing
CN112825116B (en) Method, device, medium and equipment for detecting and tracking human face of monitoring video image
CN117056728A (en) Time sequence generation method, device, equipment and storage medium
CN117528135A (en) Speech-driven face video generation method and device, electronic equipment and medium
US20210166073A1 (en) Image generation method and computing device
CN113379874A (en) Face animation generation method, intelligent terminal and storage medium
US20220335316A1 (en) Data annotation method and apparatus, electronic device and readable storage medium
CN111915713A (en) Three-dimensional dynamic scene creating method, computer equipment and storage medium
CN112825118B (en) Rotation invariance face detection method, device, readable storage medium and equipment
CN111640440B (en) Audio stream decoding method, device, storage medium and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
DD01 Delivery of document by public notice

Addressee: Guangzhou Ncast Electronic Science & Technology Co., Ltd.

Document name: Notification of Publication and of Entering the Substantive Examination Stage of the Application for Invention

DD01 Delivery of document by public notice

Addressee: Guangzhou Ncast Electronic Science & Technology Co., Ltd.

Document name: Notification of an Office Action

C14 Grant of patent or utility model
GR01 Patent grant