Provided are a system and method for determining a color of a foreground and a computer readable recording medium therefor. The system includes: at least one processor configured to implement a motion detector which detects a motion region from an image; and a color determiner which determines the color of the foreground in the motion region based on a difference between colors of the motion region and colors of a surrounding region of the motion region, for displaying the determined foreground color with the foreground at a display device.
|
9. A method of determining at least one color of a foreground, the method comprising:
detecting a motion region from an image; and
determining the color of the foreground included in the motion region based on a difference between at least one color of the motion region and at least one color of a surrounding region of the motion region, for displaying the determined color with the foreground at a display device,
wherein the determining the color of the foreground comprises:
generating a color histogram of the surrounding region and a color histogram of the motion region;
obtaining a color histogram of the foreground based on a difference between the color histogram of the motion region and the color histogram of the surrounding region; and
determining the color of the foreground from the color histogram of the foreground,
wherein the color of the foreground is a representative color which has the highest frequency in two or more colors of the foreground shown in the color histogram of the foreground.
1. A system for determining at least one color of a foreground, the system comprising:
at least one processor configured to implement:
a motion detector configured to detect a motion region from an image; and
a color determiner configured to
i) determine the color of the foreground included in the motion region based on a difference between at least one color of the motion region and at least one color of a surrounding region of the motion region
ii) generate a color histogram of the surrounding region and a color histogram of the motion region,
iii) obtain a color histogram of the foreground based on a difference between the color histogram of the motion region and the color histogram of the surrounding region, and
iv) determine the color of the foreground from the color histogram of the foreground, for displaying the determined color with the foreground at a display device,
wherein the color of the foreground is a representative color which has the highest frequency in two or more colors of the foreground shown in the color histogram of the foreground.
2. The system of
3. The system of
wherein the color determiner is not configured to determine any color from the second section to determine the color of the surrounding region or the color of the foreground.
4. The system of
5. The system of
6. The system of
7. The system of
8. The system of
10. The method of
11. The method of
wherein the determining the color of the foreground does not comprise determining any color from the second section to determine the color of the surrounding region of the color of the foreground.
12. The method of
determining that the color of the second section is substantially similar to or the same as the color of the surrounding region; and
removing the color of the second section from the color of the motion region to determine the color of the foreground.
13. The method of
14. The method of
15. The method of
determining the color of the motion region and the color of the surrounding region; and
removing the color of the surrounding region from the color of the motion region to determine the color of the foreground.
16. A non-transitory computer readable recording medium storing a program for executing the method of
|
This application claims priority from Korean Patent Application No. 10-2015-0133093, filed on Sep. 21, 2015, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.
1. Field
Apparatuses and methods consistent with exemplary embodiments relate to determining colors of a foreground of an image, and more particularly, to determining foreground colors even from an inaccurately detected foreground in the image.
2. Description of the Related Art
Color determining and sorting techniques are used for determining colors of objects from images and sorting the determined colors. These techniques are widely used in applications such as image analysis and video surveillance including video search, object search, and object tracking.
In the related art, color determination is carried out by calculating a foreground mask of a moving object using a motion detection technique, and determining a dominant color of a region of the foreground mask as a representative color of the object.
The color determination in the related art is significantly affected by the accuracy of foreground mask calculation. However, a calculated foreground mask does not often match a moving object because of algorithmic limitations.
In most algorithms, a foreground mask is set to be calculated to be greater than the actual region of an object, and thus the foreground mask may include background pixels.
For example, although a color that a person intends to perceive in ground truth data is the color of a military uniform (for example, green), a totally different color may be detected, and thus, incorrect results may be obtained in a later video search process.
One or more exemplary embodiments provide a system and method for accurately determining foreground colors even from an inaccurately detected foreground, and a computer readable recording medium therefor.
Various aspects will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the presented embodiments.
According to one or more exemplary embodiments, there is provided a system for determining at least one color of a foreground which may include: a motion detector configured to detect a motion region from an image; and a color determiner configured to determine the color of the foreground included in the motion region based on a difference between at least one color of the motion region and at least one color of a surrounding region of the motion region, for displaying the foreground color with the foreground at a display device.
The color determiner may be further configured to generate a color histogram of the surrounding region and a color histogram of the motion region, obtain a color histogram of the foreground based on a difference between the color histogram of the motion region and the color histogram of the surrounding region, and determine the color of the foreground from the color histogram of the foreground.
The motion region may include a first section corresponding to the foreground and a second section corresponding to a remaining section of the motion region, and the color determiner may be further configured to determine at least one color of the first section as the foreground color.
The system may further include a display device configured to display the foreground color determined by the color determiner on a border of the foreground.
In an image frame including the motion region, the surrounding region may be a region not including the motion region.
According to one or more exemplary embodiments, there is provided a method of determining at least one color of a foreground. The method may include: detecting a motion region from an image; and determining the color of the foreground included in the motion region based on a difference between at least one color of the motion region and at least one color of a surrounding region of the motion region, for displaying the foreground color with the foreground at a display device.
The determining the color of the foreground may include: generating a color histogram of the surrounding region and a color histogram of the motion region; obtaining a color histogram of the foreground based on a difference between the color histogram of the motion region and the color histogram of the surrounding region; and determining the color of the foreground from the color histogram of the foreground.
The motion region may include a first section corresponding to the foreground and a second section corresponding to a remaining section of the motion region, and the determining the foreground color may include determining at least one color of the first section as the foreground color.
The method may further include displaying the color of the foreground determined by the determining the color of the foreground on a border of the foreground.
In an image frame including the motion region, the surrounding region may be a region not including the motion region.
According to one or more exemplary embodiments, a computer readable recording medium stores a program for executing the method of determining the foreground color.
These and/or other aspects will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
Reference will now be made in detail to exemplary embodiments which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout. In this regard, the presented embodiments may have different forms and should not be construed as being limited to the descriptions set forth herein. Accordingly, the exemplary embodiments are merely described below, by referring to the figures, to explain aspects of the inventive concept.
In the following description, the technical terms are used only for explaining the exemplary embodiments while not limiting the inventive concept. The terms of a singular form may include plural forms unless referred to the contrary. The meaning of “include” or “comprise” specifies a property, a fixed number, a step, a process, an element, a component, and a combination thereof but does not exclude other properties, fixed numbers, steps, processes, elements, components, and combinations thereof. It will be understood that although the terms “first” and “second” are used herein to describe various elements, these elements should not be limited by these terms. Terms are only used to distinguish one element from other elements.
Referring to
The motion detector 110 may detect a motion region from an image. The image may be any image obtained or captured using any imaging device capable of capturing images. The image may include a background and a foreground. The motion region may correspond to the foreground of the image and may be detected using a motion detection technique.
In a scene including two regions sharing a boundary, a region that is a subject of perception is referred to as a foreground, and the other region is referred to as a background. Generally, a foreground appears as a front portion, and a background appears as a backward portion. Thus, the terms “foreground” and “background” are used with such meanings. However, this is not always the case. A boundary between a foreground and a background appears to be included in the foreground, and the foreground appears to be well defined compared to the background. In addition, the foreground looks brighter than the background.
In the image shown in
The foreground color determining system 100 of the exemplary embodiment is provided to accurately determine colors of the foreground, and thus if a region corresponding to the foreground is not accurately detected, it may be difficult to accurately determine the colors of the foreground. Here, the colors determined by the foreground color determining system 100 may be one color when the foreground has only one color or a dominant color when the foreground has a plurality of colors.
A motion detection technique may be defined as a process of detecting the position of an object varying relative to the surrounding environment or a method of detecting variations of the surrounding environment relative to a target object. According to the motion detection technique, motions may be detected by a mechanical or electronic method.
An example of a mechanical motion detection technique is a technique related to keyboards. Keys of a keyboard have different positions. If a key is pressed to a certain degree, the key may be turned on, and a letter or digit corresponding to the position of the key may be input.
Examples of an electronic motion detection technique include an optical detection technique and an acoustic detection technique. In the optical detection technique, the motion of an object may be detected using infrared rays or laser beams.
A simple algorithm for detecting motions using an imaging device (such as a camera) is to compare a current image with a reference image and count the number of pixels having different data values. Pixels of the current image having data values different from pixel data values of the reference image may be considered as moving pixels, and a region formed by the moving pixels may be determined as a motion region.
In addition to the above-mentioned techniques, many other techniques may be used to detect motions. However, the accuracy of motion detection using such techniques is often low.
A region corresponding to a foreground has to be accurately detected from an image before determining colors of the foreground, and the accuracy of color determination is significantly affected by the accuracy of a motion detection technique.
Due to this reason, the foreground color determining system 100 of the exemplary embodiment uses the difference between colors of a motion region detected using a motion detection technique and colors of a surrounding region of the motion region.
In
The color determiner 120 determines foreground colors from the motion region based on the difference between colors of the motion region and colors of the surrounding region. Here, the term “colors” indicated in a plural form may represent a single color, depending on an image which is input to the foreground color determining system 100. If a technique used to detect the motion region has low accuracy, the motion region may include a section actually corresponding to the foreground and a section corresponding to the background. In this case, the section of the motion region corresponding to the background, that is, the remaining area of the motion region except the section actually corresponding to the foreground, may have colors similar to colors of the background rather than to colors of the foreground.
Thus, the color determiner 120 may determined the colors of the foreground by removing the colors corresponding to the background from the colors of the motion region. In this manner, although the motion region is inaccurately detected, the foreground color determining system 100 may accurately determine the colors of the foreground.
Information about the colors of the background is needed to remove the colors corresponding to the background from the colors of the motion region. However, the foreground color determining system 100 of the exemplary embodiment is capable of determining the colors of the foreground even when information about the colors of the background is unknown.
To this end, the color determiner 120 may remove colors corresponding to the surrounding region from the colors corresponding to the motion region. In the motion region, the section not included in the foreground may not have the same colors as the colors of the surrounding region. However, the colors of the surrounding region may be similar to the colors of the section of the motion region not included in the foreground rather than to the colors of the foreground. Here, the color determiner 120 may determine that the colors of the section of the motion region not included in the foreground is substantially similar to or the same as the colors of the surrounding region. Thus, the color determiner 120 does not have to or may not be configured to determine any color from the section of the motion region not included in the foreground to determine the colors of the surrounding region and the colors of the foreground, thereby reducing the load of the foreground color determining system 100.
That is, when information about colors of the background is unknown, the colors of the surrounding region expected to be similar to the colors of the background may be used to remove the colors corresponding to the colors of the background from the colors of the motion region.
According to an exemplary embodiment, colors to be determined using the foreground color determining system 100 are colors of the foreground, and in
An operation of separating a region corresponding to the foreground from the frame (image) may first be performed before determining colors of the foreground, and the separated region may correspond to the motion region denoted by a dashed line in
Due to this, the foreground color determining system 100 of the exemplary embodiment determines colors of the motion region including a section corresponding to a background and remove colors of the section corresponding to the background from the colors of the motion region.
For example, the motion region may include a first section corresponding to the foreground and a second section as the remaining region. That is, the first section corresponds to the foreground, and the second section corresponds to the background. It is desired that the motion region detected using the motion detector 110 illustrated in
Thus, it is necessary to remove colors of the second section corresponding to the background from the colors of the motion region so as to determine colors of the first section actually corresponding to the foreground. This may be described by following formula 1.
C_TF=C_MD−C_FF (1),
where C_TF refers to the colors of the first section, C_MD refers to colors of the motion region, and C_FF refers to colors of the second section.
In addition, since the second section corresponds to the background, the colors of the second section may be described by following formula 2.
C_FF=C_BM (2),
where C_BM refers to the colors of the background.
Substitution of formula 2 into formula 1 gives:
C_TF=C_MD−C_BM (3)
Since the colors of the background corresponding to the second section are not obtainable from the image, information to be used instead of colors of the background is necessary. To this end, the foreground color determining system 100 of the current exemplary embodiment uses information about colors of the surrounding region. Therefore, formula 3 may be expressed as follows.
C_TF=C_MD−C_SR (4),
where C_SR refers to colors of the surrounding region.
Actually, C_BM=C_SR is not correct. However, in general 2D images, colors of background pixels close to a foreground are often similar to colors of background pixels that are somewhat distant from the foreground. That is, in 2D images, colors or color distribution of background pixels around a foreground are likely to be similar regardless of the distance from the foreground. Therefore, it may be possible to assume that C_BM≈C_SR.
In the exemplary embodiment, the color determiner 120 may determine colors of the motion region and colors of the surrounding region, and may then remove the colors of the surrounding region from the colors of the motion region, so as to obtain colors of the foreground.
The foreground color detecting operations illustrated in
The color histograms express distribution of pixel values or brightness values of pixels in an image. In each of the color histograms shown in
For example, in the horizontal axis of each of the color histograms shown in
In general color histograms, colors are not always expressed as described above. In another example, the horizontal axis of each of the color histograms may have RGB color coordinates (0, 0, 0) to (2n-1, 2n-1, 2n-1) from the origin to the final color.
As shown in
The color histogram of the motion region shown in
In the color histogram of the foreground obtained as described above, a color having the highest frequency may be determined as the representative color of the foreground. In
Referring to
The color display device 230 displays colors determined by the color determiner 220 on a border of a foreground. In the example shown in
In addition, the color display device 230 may receive an image signal and may display colors of the foreground of an image corresponding to the image signal via a display device capable of displaying the image. In this case, the colors of the foreground may be displayed on the display device, or letters corresponding to the colors of the foreground may be displayed on the display device.
As described with reference to
Referring to
However, the screen illustrated in
The color display device 230 may display letters corresponding to a color determined from a foreground in a peripheral region of the foreground. For example, a color of a foreground may be displayed on a border of a rectangular region including the foreground as shown in
Referring to
The foreground color determination method may be performed using the foreground color determining device, and the foreground color determining device may include substantially the same elements as the elements of the foreground color determining system 100 or 200 described with reference to
The motion region detected in the motion region detecting operation S110 may be a region corresponding to the foreground of the image that the foreground color determining device has captured or received, and the image may be captured using any imaging device capable of capturing images that may include backgrounds and foregrounds.
Therefore, the motion region may be a region corresponding to the foreground of the image. The motion region may be detected by a motion detection technique.
In the foreground color determining operation S120, colors of the foreground of the motion region are determined based on the difference between colors of the motion region and colors of a surrounding region of the motion region. A region corresponding to the foreground has to be accurately detected from the image before determining colors of the foreground, and the accuracy of color determination is significantly affected by the accuracy of a motion detection technique.
Due to this reason, the foreground color determining method of the exemplary embodiment uses the difference between colors of the motion region detected using the motion detection technique and colors of the surrounding region.
If the accuracy of the motion detection technique is low, the motion region may include a section other than a section actually corresponding to the foreground. If the section of the motion region actually corresponding to the foreground is referred to as a first section, and the section of the motion region other than the first section is referred to as a second section, the second section may substantially correspond to the background.
In the foreground color determining operation S120, the colors of the foreground of the motion region are determined based on the difference between the colors of the motion region and the colors of the surrounding region. If a technique used to detect the motion region has low accuracy, the motion region may include a section actually corresponding to the foreground and a section actually corresponding to the background. In this case, the section of the motion region corresponding to the background, that is, the remaining area of the motion region except the region actually corresponding to the foreground, may have colors similar to colors of the background rather than colors of the foreground.
Thus, in the foreground color determining operation S120, colors of the foreground may be determined by removing colors corresponding to colors of the background from colors of the motion region. In this manner, although the motion region is inaccurately detected, colors of the foreground may be accurately determined by the foreground color determining method of the exemplary embodiment.
Information about colors of the background may be necessary to remove colors corresponding to the background from colors of the motion region. However, according to the foreground color determining method of the exemplary embodiment, colors of the foreground may be determined even when information about colors of the background is unknown.
To this end, in the foreground color determining operation S120, colors corresponding to the surrounding region may be removed from colors corresponding to the motion region. In the motion region, the second section not included in the foreground may not have the same colors as the colors of the surrounding region. However, the colors of the surrounding region may be similar to the colors of the second section rather than to the colors of the foreground.
That is, when information about colors of the background is unknown, the colors of the surrounding region expected to be similar to the colors of the background may be used to remove colors corresponding to the colors of the background from the colors of the motion region.
Referring to
In the motion region detecting operation S210, the motion region may be detected from an image using a foreground color determining device. The motion region detected in the motion region detecting operation S210 may be a region corresponding to a foreground of the image that the foreground color determining device has captured or received, and the image may be captured using any imaging device capable of capturing images that may include backgrounds and foregrounds. Therefore, the motion region may be a region corresponding to the foreground of the image, and the motion region may be detected by a motion detection technique.
In the operation 240, the color histogram of the foreground may be obtained based on the difference between the color histogram of the motion region generated in the operation S220 and the color histogram of the surrounding region generated in the operation S230.
As described with reference to
In the foreground color determining method of the exemplary embodiment, color histograms are used for foreground color determination, and in the foreground color determining operation S250, one of colors of the foreground having the highest frequency may be determined as a representative color of the foreground.
Referring to
The operation S310 of detecting the motion region, the operation S320 of generating the color histogram of the motion region, the operation S330 of generating the color histogram of the surrounding region, the operation S340 of obtaining the color histogram of the foreground, and the operation 350 of determining the colors of the foreground are the same as the operation S210 of detecting the motion region, the operation S220 of generating the color histogram of the motion region, the operation S230 of generating the color histogram of the surrounding region, the operation S240 of obtaining the color histogram of the foreground, and the operation S250 of determining the colors of the foreground that are described with reference to
In the foreground color displaying operation S360, the colors determined in the foreground color determining operation S350 may be displayed on a border of the foreground. In the example shown in
Alternatively, in the foreground color displaying operation S360, an image signal may be received, and the colors of the foreground of an image corresponding to the image signal may be displayed using a display device capable of displaying the image. In this case, the colors of the foreground may be displayed on the display device, or letters corresponding to the colors of the foreground may be displayed on the display device.
The inventive concept may also be embodied as computer readable codes on a computer readable recording medium. The computer readable recording medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of the computer readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, and optical data storage. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion. Also, functional programs, codes, and code segments for accomplishing the inventive concept can be easily construed by programmers skilled in the art to which the inventive concept pertains.
Operations constituting a method of an exemplary embodiment may be performed in appropriate order unless explicitly described in terms of order or described to the contrary. That is, operations are not limited to the order in which the operations are described. In the present disclosure, examples or exemplary terms (for example, “such as” and “etc.”) are used for the purpose of description and are not intended to limit the scope of the exemplary embodiments unless defined by the claims. Also, those skilled in the art will readily appreciate that many alternations, combinations, and modifications may be made according to design conditions and factors within the scope of the appended claims and their equivalents.
At least one of the components, elements, modules or units represented by a block as illustrated in
As described above, according to the one or more of the above exemplary embodiments, foreground colors may be accurately determined even from an inaccurately detected foreground using the system, method, and the computer readable recording medium.
It should be understood that exemplary embodiments described herein should be considered in a descriptive sense only and not for purposes of limitation. Descriptions of features or aspects within each exemplary embodiment should typically be considered as available for other similar features or aspects in other exemplary embodiments.
While one or more exemplary embodiments have been described with reference to the drawings, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the inventive concept as defined by the following claims.
Yin, ShiMin, Jung, Jikhan, Ku, Jayeong
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
5432545, | Jan 08 1992 | Color detection and separation method | |
20120051594, | |||
20160328856, | |||
JP2009164949, | |||
KR1020050030254, | |||
KR1020120019008, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Jan 08 2016 | YIN, SHIMIN | HANWHA TECHWIN CO , LTD | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 037800 | /0725 | |
Jan 08 2016 | JUNG, JIKHAN | HANWHA TECHWIN CO , LTD | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 037800 | /0725 | |
Jan 08 2016 | KU, JAYEONG | HANWHA TECHWIN CO , LTD | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 037800 | /0725 | |
Feb 23 2016 | HANWHA TECHWIN CO., LTD. | (assignment on the face of the patent) | / | |||
Apr 01 2018 | HANWHA TECHWIN CO , LTD | HANWHA AEROSPACE CO , LTD | CHANGE OF NAME SEE DOCUMENT FOR DETAILS | 046927 | /0019 | |
Apr 01 2018 | HANWHA TECHWIN CO , LTD | HANWHA AEROSPACE CO , LTD | CORRECTIVE ASSIGNMENT TO CORRECT THE APPLICATION NUMBER 10 853,669 IN ADDITION PLEASE SEE EXHIBIT A PREVIOUSLY RECORDED ON REEL 046927 FRAME 0019 ASSIGNOR S HEREBY CONFIRMS THE CHANGE OF NAME | 048496 | /0596 | |
Apr 17 2019 | HANWHA AEROSPACE CO , LTD | HANWHA TECHWIN CO , LTD | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 049013 | /0723 | |
Feb 28 2023 | HANWHA TECHWIN CO , LTD | HANWHA VISION CO , LTD | CHANGE OF NAME SEE DOCUMENT FOR DETAILS | 064549 | /0075 |
Date | Maintenance Fee Events |
May 24 2021 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Date | Maintenance Schedule |
Dec 26 2020 | 4 years fee payment window open |
Jun 26 2021 | 6 months grace period start (w surcharge) |
Dec 26 2021 | patent expiry (for year 4) |
Dec 26 2023 | 2 years to revive unintentionally abandoned end. (for year 4) |
Dec 26 2024 | 8 years fee payment window open |
Jun 26 2025 | 6 months grace period start (w surcharge) |
Dec 26 2025 | patent expiry (for year 8) |
Dec 26 2027 | 2 years to revive unintentionally abandoned end. (for year 8) |
Dec 26 2028 | 12 years fee payment window open |
Jun 26 2029 | 6 months grace period start (w surcharge) |
Dec 26 2029 | patent expiry (for year 12) |
Dec 26 2031 | 2 years to revive unintentionally abandoned end. (for year 12) |