# US 2008/0292142 A1 · Method and apparatus to segment motion area in real-time to detect motion in surveillance camera system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0292142 A1
- Document ID: US20080292142A1
- Status: Published application
- Kind: A1
- Application number: 11/942,089
- Filed: 2007-11-19
- Published: 2008-11-27
- Earliest claimed: 2007-05-23
- Assignees: Samsung Electronics Co., Ltd.
- Inventors: Hyen-kyun WOO; Jin-keun Seo; Min-ok Lee
- Web page: https://patentgrep.com/patent/US20080292142A1

## CPC

- G06T 7/254: involving subtraction of images
- G06T 7/215: Motion-based segmentation
- G06T 2207/10016: Video; Image sequence
- G06T 2207/20161: Level set
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A method and apparatus to segment a motion area in real-time to detect motion in a surveillance camera system are provided. The method includes updating a background image by using a previous input image from among an input image sequence, generating a difference image between a current image of the image sequence and the background image, generating a second function to minimize a first function including regularized energy in the motion area of the difference image and regularized energy in an area without motion of the difference image and segmenting the motion area based on the second function. Therefore, while noise is removed, the motion area is segmented accurately and rapidly even in a low illumination environment so as to detect a moving object.

## Claims

### Claim 1

A method of segmenting a motion area, the method comprising:
updating a background image by using a previous input image from an input image sequence;
generating a difference image between a current image of the image sequence and the background image;
generating a second function to minimize a first function comprising regularized energy in the motion area of the difference image and regularized energy in an area without motion of the difference image; and
segmenting the motion area based on the second function.

### Claim 2 (depends on 1)

The method of claim 1, wherein the regularized energy in a motion area of the difference image uses the difference between a first standard value that is based on an average value of the motion area and the difference image and the regularized energy in an area without motion of the difference image uses the difference between a second standard value that is based on an average value of the area without motion and the difference image.

### Claim 3 (depends on 1)

The method of claim 1, wherein each one of the regularized energies of the motion area and the area without motion is the energy of the motion area and the energy of the area without motion, respectively, divided by a sum of the energy of the motion area and the energy of the area without motion.

### Claim 4 (depends on 1)

The method of claim 1, wherein the updating a background image comprises:
adding a result obtained by multiplying the previous input image by a first weight to a result obtained by multiplying the previous input image by a second weight, wherein a sum of the first weight and the second weight is 1.

### Claim 5 (depends on 1)

The method of claim 1, wherein the segmenting a motion area comprises:
determining a pixel of the difference image in which a second function value is greater than 0 as a pixel of the motion area;
determining a pixel of the difference image in which a second function value is less than 0 as a pixel of the area without motion;
determining a pixel of the difference image in which a second function value is 0 as a pixel of a boundary of the motion area; and
when a number of pixels in which the second function value is greater than 0 is above a predetermined threshold, determining that motion is detected in the current image.

### Claim 6 (depends on 1)

The method of claim 1, wherein the first function comprises:
noise energy using a function related to a partial differential value of the second function.

### Claim 7 (depends on 1)

The method of claim 1, wherein the generating the second function comprises:
adjusting a frequency of iteration by adjusting a converged value of the second function after a range of the second function is limited; and
obtaining the second function by iteration.

### Claim 8 (depends on 7)

The method of claim 7, wherein the second function is obtained in real-time by using a previous second function, a partial differential equation of the difference image, energy in which energy of a motion image is regularized based on the second function, and a function in which energy of an image without motion is regularized based on the second function, by the iteration.

### Claim 9 (depends on 8)

The method of claim 8, wherein each one of the regularized energies of the motion area and the area without motion is the energy of the motion area and the energy of the area without motion, respectively, divided by a sum of the energy of the motion area and the energy of the area without motion.

### Claim 10 (depends on 2)

The method of claim 2, wherein the first standard value is adjusted according to the noise level of the difference image based on the average value of the motion area.

### Claim 11 (depends on 2)

The method of claim 2, wherein the second function has an initial value that is the second standard value of the previous difference image from among the difference image.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
determining that a sudden light change exists when a differential value in the respective area without motion of the previous difference image and the current image from among the difference image is above a predetermined threshold.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
detecting motion based on the segmented motion area by simultaneously performing noise removal.

### Claim 14 (depends on 1)

The method of claim 1, wherein thresholding is performed by obtaining the second function to minimize the first function, wherein the first function is E(φ) and the second function is φ, and when u is the difference image, P+(φ, u) and P−(φ, u) are the standard values respectively in the region where the second function φ is greater than 0 and less than 0, depending on the second function φ and the difference image u, H(s) is a step function, wherein H(s)=1 when s≧0 and H(s)=0 when s<0, Φ is a predetermined function, and α, λ1, and λ2 are variables in which the difference image is considered,
E

(
φ
)
=
∫
Ω

Φ

(

∇
φ

)


x
+
λ
1

∫
Ω

H

(
α
+
φ
)

(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2

φ

(
x
)
λ
1

(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2
+
λ
2

(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2


x
-
λ
2

∫
Ω

H

(
α
-
φ
)

(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2

φ

(
x
)
λ
1

(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2
+
λ
2

(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2


x

### Claim 15 (depends on 13)

The method of claim 13, wherein the first function E(φ) uses a diffusional partial differential equation of
∂
∂
t

φ

(
x
,
t
)
=
∇
·
(
Φ
′

(

∇
φ

)

∇
φ


∇
φ
)
-
λ
1

(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2

(
H

(
α
+
φ
)
+
φ


H
′

(
α
+
φ
)
)
(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2
+
(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2
+
λ
2

(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2

(
H

(
α
-
φ
)
-
φ


H
′

(
α
-
φ
)
)
(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2
+
(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2
order to obtain the second function φ to minimize the first function E(φ).

### Claim 16

An apparatus to segment a motion area, the apparatus comprising:
an input unit to receive an image sequence;
a background image generation unit to update a background image by using a previous input image from among the image sequence;
a difference image generation unit to generate a difference image between a current image and the background image of the image sequence;
a function generation unit to generate a second function to minimize a first function, the first function comprising regularized energy of the motion area of the difference image and regularized energy of an area without motion of the difference image; and
a motion segmentation unit to segment the motion area based on the second function.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the function generation unit comprises:
a first standard value generation unit to generate a first standard value based on an average value of the motion area;
a second standard value generation unit to generate a second standard value based on an average value of the area without motion; and
a second function generation unit to obtain the second function by using the regularized energy in the motion area in which the difference between the first standard value and the difference image is used and the regularized energy in the area without motion in which a difference between the second standard value and the difference image is used; and
an adjusting unit to adjust a frequency of iteration by adjusting a converged value of the second function after a range of the second function is limited; and
an obtaining unit to obtain the second function by iteration,
wherein the second function is obtained in real-time by using a previous second function, a partial differential equation of the difference image, energy in which energy of motion image is regularized based on the second function, and a function in which energy of an image without motion is regularized based on the second function, by the iteration,
and the first standard value is adjusted according to the noise level of the difference image based on the average value of the motion area,
and each one of the regularized energies of the motion area and the area without motion is the energy of the motion area and the energy of the area without motion, respectively, divided by a sum of the energy of the motion area and the energy of the area without motion.

### Claim 18 (depends on 16)

The apparatus of claim 16, wherein each one of the regularized energies of the motion area and the area without motion is the energy of the motion area and the energy of the area without motion, respectively, divided by a sum of the energy of the motion area and the energy of the area without motion.

### Claim 19 (depends on 16)

The apparatus of claim 16, wherein, in the background image generation unit, a result obtained by multiplying the previous image by a first weight is added to the result obtained by multiplying the previous image by a second weight, wherein a sum of the first weight and the second weight is 1.

### Claim 20 (depends on 16)

The apparatus of claim 16, wherein the motion segmentation unit comprises:
a determining unit to determine a pixel of the difference image in which a second function value is greater than 0 as a pixel of the motion area, a pixel of the difference image in which a second function value is less than 0 as a pixel of the area without motion, and a pixel of the difference image in which a second function value is 0 as a pixel of a boundary of the motion area; and
a motion segmentation unit to determine that motion is detected in the current image, when a number of pixels in which the second function value is greater than 0 is above a predetermined threshold.

### Claim 21 (depends on 17)

The apparatus of claim 17, wherein the first function comprises:
noise energy using a function related to a partial differential value of the second function,
and the second function has an initial value that is the second standard value of the previous difference image from among the difference images.

### Claim 22 (depends on 15)

The apparatus of claim 15, further comprising:
a light change detection unit to determine that a sudden light change exists when a differential value in the respective area without motion of the previous difference image and the current image from among the difference images is above a predetermined threshold.

### Claim 23 (depends on 16)

The apparatus of claim 16, further comprising:
motion detector unit to detect motion based on the segmented motion area by simultaneously performing noise removal.

### Claim 24 (depends on 15)

The apparatus of claim 15, wherein thresholding is performed by obtaining the second function to minimize the first function, wherein the first function is E(φ) and the second function is φ, and when u is the difference image, P+(φ, u) and P−(φ, u) are the standard values respectively in the region where the second function φ is greater than 0 and less than 0, depending on the second function φ and the difference image u, H(s) is a step function, wherein H(s)=1 when s≧0 and H(s)=0 when s<0 Φ is a predetermined function, and α, λ1, and λ2 are variables in which the difference image is considered,
E

(
φ
)
=
∫
Ω

Φ

(

∇
φ

)


x
+
λ
1

∫
Ω

H

(
α
+
φ
)

(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2

φ

(
x
)
λ
1

(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2
+
λ
2

(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2


x
-
λ
2

∫
Ω

H

(
α
+
φ
)

(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2

φ

(
x
)
λ
1

(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2
+
λ
2

(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2


x
wherein the first function E(φ) uses a diffusional partial differential equation of
∂
∂
t

φ

(
x
,
t
)
=
∇
·
(
Φ
′

(

∇
φ

)

∇
φ


∇
φ
)
-
λ
1

(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2

(
H

(
α
+
φ
)
+
φ


H
′

(
α
+
φ
)
)
(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2
+
(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2
+
λ
2

(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2

(
H

(
α
-
φ
)
-
φ


H
′

(
α
-
φ
)
)
(
u

(
x
)
-
P
+

(
φ
,
u
)
)
2
+
(
u

(
x
)
-
P
-

(
φ
,
u
)
)
2
order to obtain the second function φ to minimize the first function E(φ)

### Claim 25

A computer readable recording medium having embodied thereon a computer program to execute a method, the method includes:
updating a background image by using a previous input image from an input image sequence;
generating a difference image between a current image of the image sequence and the background image;
generating a second function to minimize a first function comprising regularized energy in a motion area of the difference image and regularized energy in an area without motion of the difference image; and
segmenting the motion area based on the second function.
