CN103793923A - Method and device for acquiring moving object in image - Google Patents

Method and device for acquiring moving object in image Download PDF

Info

Publication number
CN103793923A
CN103793923A CN201410033664.8A CN201410033664A CN103793923A CN 103793923 A CN103793923 A CN 103793923A CN 201410033664 A CN201410033664 A CN 201410033664A CN 103793923 A CN103793923 A CN 103793923A
Authority
CN
China
Prior art keywords
image
pixel
foreground image
binaryzation
brightness value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410033664.8A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410033664.8A priority Critical patent/CN103793923A/en
Publication of CN103793923A publication Critical patent/CN103793923A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a method and device for acquiring a moving object in an image. The method comprises the following steps: an input image is acquired, wherein the input image comprises at least one first pixel; according to all the first pixels, a foreground image and a background image are acquired; according to the foreground image and the background image, a difference image of the input image is acquired; according to a preset binarization threshold value, the foreground image and the difference image, a binarization foreground image is acquired; according to the binarization foreground image, a moving object in the input image is acquired. According to the technical scheme, the method and device can be used for simply and efficiently detecting the moving object in the input image.

Description

The acquisition methods of moving target and equipment in a kind of image
[technical field]
The present invention relates to image processing techniques, relate in particular to acquisition methods and the equipment of moving target in a kind of image.
[background technology]
Video monitoring system utilizes video camera to monitor continuously scene, to gather image, and the image collecting is processed, and the moving target in image to be detected, thereby moving target is followed the tracks of etc. to processing.Obtain in the process of moving target, exist because moving target always has shadows pixels point around, therefore, must after elimination direct-shadow image vegetarian refreshments, moving target just can be detected.
The method of eliminating at present direct-shadow image vegetarian refreshments is to utilize algorithm to judge successively in image, whether each pixel is direct-shadow image vegetarian refreshments, then deletes direct-shadow image vegetarian refreshments according to judged result.But the method for this elimination direct-shadow image vegetarian refreshments need to utilize algorithm to judge one by one each pixel in image, therefore calculated amount is very large, causes detecting from input picture that the efficiency of moving target is lower.
[summary of the invention]
In view of this, the embodiment of the present invention provides acquisition methods and the equipment of moving target in a kind of image, moving target detected to realize realizing simply efficiently from input picture.
First aspect, the embodiment of the present invention provides the acquisition methods of moving target in a kind of image, comprising:
Obtain input picture, described input picture comprises at least one first pixel;
According to whole described the first pixels, obtain foreground image and background image;
According to described input picture and described background image, obtain difference image;
According to default binary-state threshold, described foreground image and described difference image, obtain the foreground image of binaryzation;
According to the foreground image of described binaryzation, obtain the moving target in described input picture.
In the possible implementation of the first of first aspect, the described input picture of described foundation and described background image, obtain difference image, comprising:
The difference of the brightness value that obtains each described the first pixel in described input picture and the brightness value of the second pixel corresponding in described background image; The coordinate in described background image is identical with corresponding described the second pixel for the coordinate of each described the first pixel in described input picture;
According to the absolute value of described difference, obtain the luminance difference score value that each coordinate is corresponding;
According to described luminance difference score value, obtain described difference image; Described difference image comprises at least one the 3rd pixel, and the brightness value of each described the 3rd pixel equals luminance difference score value corresponding to the coordinate of the 3rd pixel in described difference image.
In conjunction with the possible implementation of the first of first aspect or first aspect, in the possible implementation of the second of first aspect, binary-state threshold, described foreground image and described difference image that described foundation is default, the foreground image of acquisition binaryzation, comprising:
According to described difference image and default gradient operator, obtain the Grad of each described the 3rd pixel in described difference image;
According to Grad and the described foreground image of described binary-state threshold, each described the 3rd pixel, obtain the foreground image of binaryzation.
In conjunction with the possible implementation of the second of first aspect, in the third possible implementation of first aspect, the Grad of the described binary-state threshold of described foundation, each described the 3rd pixel and described foreground image, the foreground image of acquisition binaryzation, comprising:
The Grad of each described the 3rd pixel and described binary-state threshold are compared;
If the Grad of described the 3rd pixel is greater than described binary-state threshold, judge whether the brightness value of the 4th pixel corresponding in described foreground image equals the maximal value of brightness value; If the brightness value of the 4th corresponding pixel equals the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the maximal value of brightness value; If the brightness value of the 4th corresponding pixel is not equal to the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value;
If the Grad of described the 3rd pixel is less than or equal to described binary-state threshold, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value.
In conjunction with the first, the second or the third possible implementation of first aspect or first aspect, in the 4th kind of possible implementation of first aspect, the foreground image of the described binaryzation of described foundation, obtains the moving target in described input picture, comprising:
The foreground image of described binaryzation is carried out to morphology processing, to obtain the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments;
Utilize profile algorithm to detect the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments, to obtain the moving target in the foreground image of described binaryzation.
In conjunction with the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of first aspect, described the foreground image of described binaryzation is carried out to morphology processing, to obtain the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments, comprising:
The foreground image of described binaryzation is carried out to morphological dilations processing, to fill the hole region in the foreground image of described binaryzation;
Foreground image to the binaryzation through morphological dilations processing carries out morphological erosion processing.
Second aspect, the embodiment of the present invention provides the equipment that obtains of moving target in a kind of image, comprising:
Image input block, for obtaining input picture, described input picture comprises at least one first pixel;
Input processing unit, for according to whole described the first pixels, obtains foreground image and background image;
Difference processing unit, for according to described input picture and described background image, obtains difference image;
Binary conversion treatment unit, for binary-state threshold, described foreground image and described difference image according to default, obtains the foreground image of binaryzation;
Object detection unit, for the foreground image according to described binaryzation, obtains the moving target in described input picture.
In the possible implementation of the first of second aspect, described difference processing unit specifically for:
The difference of the brightness value that obtains each described the first pixel in described input picture and the brightness value of the second pixel corresponding in described background image; The coordinate in described background image is identical with corresponding described the second pixel for the coordinate of each described the first pixel in described input picture;
According to the absolute value of described difference, obtain the luminance difference score value that each coordinate is corresponding;
According to described luminance difference score value, obtain described difference image; Described difference image comprises at least one the 3rd pixel, and the brightness value of each described the 3rd pixel equals luminance difference score value corresponding to the coordinate of the 3rd pixel in described difference image.
In conjunction with the possible implementation of the first of second aspect or second aspect, in the possible implementation of the second of second aspect, described binary conversion treatment unit specifically for:
According to described difference image and default gradient operator, obtain the Grad of each described the 3rd pixel in described difference image;
According to Grad and the described foreground image of described binary-state threshold, each described the 3rd pixel, obtain the foreground image of binaryzation.
In conjunction with the possible implementation of the second of second aspect, in the third possible implementation of second aspect, described binary conversion treatment unit specifically for:
The Grad of each described the 3rd pixel and described binary-state threshold are compared;
If the Grad of described the 3rd pixel is greater than described binary-state threshold, judge whether the brightness value of the 4th pixel corresponding in described foreground image equals the maximal value of brightness value; If the brightness value of the 4th corresponding pixel equals the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the maximal value of brightness value; If the brightness value of the 4th corresponding pixel is not equal to the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value;
If the Grad of described the 3rd pixel is less than or equal to described binary-state threshold, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value.
In conjunction with the first, the second or the third possible implementation of second aspect or second aspect, in the 4th kind of possible implementation of second aspect, described object detection unit specifically for:
The foreground image of described binaryzation is carried out to morphology processing, to obtain the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments;
Utilize profile algorithm to detect the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments, to obtain the moving target in the foreground image of described binaryzation.
In conjunction with the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect, described object detection unit specifically for:
The foreground image of described binaryzation is carried out to morphological dilations processing, to fill the hole region in the foreground image of described binaryzation;
Foreground image to the binaryzation through morphological dilations processing carries out morphological erosion processing.
As can be seen from the above technical solutions, the embodiment of the present invention has following beneficial effect:
Foreground image based on binaryzation completes the detection of moving target, does not need each pixel in foreground image to take a decision as to whether successively direct-shadow image vegetarian refreshments, and therefore computing method are simple, moving target can from input picture, be detected efficiently.
[accompanying drawing explanation]
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, to the accompanying drawing of required use in embodiment be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic flow sheet of the acquisition methods of moving target in the image that provides of the embodiment of the present invention;
Fig. 2 (a)~Fig. 2 (c) is the schematic diagram of the acquisition difference image that provides of the embodiment of the present invention;
Fig. 3 (a)~Fig. 3 (b) is the schematic diagram of the foreground image of the acquisition binaryzation that provides of the embodiment of the present invention;
Fig. 4 is the schematic diagram of the foreground image of the acquisition morphology binaryzation after treatment that provides of the embodiment of the present invention;
Fig. 5 (a)~Fig. 5 (b) is the schematic diagram that detects moving target in the embodiment of the present invention;
Fig. 6 is the functional block diagram of the equipment that obtains of moving target in the image that provides of the embodiment of the present invention;
Fig. 7 is the structural representation of the equipment that obtains of moving target in the image that provides of the embodiment of the present invention.
[embodiment]
Technical scheme for a better understanding of the present invention, is described in detail the embodiment of the present invention below in conjunction with accompanying drawing.
Should be clear and definite, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making all other embodiment that obtain under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides the acquisition methods of moving target in a kind of image, please refer to Fig. 1, the schematic flow sheet of the acquisition methods of moving target in its image providing for the embodiment of the present invention, and as shown in the figure, the method comprises the following steps:
Step 101, obtains input picture, and described input picture comprises at least one first pixel; According to whole described the first pixels, obtain foreground image and background image.
Concrete, the input picture of acquisition certain time length, described input picture comprises at least one first pixel; Input picture according to this certain time length is set up background model; Then according to background model, each the first pixel in the input picture of described certain time length is identified, judge the second pixel that this first pixel is background image, or the 4th pixel of foreground image, the second pixel according to background image obtains background image, and obtains foreground image according to the 4th pixel of foreground image.Wherein, can using collect by video camera or IP Camera video streaming image as current input picture.
For example, the color value to each pixel in input picture (as brightness value or chromatic value) carries out modeling.If the coordinate (x of input picture, coordinate (x in the color value of the pixel y) and background model, the color value of the pixel y) has larger difference, determine coordinate (x, y) pixel on belongs to the pixel in foreground image, otherwise determine that the pixel on coordinate (x, y) belongs to the pixel in background image.
Step 102, according to described input picture and described background image, obtains difference image.
Concrete, in the embodiment of the present invention, can, according to the difference of the brightness value of the second pixel in the brightness value of the first pixel in described input picture and background image, obtain difference image.
Wherein, the difference of the brightness value of the second pixel in the brightness value of the first pixel and background image in the described input picture of foundation, the method that obtains difference image can be:
The difference of the brightness value that first, obtains each the first pixel in described input picture and the brightness value of the second pixel corresponding in described background image; Wherein, the coordinate in described background image is identical with corresponding described the second pixel for the coordinate of each described the first pixel in described input picture; According to the absolute value of described difference, obtain the luminance difference score value diff that each coordinate is corresponding; That is:
diff (x,y)=abs(SRC (x,y)-BG (x,y))
Wherein, (x, y) is coordinate or the second pixel coordinate in background image of the first pixel in input picture, diff (x, y)the luminance difference score value that denotation coordination (x, y) is corresponding, SRC (x, y)represent the brightness value of the first pixel that in input picture, coordinate is (x, y), BG (x, y)represent the brightness value of the second pixel that in background image, coordinate is (x, y), abs () represents to ask the computing of absolute value.
Then,, according to the luminance difference score value obtaining, obtain difference image.Difference image comprises at least one the 3rd pixel, and the brightness value of each described the 3rd pixel equals luminance difference score value corresponding to the coordinate of the 3rd pixel in described difference image, and in difference image, the 3rd pixel only has corresponding brightness value.For example, please refer to Fig. 2 (a)~Fig. 2 (c), the schematic diagram of its acquisition difference image providing for the embodiment of the present invention, Fig. 2 (a) is input picture, 2(b) be background image, according to the difference of the brightness value of the second pixel in the brightness value of the first pixel in input picture and background image, obtain the difference image shown in Fig. 2 (c).
In the embodiment of the present invention, in order to reduce the data volume of processing, improve the counting yield that shade is eliminated, only process for the luminance component of pixel in image.Wherein, in image, the brightness value of pixel utilizes 8 bits to represent at present, therefore can only represent 256 brightness values, and therefore, the span of the brightness value of current pixel point is [0,255].
Step 103, according to default binary-state threshold, described foreground image and described difference image, obtains the foreground image of binaryzation.
Concrete, first, according to described difference image, and utilize default gradient operator, obtain the Grad of each described the 3rd pixel in described difference image.For example, take described gradient operator be Sobel Operator (Sobel operator) as example, the computation complexity of Sobel Operator is lower, therefore, can improve and eliminate the efficiency of shade.Utilize Sobel Operator, the method that obtains the Grad of the 3rd pixel in difference image can be: Sobel Operator comprises the matrix of two group 3 × 3, this matrix of two group 3 × 3 is respectively transverse matrix and longitudinal matrix, the matrix of two group 3 × 3 respectively with obtain difference image in each the 3rd pixel do convolution and computing, to obtain transverse gradients approximate value and longitudinal gradient approximate value of each the 3rd pixel in difference image, again according to transverse gradients approximate value and longitudinal gradient approximate value, obtain the Grad of each described the 3rd pixel in difference image, that is:
Figure BDA0000461340820000081
wherein, G (x, y)represent the Grad of the 3rd pixel, G xrepresent the transverse gradients approximate value of the 3rd pixel, G yrepresent longitudinal gradient approximate value of the 3rd pixel.
Then, at the Grad G that obtains each described the 3rd pixel in described difference image (x, y)afterwards, can be according to the Grad G of default binary-state threshold th, each described the 3rd pixel (x, y)with foreground image FG, obtain the foreground image of binaryzation.
Wherein, the Grad G of the described binary-state threshold th of foundation, each described the 3rd pixel (x, y)with described foreground image FG, the method that obtains the foreground image of binaryzation can be:
By the Grad G of each described the 3rd pixel (x, y)compare with described binary-state threshold th; If the Grad G of the 3rd pixel that coordinate is (x, y) (x, y)be greater than described binary-state threshold th, further judge whether the brightness value of the 4th pixel that in described foreground image FG, coordinate is (x, y) equals the maximal value of brightness value, as the maximal value of brightness value equals 255; If the Grad G of the 3rd pixel that coordinate is (x, y) (x, y)be less than or equal to described binary-state threshold th, the brightness value of the pixel that in the foreground image of binaryzation, coordinate is (x, y) be set to the minimum value of brightness value, as the minimum value of brightness value equals 0.If the brightness value of the 4th pixel that in described foreground image FG, coordinate is (x, y) equals the maximal value of brightness value, the brightness value of the pixel that in the foreground image of binaryzation, coordinate is (x, y) is set to the maximal value of brightness value; If the brightness value of the 4th pixel that in described foreground image FG, this coordinate is (x, y) is not equal to the maximal value of brightness value, the brightness value of the pixel that in the foreground image of binaryzation, coordinate is (x, y) is set to the minimum value of brightness value.
Utilize said method, each the 4th pixel in difference image is carried out to above-mentioned binary conversion treatment, therefore, the brightness value of each the 4th pixel in difference image can be set to 0 or be set to 255, last, be set to 0 pixel and brightness value according to brightness value and be set to 255 pixel, obtain the foreground image of described binaryzation,, in the foreground image of this binaryzation, the brightness value of one part of pixel point is 255, and the brightness value of remaining pixel is 0.
Grad based on direct-shadow image vegetarian refreshments in difference image is less than the principle of the Grad of the pixel of moving target, utilizes the Grad of the 3rd pixel in difference image to obtain the foreground image of binaryzation, thereby can remove the direct-shadow image vegetarian refreshments in foreground image.
Said method can represent with following formula:
Figure BDA0000461340820000091
Wherein, BIN (x, y)the brightness value of the pixel that in the foreground image of expression binaryzation, coordinate is (x, y), G (x, y)represent that in difference image, coordinate is (x, the Grad of the 3rd pixel y), th represents default binary-state threshold, can binary-state threshold be set according to shadow intensity in image, for example, the traffic image that comprises larger shadow intensity, binary-state threshold can arrange larger numerical value, the off-the-air picture that comprises less shadow intensity, binary-state threshold can arrange less numerical value, for example, the span of binary-state threshold can be [40,90]; FG (x, y)represent the brightness value of the 4th pixel that in foreground image, coordinate is (x, y).This formula represents, if the Grad G of the 3rd pixel that in difference image, coordinate is (x, y) (x, y)be greater than binary-state threshold th, and the 4th pixel corresponding in foreground image (is that coordinate is (x, y) the 4th pixel) brightness value equal 255, the Grad that represents the 3rd pixel in difference image is larger, and in foreground image, the brightness value of the 4th corresponding pixel is larger, in foreground image, this pixel is very likely the pixel of moving target, therefore, in the foreground image of binaryzation, the brightness value of corresponding pixel is set to 255, this pixel is a white point in the foreground image of binaryzation; Otherwise, if the Grad G of the 3rd pixel that in difference image, coordinate is (x, y) (x, y)be less than or equal to binary-state threshold th, the brightness value of the 4th pixel that in foreground image, coordinate is (x, y) equals 255, or, the Grad G of the 3rd pixel that in difference image, coordinate is (x, y) (x, y)be greater than binary-state threshold th, but the brightness value of the 4th pixel that in foreground image, coordinate is (x, y) is not equal to 255, or, the Grad G of the 3rd pixel that in difference image, coordinate is (x, y) (x, y)be less than or equal to binary-state threshold th, in foreground image, coordinate is (x, the brightness value of the 4th pixel y) equals 255, in the foreground image of binaryzation, the brightness value of this pixel is set to 0, and this pixel is a black color dots in the foreground image of binaryzation.
For example, please refer to Fig. 3 (a)~Fig. 3 (b), the schematic diagram of the foreground image of its acquisition binaryzation providing for the embodiment of the present invention, Fig. 2 (c) is difference image, Fig. 3 (a) is foreground image, and Fig. 3 (b) is the foreground image according to the binaryzation of Fig. 2 (c) and Fig. 3 (a) acquisition.Comparison diagram 3(a) and Fig. 3 (b), after binary conversion treatment, in foreground image, most direct-shadow image vegetarian refreshments is eliminated.
The embodiment of the present invention utilizes the Grad of direct-shadow image vegetarian refreshments in difference image to be less than the principle of the Grad of the pixel of moving target, obtain the foreground image of binaryzation according to the Grad of pixel in difference image, do not need each pixel in foreground image to determine whether successively direct-shadow image vegetarian refreshments, therefore, the method for removal direct-shadow image vegetarian refreshments is simple and efficient.
Step 104, according to the foreground image of described binaryzation, obtains the moving target in described input picture.
Concrete, the foreground image of described binaryzation is carried out to morphology processing, to eliminate direct-shadow image vegetarian refreshments discrete in the foreground image of described binaryzation, thereby acquisition does not comprise the foreground image of the binaryzation of discrete direct-shadow image vegetarian refreshments; Then utilize profile algorithm to detect the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments, to obtain the moving target in the foreground image of described binaryzation.
Wherein, owing to also there being some discrete direct-shadow image vegetarian refreshments in the foreground image of binaryzation, here, also need the foreground image of described binaryzation to carry out morphology processing, eliminate direct-shadow image vegetarian refreshments discrete in the foreground image of described binaryzation.
The method of the foreground image of described binaryzation being carried out to morphology processing can be:
First, the foreground image of described binaryzation is carried out to morphological dilations processing, morphological dilations processing refers to all background pixel points that contact with moving target is merged in moving target, be border to the process of outside expansion, can be used for filling the hole region in the foreground image of described binaryzation.For example, can utilize 3 × 3 structural element, each pixel in the foreground image of scanning binaryzation, utilize each pixel of the foreground image of the binaryzation of this structural element and its covering to carry out AND-operation, if operating result is all 0, this pixel is 0, otherwise, this pixel is 1, thereby makes the foreground image of binaryzation expand a circle.
Then, the foreground image of the binaryzation obtaining after morphological dilations is processed carries out border tracking or marginal point connects, obtain the border of each connected region in the foreground image of binaryzation, thereby obtain the relevant information of each connected region, as the area of connected region, size etc., like this, foreground image by the binaryzation to through morphological dilations processing carries out morphological erosion processing, area be can remove and certain threshold value or connected region in irregular shape are less than, thereby can eliminate the shadows pixels region in the foreground image of described binaryzation, so just can further eliminate direct-shadow image vegetarian refreshments discrete in the foreground image of binaryzation, in the foreground image of the binaryzation finally obtaining, do not comprise discrete direct-shadow image vegetarian refreshments, thereby can avoid the follow-up false moving target that gets.
For example, please refer to Fig. 4, the schematic diagram of the foreground image of its acquisition morphology binaryzation after treatment providing for the embodiment of the present invention, Fig. 3 (b) is the foreground image of binaryzation, Fig. 4 is the foreground image of morphology binaryzation after treatment.Comparison diagram 3(b) and Fig. 4, after morphology is processed, direct-shadow image vegetarian refreshments discrete in the foreground image of binaryzation is also eliminated.
The foreground image of binaryzation obtaining after can utilizing profile algorithm to process morphology detects, and to obtain the boundary rectangle frame of the moving target in the foreground image of described binaryzation, this moving target is exactly the moving target in input picture.Wherein, the method that the foreground image of the binaryzation that the profile algorithm utilizing obtains after morphology is processed detects is: each pixel in the foreground image of the binaryzation obtaining after morphology is processed travels through, connect wherein adjacent pixel, like this, just can obtain the profile of each moving target in the foreground image of binaryzation; Then for the profile of each moving target obtaining, search the pixel of transverse axis coordinate x maximum in this profile and the pixel of transverse axis coordinate x minimum, thereby determine left margin and the right margin of the boundary rectangle frame of this moving target, in like manner, search the pixel of vertical pivot coordinate y maximum in this profile and the pixel of vertical pivot coordinate y minimum, thereby determine coboundary and the lower boundary of the boundary rectangle frame of this moving target; Finally, according to left margin, right margin, coboundary and the lower boundary of moving target, obtain corresponding boundary rectangle frame.
In video monitoring system, detecting after moving target, need to utilize and indicate this moving target, please refer to Fig. 5 (a)~Fig. 5 (b), it,, for detecting the schematic diagram of moving target in the embodiment of the present invention, as shown in Fig. 5 (a) and Fig. 5 (b), can utilize boundary rectangle collimation mark to know to indicate the moving target detecting, in addition, can also utilize the mark such as ellipse or arrow to indicate moving target.In the embodiment of the present invention, only describe as an example of external rectangle frame example.Detecting after moving target, can provide the coordinate on four summits of boundary rectangle frame or length and the width of the coordinate of top left corner apex and boundary rectangle frame to tracking and recognition unit, so that tracking and recognition unit carry out tracking and the identification of described moving target.
The embodiment of the present invention further provides the device embodiment that realizes each step and method in said method embodiment.
Please refer to Fig. 6, the functional block diagram of its image processing equipment providing for the embodiment of the present invention.As shown in the figure, this equipment comprises:
Image input block 601, for obtaining input picture, described input picture comprises at least one first pixel;
Input processing unit 602, for according to whole described the first pixels, obtains foreground image and background image;
Difference processing unit 603, for according to described input picture and described background image, obtains difference image;
Binary conversion treatment unit 604, for binary-state threshold, described foreground image and described difference image according to default, obtains the foreground image of binaryzation;
Object detection unit 605, for the foreground image according to described binaryzation, obtains the moving target in described input picture.
Wherein, described difference processing unit 603 specifically for:
The difference of the brightness value that obtains each described the first pixel in described input picture and the brightness value of the second pixel corresponding in described background image; The coordinate in described background image is identical with corresponding described the second pixel for the coordinate of each described the first pixel in described input picture;
According to the absolute value of described difference, obtain the luminance difference score value that each coordinate is corresponding;
According to described luminance difference score value, obtain described difference image; Described difference image comprises at least one the 3rd pixel, and the brightness value of each described the 3rd pixel equals luminance difference score value corresponding to the coordinate of the 3rd pixel in described difference image.
Wherein, described binary conversion treatment unit 604 specifically for: according to described difference image and default gradient operator, obtain the Grad of each described the 3rd pixel in described difference image; According to Grad and the described foreground image of described binary-state threshold, each described the 3rd pixel, obtain the foreground image of binaryzation.
Wherein, described binary conversion treatment unit 604 specifically for:
The Grad of each described the 3rd pixel and described binary-state threshold are compared;
If the Grad of described the 3rd pixel is greater than described binary-state threshold, judge whether the brightness value of the 4th pixel corresponding in described foreground image equals the maximal value of brightness value; If the brightness value of the 4th corresponding pixel equals the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the maximal value of brightness value; If the brightness value of the 4th corresponding pixel is not equal to the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value;
If the Grad of described the 3rd pixel is less than or equal to described binary-state threshold, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value.
Wherein, described object detection unit 605 specifically for: the foreground image of described binaryzation is carried out to morphology processing, to obtain the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments; Utilize profile algorithm to detect the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments, to obtain the moving target in the foreground image of described binaryzation.
Wherein, described object detection unit 605 specifically for: the foreground image of described binaryzation is carried out to morphological dilations processing, to fill the hole region in the foreground image of described binaryzation; Foreground image to the binaryzation through morphological dilations processing carries out morphological erosion processing.
Due to the method for the each unit in the present embodiment shown in can execution graph 1, the part that the present embodiment is not described in detail, can be with reference to the related description to Fig. 1.
Please refer to Fig. 7, the structural representation of its image processing equipment providing for the embodiment of the present invention.As shown in the figure, this equipment comprises:
Receiver 701, for obtaining input picture, described input picture comprises at least one first pixel;
Storer 702, for storing one or more groups program code;
Processor 703, is coupled respectively with connecing storer 702 and receiver 701, for calling the program code of storer 702 storages, to carry out the method shown in following Fig. 1, specifically comprises: according to whole described the first pixels, obtain foreground image and background image; According to described input picture and described background image, obtain difference image; According to default binary-state threshold, described foreground image and described difference image, obtain the foreground image of binaryzation; According to the foreground image of described binaryzation, obtain the moving target in described input picture.
Due to the method for the processor 703 in the present embodiment shown in can execution graph 1, the part that the present embodiment is not described in detail, can be with reference to the related description to Fig. 1.
Can be found out by above description, the method and apparatus that the embodiment of the present invention provides possesses following advantage:
1, embodiment of the present invention technical scheme is to utilize the Grad of direct-shadow image vegetarian refreshments in difference image to be less than the principle of the Grad of the pixel of moving target, according to the Grad of pixel, obtain the foreground image of binaryzation, thereby the foreground image based on binaryzation completes the detection of moving target, do not need each pixel in foreground image to take a decision as to whether successively direct-shadow image vegetarian refreshments, therefore computing method are simple, moving target can from input picture, be detected efficiently.
2, only the luminance component of pixel in input picture and background image is processed, greatly reduced the data volume of processing; And only luminance component is carried out to subtraction, and do not need to carry out multiplication and division computing, therefore computation complexity reduces greatly.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.

Claims (12)

1. an acquisition methods for moving target in image, is characterized in that, described method comprises:
Obtain input picture, described input picture comprises at least one first pixel;
According to whole described the first pixels, obtain foreground image and background image;
According to described input picture and described background image, obtain difference image;
According to default binary-state threshold, described foreground image and described difference image, obtain the foreground image of binaryzation;
According to the foreground image of described binaryzation, obtain the moving target in described input picture.
2. method according to claim 1, is characterized in that, the described input picture of described foundation and described background image obtain difference image, comprising:
The difference of the brightness value that obtains each described the first pixel in described input picture and the brightness value of the second pixel corresponding in described background image; The coordinate in described background image is identical with corresponding described the second pixel for the coordinate of each described the first pixel in described input picture;
According to the absolute value of described difference, obtain the luminance difference score value that each coordinate is corresponding;
According to described luminance difference score value, obtain described difference image; Described difference image comprises at least one the 3rd pixel, and the brightness value of each described the 3rd pixel equals luminance difference score value corresponding to the coordinate of the 3rd pixel in described difference image.
3. method according to claim 1 and 2, is characterized in that, binary-state threshold, described foreground image and described difference image that described foundation is default, and the foreground image of acquisition binaryzation, comprising:
According to described difference image and default gradient operator, obtain the Grad of each described the 3rd pixel in described difference image;
According to Grad and the described foreground image of described binary-state threshold, each described the 3rd pixel, obtain the foreground image of binaryzation.
4. method according to claim 3, is characterized in that, the Grad of the described binary-state threshold of described foundation, each described the 3rd pixel and described foreground image, and the foreground image of acquisition binaryzation, comprising:
The Grad of each described the 3rd pixel and described binary-state threshold are compared;
If the Grad of described the 3rd pixel is greater than described binary-state threshold, judge whether the brightness value of the 4th pixel corresponding in described foreground image equals the maximal value of brightness value; If the brightness value of the 4th corresponding pixel equals the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the maximal value of brightness value; If the brightness value of the 4th corresponding pixel is not equal to the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value;
If the Grad of described the 3rd pixel is less than or equal to described binary-state threshold, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value.
5. according to the method described in any one in claim 1 to 4, it is characterized in that, the foreground image of the described binaryzation of described foundation, obtains the moving target in described input picture, comprising:
The foreground image of described binaryzation is carried out to morphology processing, to obtain the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments;
Utilize profile algorithm to detect the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments, to obtain the moving target in the foreground image of described binaryzation.
6. method according to claim 5, is characterized in that, described the foreground image of described binaryzation is carried out to morphology processing, to obtain the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments, comprising:
The foreground image of described binaryzation is carried out to morphological dilations processing, to fill the hole region in the foreground image of described binaryzation;
Foreground image to the binaryzation through morphological dilations processing carries out morphological erosion processing.
7. the equipment that obtains of moving target in image, is characterized in that, described equipment comprises:
Image input block, for obtaining input picture, described input picture comprises at least one first pixel;
Input processing unit, for according to whole described the first pixels, obtains foreground image and background image;
Difference processing unit, for according to described input picture and described background image, obtains difference image;
Binary conversion treatment unit, for binary-state threshold, described foreground image and described difference image according to default, obtains the foreground image of binaryzation;
Object detection unit, for the foreground image according to described binaryzation, obtains the moving target in described input picture.
8. equipment according to claim 7, is characterized in that, described difference processing unit specifically for:
The difference of the brightness value that obtains each described the first pixel in described input picture and the brightness value of the second pixel corresponding in described background image; The coordinate in described background image is identical with corresponding described the second pixel for the coordinate of each described the first pixel in described input picture;
According to the absolute value of described difference, obtain the luminance difference score value that each coordinate is corresponding;
According to described luminance difference score value, obtain described difference image; Described difference image comprises at least one the 3rd pixel, and the brightness value of each described the 3rd pixel equals luminance difference score value corresponding to the coordinate of the 3rd pixel in described difference image.
9. according to the equipment described in claim 7 or 8, it is characterized in that, described binary conversion treatment unit specifically for:
According to described difference image and default gradient operator, obtain the Grad of each described the 3rd pixel in described difference image;
According to Grad and the described foreground image of described binary-state threshold, each described the 3rd pixel, obtain the foreground image of binaryzation.
10. equipment according to claim 9, is characterized in that, described binary conversion treatment unit specifically for:
The Grad of each described the 3rd pixel and described binary-state threshold are compared;
If the Grad of described the 3rd pixel is greater than described binary-state threshold, judge whether the brightness value of the 4th pixel corresponding in described foreground image equals the maximal value of brightness value; If the brightness value of the 4th corresponding pixel equals the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the maximal value of brightness value; If the brightness value of the 4th corresponding pixel is not equal to the maximal value of brightness value in described foreground image, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value;
If the Grad of described the 3rd pixel is less than or equal to described binary-state threshold, the brightness value of pixel corresponding in the foreground image of binaryzation is set to the minimum value of brightness value.
11. according to the equipment described in any one in claim 7 to 10, it is characterized in that, described object detection unit specifically for:
The foreground image of described binaryzation is carried out to morphology processing, to obtain the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments;
Utilize profile algorithm to detect the foreground image of the binaryzation that does not comprise discrete direct-shadow image vegetarian refreshments, to obtain the moving target in the foreground image of described binaryzation.
12. equipment according to claim 11, is characterized in that, described object detection unit specifically for:
The foreground image of described binaryzation is carried out to morphological dilations processing, to fill the hole region in the foreground image of described binaryzation;
Foreground image to the binaryzation through morphological dilations processing carries out morphological erosion processing.
CN201410033664.8A 2014-01-24 2014-01-24 Method and device for acquiring moving object in image Pending CN103793923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410033664.8A CN103793923A (en) 2014-01-24 2014-01-24 Method and device for acquiring moving object in image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410033664.8A CN103793923A (en) 2014-01-24 2014-01-24 Method and device for acquiring moving object in image

Publications (1)

Publication Number Publication Date
CN103793923A true CN103793923A (en) 2014-05-14

Family

ID=50669546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410033664.8A Pending CN103793923A (en) 2014-01-24 2014-01-24 Method and device for acquiring moving object in image

Country Status (1)

Country Link
CN (1) CN103793923A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651824A (en) * 2015-10-28 2017-05-10 富士通株式会社 Shadow detection device and shadow detection method
CN106780435A (en) * 2016-11-18 2017-05-31 郑州云海信息技术有限公司 A kind of object count method and device
CN107194953A (en) * 2017-05-18 2017-09-22 中国科学院长春光学精密机械与物理研究所 The detection method and device of moving target under a kind of dynamic background
CN107680117A (en) * 2017-09-28 2018-02-09 江苏东大金智信息系统有限公司 A kind of concentration video construction method based on irregular object boundary object
CN107844285A (en) * 2017-11-03 2018-03-27 中广热点云科技有限公司 A kind of giant-screen scenic picture splicing display method
CN108898057A (en) * 2018-05-25 2018-11-27 广州杰赛科技股份有限公司 Track method, apparatus, computer equipment and the storage medium of target detection
CN110728810A (en) * 2019-09-30 2020-01-24 熵康(深圳)科技有限公司 Distributed target monitoring system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101236606A (en) * 2008-03-07 2008-08-06 北京中星微电子有限公司 Shadow cancelling method and system in vision frequency monitoring
CN101901486A (en) * 2009-11-17 2010-12-01 华为技术有限公司 Method for detecting moving target and device thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101236606A (en) * 2008-03-07 2008-08-06 北京中星微电子有限公司 Shadow cancelling method and system in vision frequency monitoring
CN101901486A (en) * 2009-11-17 2010-12-01 华为技术有限公司 Method for detecting moving target and device thereof

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
HONG LIU 等: "Shadow Elimination in Traffic Video Segmentation", 《MVA2007 IAPR CONFERENCE ON MACHINE VISION APPLICATIONS》 *
叶丽燕 等: "基于梯度特征的阴影检测方法", 《计算机技术与发展》 *
陈大伟 等: "复杂静态背景下多移动目标实时检测系统的FPGA实现", 《吉林大学学报(工学版)》 *
马德智 等: "基于高斯混合模型的运动目标检测方法研究", 《电子测量技术》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651824A (en) * 2015-10-28 2017-05-10 富士通株式会社 Shadow detection device and shadow detection method
CN106780435A (en) * 2016-11-18 2017-05-31 郑州云海信息技术有限公司 A kind of object count method and device
CN107194953A (en) * 2017-05-18 2017-09-22 中国科学院长春光学精密机械与物理研究所 The detection method and device of moving target under a kind of dynamic background
CN107680117A (en) * 2017-09-28 2018-02-09 江苏东大金智信息系统有限公司 A kind of concentration video construction method based on irregular object boundary object
CN107680117B (en) * 2017-09-28 2020-03-24 江苏东大金智信息系统有限公司 Method for constructing concentrated video based on irregular target boundary object
CN107844285A (en) * 2017-11-03 2018-03-27 中广热点云科技有限公司 A kind of giant-screen scenic picture splicing display method
CN107844285B (en) * 2017-11-03 2020-09-08 中广热点云科技有限公司 Large screen scene picture splicing display method
CN108898057A (en) * 2018-05-25 2018-11-27 广州杰赛科技股份有限公司 Track method, apparatus, computer equipment and the storage medium of target detection
CN110728810A (en) * 2019-09-30 2020-01-24 熵康(深圳)科技有限公司 Distributed target monitoring system and method
CN110728810B (en) * 2019-09-30 2021-08-17 熵康(深圳)科技有限公司 Distributed target monitoring system and method

Similar Documents

Publication Publication Date Title
CN103793923A (en) Method and device for acquiring moving object in image
CN110443210B (en) Pedestrian tracking method and device and terminal
CN106960208B (en) Method and system for automatically segmenting and identifying instrument liquid crystal number
US9530045B2 (en) Method, system and non-transitory computer storage medium for face detection
CN101236606B (en) Shadow cancelling method and system in vision frequency monitoring
US7639878B2 (en) Shadow detection in images
CN111179232A (en) Steel bar size detection system and method based on image processing
GB0326374D0 (en) Object detection in images
CN108133216B (en) Nixie tube reading identification method capable of realizing decimal point reading based on machine vision
CN104282011A (en) Method and device for detecting interference stripes in video images
CN114127784A (en) Method, computer program product and computer readable medium for generating a mask for a camera stream
CN102663384A (en) Curve identification method based on Bezier control point searching and apparatus thereof
CN108961262B (en) Bar code positioning method in complex scene
CN114627561B (en) Dynamic gesture recognition method and device, readable storage medium and electronic equipment
CN113449639A (en) Non-contact data acquisition method for instrument by gateway of Internet of things
US20200193561A1 (en) Automatic Detection, Counting, and Measurement of Lumber Boards Using a Handheld Device
US10115028B2 (en) Method and device for classifying an object in an image
CN111476804A (en) Method, device and equipment for efficiently segmenting carrier roller image and storage medium
CN109816720B (en) Road center detection method, airborne equipment and storage medium
CN106650735A (en) Automatic positioning and recognition method for LED characters
CN104715250A (en) Cross laser detection method and device
CN113628202A (en) Determination method, cleaning robot and computer storage medium
JP2014157453A (en) Image processing apparatus, image processing method, and image processing program
KR102150661B1 (en) Method and Apparatus for Preprocessing Image for Detecting Objects
CN103985135A (en) License plate location method based on difference edge images

Legal Events

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

Application publication date: 20140514

RJ01 Rejection of invention patent application after publication