IP Library Granted Patent US 10,692,225
Granted Patent B2
US 10,692,225 · App. 15/917,565 · Granted Jun 23, 2020

System and method for detecting moving object in an image

Inventors: Lili Zhao (Beijing, CN); Zhao Li (Beijing, CN)
Assignee: SHANGHAI XIAOYI TECHNOLOGY CO., LTD.
G06T7/254G06K9/38G06K9/6212G06K9/46G06K2009/4666
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,692,225
App. No.
15/917,565
Granted
Jun 23, 2020
Kind
B2
Abstract

A moving object detection method and apparatus are disclosed. The method may include: obtaining a first image and a second image of a scene; determining a difference of the first image and the second image; performing a binarization operation on the difference of the first image and the second image, to generate a binary image; determining the number of pixels whose values are nonzero in each column of the binary image, to generate a column pixel histogram; and determining whether a moving object is present in the scene based on the column pixel histogram.

Claims (72)

1. A method for detecting moving objects in an image, comprising:

obtaining a first image and a second image of a scene;

subtracting pixel values of the first image by pixel values of the second image, to generate difference values, and generating a difference image using absolute values of the determined difference values;

in the difference image, setting pixel values less than a threshold to be zero, and setting pixel values greater than or equal to the threshold to be a preset nonzero value, to generate a binary image;

determining, in each column of the binary image, the number of pixels whose values are nonzero, to generate a column pixel histogram; and

determining whether a moving object is present in the scene based on the column pixel histogram.

2. The method according to claim 1 , wherein determining whether a moving object is present in the scene based on the column pixel histogram comprises:

determining the number of crests in the column pixel histogram; and

determining whether a moving object is present in the scene based on the number of crests.

3. The method according to claim 2 , wherein:

a y-axis of the column pixel histogram corresponds to the number of pixels whose values are nonzero in each column of the binary image;

an x-axis of the column pixel histogram corresponds to the columns of the binary image; and

determining the number of crests in the column pixel histogram comprises:

traversing all columns of the column pixel histogram; and

if the column pixel histogram includes a first column whose y-coordinate value is greater than a crest threshold,

determining a second column which is separate from the first column by a set distance along the x-axis, and

increasing the number of crests by one when a difference between the y-coordinate value of the first column and a y-coordinate value of the second column is greater than a set difference threshold.

4. The method according to claim 3 , wherein only one crest is retained within a set range along the x-axis of the column pixel histogram.

5. The method according to claim 2 , wherein determining whether a moving object is present in the scene based on the number of crests comprises:

when the number of crests is less than a minimum number threshold or greater than a maximum number threshold, determining that a moving object is present in the scene.

6. The method according to claim 1 , wherein:

a y-axis of the column pixel histogram corresponds to the number of pixels whose values are nonzero in each column of the binary image; and

determining whether a moving object is present in the scene based on the column pixel histogram comprises:

determining whether a moving object is present in the scene based on an effective column ratio, the effective column ratio being a ratio of the number of columns in the column pixel histogram whose y-coordinate values are greater than a crest threshold to the number of columns in the column pixel histogram whose y-coordinate values are greater than a noise threshold.

7. The method according to claim 6 , wherein determining whether a moving object is present in the scene based on the effective column ratio comprises:

when the effective column ratio is less than a ratio threshold, determining that a moving object is present in the scene.

8. The method according to claim 1 , wherein determining, in each column of the binary image, the number of pixels whose values are nonzero comprises:

performing an erosion operation on the binary image to obtain an eroded image;

determining, in the eroded image, the number of pixels whose values are nonzero; and

when the number of pixels in the eroded image whose values are nonzero is greater than a first set threshold, determining, in each column of the binary image, the number of pixels whose values are nonzero.

9. The method according to claim 8 , further comprising:

when the number of pixels in the eroded image whose values are nonzero is less than or equal to the first set threshold, obtaining new images of the scene to generate the column pixel histogram.

10. The method according to claim 1 , wherein the first image and the second image are two adjacent image frames in an infrared video.

11. An apparatus comprising:

a memory storing instructions; and

a processor configured to execute the instructions to:

obtain a first image and a second image of a scene;

subtract pixel values of the first image by pixel values of the second image, to generate difference values, and generate a difference image using absolute values of the determined difference values;

in the difference image, set pixel values less than a threshold to be zero, and set pixel values greater than or equal to the threshold to be a preset nonzero value, to generate a binary image;

determine the number of pixels whose values are nonzero in each column of the binary image, to generate a column pixel histogram; and

determine whether a moving object is present in the scene based on the column pixel histogram.

12. The apparatus according to claim 11 , wherein the processor is further configured to execute the instructions to:

determine the number of crests in the column pixel histogram; and

determine whether a moving object is present in the scene based on the number of crests.

13. The apparatus according to claim 12 , wherein:

a y-axis of the column pixel histogram corresponds to the number of pixels whose values are nonzero in each column of the binary image;

an x-axis of the column pixel histogram corresponds to the columns of the binary image; and

the processor is further configured to execute the instructions to:

traverse all columns of the column pixel histogram; and

if the column pixel histogram includes a first column whose y-coordinate value is greater than a crest threshold,

determine a second column which is separate from the first column by a set distance along the x-axis, and

increase the number of crests by one when a difference between the y-coordinate value of the first column and a y-coordinate value of the second column is greater than a set difference threshold.

14. The apparatus according to claim 12 , wherein in determining whether a moving object is present in the scene based on the number of crests, the processor is further configured to execute the instructions to:

when the number of crests is less than a minimum number threshold or greater than a maximum number threshold, determine that a moving object is present in the scene.

15. The apparatus according to claim 11 , wherein:

a y-axis of the column pixel histogram corresponds to the number of pixels whose values are nonzero in each column of the binary image; and

the processor is further configured to execute the instructions to:

determine whether a moving object is present in the scene based on an effective column ratio, the effective column ratio being a ratio of the number of columns in the column pixel histogram whose y-coordinate values are greater than a crest threshold to the number of columns in the column pixel histogram whose y-coordinate values are greater than a noise threshold.

16. The apparatus according to claim 15 , wherein in determining whether a moving object is present in the scene based on the effective column ratio, the processor is further configured to execute the instructions to:

when the effective column ratio is less than a ratio threshold, determine that a moving object is present in the scene.

17. The apparatus according to claim 11 , wherein the processor is further configured to execute the instructions to:

perform an erosion operation on the binary image to obtain an eroded image;

determine, in the eroded image, the number of pixels whose values are nonzero; and

when the number of pixels in the eroded image whose values are nonzero is greater than a first set threshold, determine, in each column of the binary image, the number of pixels whose values are nonzero.

18. The apparatus according to claim 17 , wherein the processor is further configured to execute the instructions to:

when the number of pixels in the eroded image whose values are nonzero is less than or equal to the first set threshold, obtain new images of the scene to generate the column pixel histogram.

19. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform a moving object detection method comprising:

obtaining a first image and a second image of a scene;

subtracting pixel values of the first image by pixel values of the second image, to generate difference values, and generating a difference image using absolute values of the determined difference values;

in the difference image, setting pixel values less than a threshold to be zero, and setting pixel values greater than or equal to the threshold to be a preset nonzero value, to generate a binary image;

determining the number of pixels whose values are nonzero in each column of the binary image, to generate a column pixel histogram; and

determining whether a moving object is present in the scene based on the column pixel histogram.

Assignments (4)
RELEASE OF SECURITY INTEREST Recorded Nov 5, 2024
From: EAST WEST BANK
To: KAMI VISION INCORPORATED
Reel/Frame 070792/0551 →
INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Mar 28, 2022
From: KAMI VISION INCORPORATED
To: EAST WEST BANK
Reel/Frame 059512/0101 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 1, 2022
From: SHANGHAI XIAOYI TECHNOLOGY CO., LTD.
To: KAMI VISION INC.
Reel/Frame 059275/0652 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 12, 2018
From: ZHAO, LILI; LI, ZHAO
To: SHANGHAI XIAOYI TECHNOLOGY CO., LTD.
Reel/Frame 045178/0227 →
Priority Claims (1)
CN 2017 1 0137069 · Mar 9, 2017 · national
Continuity (1)
Related Publication 20180260964A1 · Sep 13, 2018