CN107346540A - A kind of foreground detection method and device - Google Patents

A kind of foreground detection method and device Download PDF

Info

Publication number
CN107346540A
CN107346540A CN201710271990.6A CN201710271990A CN107346540A CN 107346540 A CN107346540 A CN 107346540A CN 201710271990 A CN201710271990 A CN 201710271990A CN 107346540 A CN107346540 A CN 107346540A
Authority
CN
China
Prior art keywords
block
pixels
video
motion vector
foreground detection
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
CN201710271990.6A
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.)
Le Holdings Beijing Co Ltd
Leshi Zhixin Electronic Technology Tianjin Co Ltd
LeTV Holding Beijing Co Ltd
Original Assignee
Leshi Zhixin Electronic Technology Tianjin Co Ltd
LeTV Holding Beijing 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 Leshi Zhixin Electronic Technology Tianjin Co Ltd, LeTV Holding Beijing Co Ltd filed Critical Leshi Zhixin Electronic Technology Tianjin Co Ltd
Priority to CN201710271990.6A priority Critical patent/CN107346540A/en
Publication of CN107346540A publication Critical patent/CN107346540A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/142Detection of scene cut or scene change

Abstract

The embodiment of the present application discloses a kind of foreground detection method and device, is related to image code domain, and the foreground detection method is included according to default block of pixels and time interval, and motion vector is calculated to each block of pixels;Judge whether the size of motion vector is more than preset value, if it is, the block of pixels is prospect.Foreground detection method described in the embodiment of the present application and device are overcome in the case of background has the similar depth of field to prospect by way of calculating motion vector, the problem of foreground detection inaccuracy.

Description

A kind of foreground detection method and device
Technical field
Embodiments of the present invention are related to image code domain, more specifically, before embodiments of the present invention are related to one kind Scape detection method and device.
Background technology
Foreground detection is to extract region of variation from background image from target sequence image, sport foreground object Effective detection it is most important for post-processings such as Object tracking, target classification, behavior understandings.Photographed especially for video recording When gesture when equipment is relatively fixed, somatosensory recognition, foreground detection, which has, to be more widely applied.
In the related prior art, for the relatively-stationary scene of photographic equipment of recording a video, have following several relatively conventional Foreground detection method:1st, detected using depth of field camera.Such as the Kinect of Microsoft and the Xtion Pro series of Asus This kind of method that product uses.It utilizes infrared transmitter, infrared remote receiver and RGB cameras, make the image of shooting except Outside RGB information, depth of view information can also be directly obtained, and prospect and background are further calculated according to depth of view information.2nd, use Binocular camera is detected.Such as using two RGB cameras, based on basic triangle principle, can know shooting point away from From the depth of view information of plane where binocular camera, so as to further calculate prospect and background.
But the present inventor has found under study for action:Above two method has similar scape for background to prospect When foreground detection is carried out in the case of depth, part background can be equally identified as prospect, cause the inaccuracy of foreground detection, so as to Influence the processing such as the Object tracking in later stage.
The content of the invention
It is inaccurate for solving foreground detection in the prior art the embodiments of the invention provide a kind of foreground detection method Problem.
On the one hand, the embodiment of the present application provides a kind of foreground detection method, including:
According to default block of pixels, time interval, and the coordinate of the block of pixels, fortune is calculated to each block of pixels Dynamic vector;
If the size of the motion vector is more than preset value, the block of pixels is prospect.
On the other hand, the embodiment of the present application additionally provides a kind of foreground detection device, including:
Motion vector computation module, for according to default block of pixels, time interval, and the coordinate of the block of pixels, Motion vector is calculated to each block of pixels;
Determining module, for when the size of the motion vector is more than preset value, it to be prospect to determine the block of pixels.
Another further aspect, the embodiment of the present application additionally provide a kind of electronic equipment, including:
At least one processor;And
The memory being connected with least one processor communication;Wherein,
The memory storage has can be by the instruction of one computing device, and the instruction is by by described at least one Computing device, so that at least one processor is able to carry out any of previous embodiment method.
Another further aspect, the embodiments of the invention provide a kind of nonvolatile computer storage media, and being stored with computer can Execute instruction, the computer executable instructions are used to perform any of the above-described foreground detection method of the embodiment of the present invention.
Another further aspect, the embodiments of the invention provide a kind of computer program product, the computer program product includes The calculation procedure being stored on non-volatile computer readable storage medium storing program for executing, the computer program include programmed instruction, work as institute When stating programmed instruction and being computer-executed, the computer is set to perform any of the above-described foreground detection method.
Brief description of the drawings
, below will be to embodiment party in order to illustrate more clearly of embodiments of the present invention or technical scheme of the prior art The required accompanying drawing used is briefly described in formula or description of the prior art.It should be evident that drawings in the following description are only Only be it is exemplary, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer is extended, and acquisition is other to implement accompanying drawing.
Fig. 1 is a kind of schematic flow sheet of foreground detection method described in the embodiment of the present application;
Fig. 2 is motion vector computation schematic diagram;
Fig. 3 is exemplary two dimensional image;
Fig. 4 is a kind of principle assumption diagram of foreground detection device described in the embodiment of the present application;
A kind of principle assumption diagram of electronic installation described in Fig. 5 the embodiment of the present application.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Embodiment one
It is a kind of flow chart of foreground detection method provided in an embodiment of the present invention as shown in Figure 1, the technology of the present embodiment Scheme may be adapted to photographic equipment of recording a video, and especially be relatively fixed the video recording photographic equipment of setting, or available for progress prospect inspection Survey or the electronic equipment of Video coding, such as mobile phone, tablet personal computer, personal computer (PC), handheld computer (PDA), TV, clothes Business device etc..
A kind of foreground detection method that the embodiment of the present application one provides, comprises the following steps:
S110, according to default block of pixels, time interval, and the coordinate of the block of pixels, to each block of pixels Calculate motion vector.
Motion vector is a Common Concepts in the estimation of video, for representing in one section of video, setting time The relative displacement of interior a certain block of pixels.Estimation is a kind of key concept of inter prediction, and inter prediction is as predictive coding A kind of important form, be often applied among video compress, it is intended to eliminate temporal redundancy information, i.e., using before it is encoded Image predict the image to be encoded.The block of pixels that the core of estimation is to find present encoding is in encoded image Optimal corresponding blocks in (being referred to as reference frame), and calculate the displacement of corresponding blocks.The displacement is motion vector, MV (Motion Vector)。
As illustrated in fig. 2, it is assumed that present frame is P (frame that encoded), reference frame is that Pr (has completed coding Frame), the block of pixels of present encoding is B, and one or more pixels can be included in wherein B.Afterwards, in reference frame Pr find with B blocks block Br the most similar, such as by way of residual error is subtracted each other in calculating and takes block corresponding to its minimum value.Br is to be referred to as B's Best matching blocks, this process are estimation.The acquisition modes of best matching blocks have many kinds, do not do and have in the application Body limits.As shown in Fig. 2 block B* (being such as rectangle, and wide, high consistent) identical with B specification, wherein block B* is located at reference frame In image corresponding to Pr, block B is located in image corresponding to present frame P, and block B* and coordinate positions of the B in the image of place frame It is identical.If block Br top left co-ordinates (xr, yr), block B* top left co-ordinates (x, y), then block B motion vector MV is above-mentioned piece Br top left co-ordinate values subtract block B* top left co-ordinate values, i.e., (xr-x, yr-y).Because the time redundancy of video is very big, as long as Reference frame and reference block choose properly, it is necessary to which the residual values of coding will very little.
And, it is necessary to determine to need block of pixels and the time calculated first before the calculating of above-mentioned motion vector is carried out Interval.The determination of the block of pixels and time interval can be according to the value (such as corresponding Default Value) that set in advance or Artificial set is carried out by user to carry out.The block of pixels is that the block corresponding to motion vector computation is carried out in the preceding paragraph.Typically Ground is divided into multiple block of pixels, it is necessary to before above-mentioned calculating is carried out, by image corresponding to affiliated video, more in described image The size of individual block of pixels can be with identical, can also be different;Shape can be rectangle, or other shapes, such as triangle, ladder Shape, parallelogram etc..Alternatively, in order to further improve the accuracy of foreground detection, the block of pixels can be only one Pixel.The time interval is institute's interlude between present frame and reference frame described in the preceding paragraph.Alternatively, when described Between interval can be time in video corresponding to each frame.Reference frame i.e. using the previous frame of present frame as present frame.With Exemplified by the video of 24 frame per second, its time interval is 1/24 second.It is to be appreciated that sweared in the motion to carrying out whole picture When amount is further processed, due to including multiple block of pixels in image, then the motion vector of whole image will form a square Battle array.
If the size of S120, the motion vector is more than preset value, the block of pixels is prospect.
The embodiment of the present invention can be used for the detection of the video to video recording photographic equipment shooting, and other non-can also be passed through The video that style of shooting obtains is detected, such as the animated video for passing through computer manufacture.Alternatively, this method can be used for carrying on the back The relatively-stationary video of scape, such as the prospect inspection of the video shot in a manner of photographic equipment of recording a video is relatively fixed setting Survey.The scene of the relatively-stationary video of background, such as regarding by shootings such as the monitoring camera of fixed setting, body-sensing cameras Frequently, often it is further processed using needs for prospect, such as carries out including face, gesture, body for the image of shooting The identification of sense etc. or behavior understanding, or carry out Object tracking and target classification etc. and further handle.In this case, background Part be do not change or without large change, therefore can by identify objects in images motion whether come carry out prospect with The differentiation of background.And whether moving for objects in images can be by the big of the motion vector of corresponding one or more block of pixels It is small to be judged.By carrying out the identification of prospect, background for the judgement of motion vector size, it can effectively solve the problem that and work as part Background has the identification Problem-Error during depth information close with prospect.
Although as described in the preceding paragraph, background is generally indeclinable, due to some factors, such as wind, vibration factor The slight change of background can be caused, it is therefore desirable to set a preset value, be somebody's turn to do when the size of motion vector corresponding to block of pixels is more than During preset value, the block of pixels is just judged for prospect, and otherwise the block of pixels is background.For example, set block Br top left co-ordinates (xr, yr) =(20,8) (such as the coordinate of complete image is marked with two-dimensional Cartesian coordinate system, and made with image P and the Pr lower left corner For (0,0) point), block B* top left co-ordinates (x, y)=(24,11), then block B motion vector MV is the above-mentioned piece of Br upper left corners Coordinate value subtracts block B* top left co-ordinate values, i.e. (xr-x, yr-y)=(- 4, -3).The block then can be determined according to Pythagorean theorem Motion vector size be=5.Exemplarily, it is 4 that can set preset value, then the corresponding picture when motion vector is more than 4 Plain block is prospect.The size of above-mentioned piece of B motion vector is 5, i.e. block B is prospect.
The embodiment of the present invention one discloses a kind of method of foreground detection, easily real by way of calculating motion vector Existing foreground detection, especially when in image having with background as foreground depth info class, it still is able to more accurately realize Detection for prospect, the convenient further processing carried out for image.
Embodiment two
A kind of foreground detection method is present embodiments provided, on the basis of a upper embodiment, methods described also includes:
S230, according to the result of the judgement draw bianry image;
S240, carry out connected domain calculating.
Bianry image refers to that the brightness value of the image only has two states:It is black (0) and white (255).Bianry image is due to it Pattern is simple, has extremely strong expressive force to the relation of pixel spatially, in being usually used in graphical analysis and identifying.Bianry image It is exactly connected component labeling to analyze most important method, and it is the basis of all binary image analysises, and it passes through to bianry image The mark of middle white pixel (target), allow each individually connected region to form an identified block, it is further we just The profile, boundary rectangle, not barycenter, the geometric parameter such as bending moment of these blocks can be obtained.Wherein carry out the fortune of connected component labeling Calculate and be referred to as connected domain calculating.Fig. 3 is exemplary bianry image, wherein the white portion marked with Arabic numerals is multiple companies Logical domain.Have a variety of for the mark mode of connected domain, be not specifically limited in the embodiment of the present invention.
Exemplarily, it is arranged to white in the judged result according to step S120, the block of pixels that prospect can be will be deemed as Brightness value, the block of pixels for not being judged as prospect are arranged to black brightness value.Can then obtain one only black with it is white Color, and white is the bianry image of the prospect of correspondence image.Further calculated, can be obtained with clearly connecting by connected domain The connection area image in region, so as to facilitate further image procossing.
In the embodiment of the present invention, by the further processing for judged result, figure corresponding with foreground detection is obtained The connection area image of picture, provided conveniently for processing such as further image recognitions.Further increase the accurate of foreground detection Degree and efficiency.
Embodiment three
A kind of foreground detection method is present embodiments provided, on the basis of above-described embodiment, in addition to:
The step of calculating motion vector is to carry out Video coding when progress.
Video coding just refers to by specific compress technique, and the file of some video format is converted into another video The mode of formatted file.Transmission in view of video and the limitation of efficiency and bandwidth in transmission, are in most cases regarded Frequency is required to carry out Video coding before being transmitted to be compressed.And have more according to different encoding schemes, Video coding Kind of series, such as MPEG is serial and H.26X series etc..
The free-revving engine of Video coding is the compression for realizing video.The reason for video can be compressed is video image Data have extremely strong correlation, i.e., with substantial amounts of redundancy.Wherein redundancy can be divided into spatial redundancy information and time domain Redundancy.Compress technique is exactly to remove and (remove the correlation between data) redundancy in data.And predict and compile Code is coding tools most basic in Video coding, and common predictive coding includes inter prediction and infra-frame prediction.
Wherein, inter prediction is exactly time domain prediction, it is intended to eliminates temporal redundancy information, i.e. image encoded before To predict the image that will be encoded.And inter prediction includes two important concepts:Motion estimation and compensation.Motion is estimated Meter is exactly the optimal corresponding blocks for finding the block of present encoding in encoded image (turning into reference frame), and calculates corresponding blocks Skew (i.e. motion vector MV).
It can be seen that the calculating to motion vector is the important step in Video coding.Therefore, the meter in foreground detection is carried out The step of calculating motion vector, the result of motion vector computation in Video coding can be directly used, so as to further improve prospect The efficiency of detection.
In the embodiment of the present invention, by directly using motion vector in video coding process in the step of foreground detection Result of calculation, the speed and efficiency of foreground detection are further increased, facilitate foreground detection and further carry out.
Example IV
The embodiment of the present invention additionally provides a kind of foreground detection device, and the foreground detection device can be that video recording photography is set It is standby, the video recording photographic equipment of setting is especially relatively fixed, or be the electronic equipment for Video coding, such as mobile phone, flat board Computer, personal computer (PC), handheld computer (PDA), TV, server etc..
As shown in figure 4, the foreground detection device includes:Motion vector computation module 10 and determining module 20.
Wherein, the motion vector computation module 10 is used for according to default block of pixels and time interval, to each described Block of pixels calculates motion vector.Exemplarily, the motion vector computation module 10 is by for video processing unit VPU (Video Processing Unit), the video processing unit is generally used for Video coding with filtering (post after decoding, video Filtering) with video rotation and reversely (rotation and inversion).
Motion vector is a Common Concepts in the estimation of video, for representing in one section of video, setting time The relative displacement of interior a certain block of pixels.Estimation is a kind of key concept of inter prediction, and inter prediction is as predictive coding A kind of important form, be often applied among video compress, it is intended to eliminate temporal redundancy information, i.e., using before it is encoded Image predict the image to be encoded.The block of pixels that the core of estimation is to find present encoding is in encoded image Optimal corresponding blocks in (being referred to as reference frame), and calculate the displacement of corresponding blocks.The displacement is motion vector, MV (Motion Vector)。
As illustrated in fig. 2, it is assumed that present frame is P (frame that encoded), reference frame is that Pr (has completed coding Frame), the block of pixels of present encoding is B, and one or more pixels can be included in wherein B.Afterwards, in reference frame Pr find with B blocks block Br the most similar, such as by way of residual error is subtracted each other in calculating and takes block corresponding to its minimum value.Br is to be referred to as B's Best matching blocks, this process are estimation.The acquisition modes of best matching blocks have many kinds, do not do and have in the application Body limits.As shown in Fig. 2 block B* (being such as rectangle, and wide, high consistent) identical with B specification, wherein block B* is located at reference frame In image corresponding to Pr, block B is located in image corresponding to present frame P, and block B* and coordinate positions of the B in the image of place frame It is identical.If block Br top left co-ordinates (xr, yr), block B* top left co-ordinates (x, y), then block B motion vector MV is above-mentioned piece Br top left co-ordinate values subtract block B* top left co-ordinate values, i.e., (xr-x, yr-y).Because the time redundancy of video is very big, as long as Reference frame and reference block choose properly, it is necessary to which the residual values of coding will very little.
Alternatively, described device also includes setup module 30, and the setup module 30 is carrying out the meter of above-mentioned motion vector Before calculation, it is determined that needing the block of pixels and time interval calculated.The determination of the block of pixels and time interval can be according to Artificial setting progress is carried out according to the value (such as corresponding Default Value) set in advance or by user.The block of pixels is The block corresponding to motion vector computation is carried out in the preceding paragraph.Usually, it is necessary to before above-mentioned calculating is carried out, by affiliated video pair The image answered is divided into multiple block of pixels, and the size of multiple block of pixels in described image can be with identical, can also be different;Shape Can be rectangle, or other shapes, such as triangle, trapezoidal, parallelogram.Alternatively, in order to further improve The accuracy of foreground detection, the block of pixels can be only a pixel.The time interval is current described in the preceding paragraph Institute's interlude between frame and reference frame.Alternatively, the time interval can be the time in video corresponding to each frame. Reference frame i.e. using the previous frame of present frame as present frame.By taking the video of 24 frame per second as an example, its time interval is 1/24 Second.It is to be appreciated that when the motion vector to carrying out whole picture is further processed, due to including multiple pictures in image Plain block, then the motion vector of whole image will form a matrix.
The determining module 20, for when the size of the motion vector is more than preset value, determining that the block of pixels is Prospect.Exemplarily, the determining module 20 can be graphics processing unit GPU (Graphics Processing Unit). In Video coding, the graphics processing unit is frequently used for the calculating for being related to relational graph, such as the related operation of matrix.When After the motion vector of all pixels block is calculated in motion vector computation module 10, can by the set of above-mentioned motion vector (such as Form a matrix form) determining module 20 is sent to, and be further processed by determining module.
Foreground detection device described in the embodiment of the present invention can detect to the video of video recording photographic equipment shooting, Other non-videos obtained by style of shooting can be detected, such as the animated video for passing through computer manufacture.It is optional Ground, this equipment can be used for carrying out foreground detection to the relatively-stationary video of background, such as is relatively fixed and set with photographic equipment of recording a video The foreground detection for the video that the mode put is shot.The scene of the relatively-stationary video of background, such as pass through fixed setting The video of the shootings such as monitoring camera, body-sensing camera, often it is further processed using needs for prospect, such as The image of shooting carries out identification or the behavior understanding for including face, gesture, body-sensing etc., or carries out Object tracking and target classification Deng further processing.In this case, background parts are not changed or without large change, therefore can be schemed by identifying Whether object moves to carry out the differentiation of prospect and background as in.And whether the motion of objects in images can be by corresponding The size of the motion vector of one or more block of pixels is judged.Before being carried out by the judgement for motion vector size The identification of scape, background, it can effectively solve the problem that the identification Problem-Error when part background has the depth information close with prospect.
Although as described in the preceding paragraph, background is generally indeclinable, due to some factors, such as wind, vibration factor The slight change of background can be caused, it is therefore desirable to set a preset value, be somebody's turn to do when the size of motion vector corresponding to block of pixels is more than During preset value, the block of pixels is just judged for prospect, and otherwise the block of pixels is background.For example, work as block Br top left co-ordinates (xr, yr) =(20,8) (such as the coordinate of complete image is marked with two-dimensional Cartesian coordinate system, and (0,0) point is used as using the lower left corner), Block B* top left co-ordinates (x, y)=(24,11), then block B motion vector MV is that above-mentioned piece of Br top left co-ordinate value subtracts block B* top left co-ordinate values, i.e. (xr-x, yr-y)=(- 4, -3).The size that then motion vector can be determined according to Pythagorean theorem is =5.Exemplarily, it is 4 that can set preset value, then when motion vector is more than 4, corresponding block of pixels is prospect, above-mentioned piece of B Motion vector be 5, i.e. block B is prospect.
The inventive embodiments disclose a kind of device of foreground detection, and the device can be by way of calculating motion vector Foreground detection easily is realized, is had in particular in image with during background, can be more defined as foreground depth info class Detection of the true realization for prospect, the convenient further processing carried out for image.
Embodiment five
The embodiment of the present invention additionally provides a kind of foreground detection device, also includes on the basis of embodiment three:Draw mould Block 40 and connected domain computing module 50.
Drafting module 40, for drawing bianry image according to the judged result of determining module 20.
Bianry image refers to be exactly that the brightness value of image only has two states:It is black (0) and white (255).Bianry image due to Its pattern is simple, has extremely strong expressive force to the relation of pixel spatially, in being usually used in graphical analysis and identifying.Binary map It is exactly connected component labeling as analyzing most important method, it is the basis of all binary image analysises, and it passes through to binary map The mark of white pixel (target) as in, allow each individually connected region to form an identified block, it is further we Can obtains the profile, boundary rectangle, not barycenter, the geometric parameter such as bending moment of these blocks.Wherein carry out connected component labeling Computing is referred to as connected domain calculating.Fig. 3 is exemplary bianry image, wherein the white portion marked with Arabic numerals is multiple Connected domain.Have a variety of for the mark mode of connected domain, be not specifically limited in the embodiment of the present invention.
Exemplarily, it is arranged to white in the judged result according to determining module 20, the block of pixels that prospect can be will be deemed as Colour brightness value, the block of pixels for not being judged as prospect are arranged to black brightness value.Can then obtain one only black with White, and white is the bianry image of the prospect of correspondence image.Further calculated, can be obtained with clearly connecting by connected domain The connection area image in logical region, so as to facilitate further image procossing.
In the embodiment of the present invention, by the further processing for judged result, figure corresponding with foreground detection is obtained The connection area image of picture, provided conveniently for processing such as further image recognitions.Further increase the accurate of foreground detection Degree and efficiency.
Embodiment six
A kind of foreground detection device is present embodiments provided, on the basis of above-described embodiment, in addition to Video coding mould Block 60.
Video encoding module 60 is used to carry out Video coding, refers to by specific compress technique, by some video format File be converted into the mode of another video format file.Transmission in view of video and the efficiency and bandwidth in transmission Limitation, in most cases video be required to carry out Video coding before being transmitted to be compressed.And according to different volumes Code scheme, Video coding have a variety of series, such as MPEG is serial and H.26X series etc..
The free-revving engine of Video coding is the compression for realizing video.The reason for video can be compressed is video image Data have extremely strong correlation, i.e., with substantial amounts of redundancy.Wherein redundancy can be divided into spatial redundancy information and time domain Redundancy.Compress technique is exactly to remove and (remove the correlation between data) redundancy in data.And predict and compile Code is coding tools most basic in Video coding, and common predictive coding includes inter prediction and infra-frame prediction.
Wherein, inter prediction is exactly time domain prediction, it is intended to eliminates temporal redundancy information, i.e. image encoded before To predict the image that will be encoded.And inter prediction includes two important concepts:Motion estimation and compensation.Motion is estimated Meter is exactly the optimal corresponding blocks for finding the block of present encoding in encoded image (turning into reference frame), and passes through motion vector Computing module calculates the skew (i.e. motion vector MV) of corresponding blocks.
It can be seen that motion vector computation module is the important component of video encoding module.Therefore, filled for foreground detection Put, motion vector computation module can be contained in video encoding module, so as to further improve the efficiency of foreground detection, reduced The complexity of device structure.
In the embodiment of the present invention, by the way that vectors calculation module is contained in video encoding module, before further increasing The speed and efficiency of scape detection, reduce the complexity of device structure, facilitate foreground detection and further carry out.
Embodiment seven
Fig. 5 is the hardware configuration of the electronic equipment for the processing method for performing list items operation that the embodiment of the present application seven provides Schematic diagram, as shown in figure 5, the equipment includes:
One or more processors 610 and memory 620, in Fig. 4 by taking a processor 610 as an example.
Performing the equipment of the processing method of list items operation can also include:Input unit 630 and output device 640.
Processor 610, memory 620, input unit 630 and output device 640 can pass through bus or other modes Connection.
Memory 620 is used as a kind of non-transient computer readable storage medium storing program for executing, available for storing non-transient software program, non- Transient computer executable program and module, the program as corresponding to the processing method of the list items operation in the embodiment of the present application Instruction/module is (for example, the dispaly state handover module 410, list items mobile module 420 and edit operation shown in accompanying drawing 4 perform Module 430).Processor 610 is stored in non-transient software program, instruction and module in memory 620 by operation, from And various function application and the data processing of execute server, that is, realize the processing side that above method embodiment list items operate Method.
Memory 620 can include storing program area and storage data field, wherein, storing program area can store operation system Application program required for system, at least one function;Storage data field, which can store the processing unit operated according to list items, to be made With data created etc..In addition, memory 620 can include high-speed random access memory, non-transient deposit can also be included Reservoir, for example, at least a disk memory, flush memory device or other non-transient solid-state memories.In some embodiments In, memory 620 is optional including that can pass through net relative to the remotely located memory of processor 610, these remote memories Network is connected to the processing unit of list items operation.The example of above-mentioned network includes but is not limited to internet, intranet, local Net, mobile radio communication and combinations thereof.
Input unit 630 can receive the numeral or character information of input, and produce the processing unit with list items operation User set and function control it is relevant key signals input.Output device 640 may include the display devices such as display screen.
One or more of modules are stored in the memory 620, when by one or more of processors During 610 execution, the processing method of the list items operation in above-mentioned any means embodiment is performed.
The said goods can perform the method that is provided of the embodiment of the present application, including the corresponding functional module of execution method and have Beneficial effect.Not ins and outs of detailed description in the present embodiment, reference can be made to the method that the embodiment of the present application is provided.
Embodiment eight
The embodiments of the invention provide a kind of nonvolatile computer storage media, computer executable instructions are stored with, The computer executable instructions are used to perform any of the above-described foreground detection method of the embodiment of the present invention.
The embodiment of the present invention has beneficial effect corresponding with embodiment of the method.The not skill of detailed description in the present embodiment Art details, reference can be made to the method that the embodiment of the present invention is provided.
Embodiment
Another further aspect, the embodiments of the invention provide a kind of computer program product, the computer program product includes The calculation procedure being stored on non-volatile computer readable storage medium storing program for executing, the computer program include programmed instruction, work as institute When stating programmed instruction and being computer-executed, the computer is set to perform any of the above-described foreground detection method.
The embodiment of the present invention has beneficial effect corresponding with embodiment of the method.The not skill of detailed description in the present embodiment Art details, reference can be made to the method that the embodiment of the present invention is provided.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Finally it should be noted that one of ordinary skill in the art will appreciate that realizing the whole in above-described embodiment method Or part flow, it is that by computer program the hardware of correlation can be instructed to complete, described program can be stored in a meter In calculation machine read/write memory medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, institute The storage medium stated can be magnetic disc, CD, read-only memory (ROM) or random access memory (RAM) etc..

Claims (13)

  1. A kind of 1. foreground detection method, it is characterised in that including:
    According to default block of pixels, time interval, and the coordinate of the block of pixels, motion arrow is calculated to each block of pixels Amount;
    If the size of the motion vector is more than preset value, the block of pixels is prospect.
  2. 2. the method as described in claim 1, it is characterised in that accompanying method also includes:
    Bianry image is drawn according to the result of the judgement;
    Carry out connected domain calculating.
  3. 3. the method as described in claim 1, it is characterised in that:
    The step of calculating motion vector is to carry out Video coding when progress.
  4. 4. the method as described in claim 1, it is characterised in that:
    The block of pixels is a pixel, and the time interval is the time corresponding to a frame of video.
  5. 5. such as the method any one of claim 1-4, it is characterised in that:
    Methods described is applied to the detection to the relatively-stationary video of background.
  6. A kind of 6. foreground detection device, it is characterised in that including:
    Motion vector computation module, for according to default block of pixels, time interval, and the coordinate of the block of pixels, to every The individual block of pixels calculates motion vector;
    Determining module, for when the size of the motion vector is more than preset value, it to be prospect to determine the block of pixels.
  7. 7. device as claimed in claim 6, it is characterised in that also include:
    Drafting module, bianry image is drawn according to the judged result of the determining module;
    Connected domain computing module, for carrying out connected domain calculating.
  8. 8. device as claimed in claim 6, it is characterised in that also include:
    Video encoding module, for carrying out Video coding to video, the motion vector computation module is contained in Video coding mould Block.
  9. 9. device as claimed in claim 6, it is characterised in that:
    The block of pixels is a pixel, and the time interval is the time corresponding to a frame of video.
  10. 10. the device as described in any one in claim 6-9, it is characterised in that:
    Described device is used for the detection to the relatively-stationary video of background.
  11. 11. a kind of electronic equipment, including:
    At least one processor;And
    The memory being connected with least one processor communication;Wherein,
    The memory storage has can be by the instruction of one computing device, and the instruction is by by least one processing Device performs, so that at least one processor is able to carry out any method described in claim 1 to 5.
  12. 12. a kind of nonvolatile computer storage media, it is stored with computer executable instructions, the computer executable instructions The foreground detection method described in any one of 1-5 is required for perform claim.
  13. 13. a kind of computer program product, the computer program product includes being stored in non-volatile computer readable storage Calculation procedure on medium, the computer program include programmed instruction, when described program instruction is computer-executed, make institute State the foreground detection method described in computer perform claim requirement any one of 1-5.
CN201710271990.6A 2017-04-24 2017-04-24 A kind of foreground detection method and device Pending CN107346540A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710271990.6A CN107346540A (en) 2017-04-24 2017-04-24 A kind of foreground detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710271990.6A CN107346540A (en) 2017-04-24 2017-04-24 A kind of foreground detection method and device

Publications (1)

Publication Number Publication Date
CN107346540A true CN107346540A (en) 2017-11-14

Family

ID=60253697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710271990.6A Pending CN107346540A (en) 2017-04-24 2017-04-24 A kind of foreground detection method and device

Country Status (1)

Country Link
CN (1) CN107346540A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108646931A (en) * 2018-03-21 2018-10-12 深圳市创梦天地科技有限公司 A kind of terminal control method and terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108646931A (en) * 2018-03-21 2018-10-12 深圳市创梦天地科技有限公司 A kind of terminal control method and terminal
CN108646931B (en) * 2018-03-21 2022-10-14 深圳市创梦天地科技有限公司 Terminal control method and terminal

Similar Documents

Publication Publication Date Title
Romero-Ramirez et al. Speeded up detection of squared fiducial markers
US10638117B2 (en) Method and apparatus for gross-level user and input detection using similar or dissimilar camera pair
CN111328396B (en) Pose estimation and model retrieval for objects in images
US9773302B2 (en) Three-dimensional object model tagging
US9571819B1 (en) Efficient dense stereo computation
JP6438403B2 (en) Generation of depth maps from planar images based on combined depth cues
KR101722803B1 (en) Method, computer program, and device for hybrid tracking of real-time representations of objects in image sequence
CN108292362A (en) Gesture identification for cursor control
US20120306876A1 (en) Generating computer models of 3d objects
CN109711246B (en) Dynamic object recognition method, computer device and readable storage medium
US10438405B2 (en) Detection of planar surfaces for use in scene modeling of a captured scene
CN109934873B (en) Method, device and equipment for acquiring marked image
US20160245641A1 (en) Projection transformations for depth estimation
CN111553915A (en) Article identification detection method, device, equipment and readable storage medium
WO2016120132A1 (en) Method and apparatus for generating an initial superpixel label map for an image
CN111382637A (en) Pedestrian detection tracking method, device, terminal equipment and medium
CN108960012B (en) Feature point detection method and device and electronic equipment
CN107209556A (en) For to capturing object relative to the system and method that the depth image of the interaction of interactive flat is handled
CN112378333A (en) Method and device for measuring warehoused goods
Liu et al. Panoramic video stitching of dual cameras based on spatio-temporal seam optimization
Mirkamali et al. Object removal by depth-wise image inpainting
CN113240656A (en) Visual positioning method and related device and equipment
CN107346540A (en) A kind of foreground detection method and device
CN110009683B (en) Real-time on-plane object detection method based on MaskRCNN
KR102587298B1 (en) Real-time omnidirectional stereo matching method using multi-view fisheye lenses and system therefore

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20171114

WD01 Invention patent application deemed withdrawn after publication