This application claims the benefit of Korean Patent Application No. 10-2010-0068588 filed on Jul. 15, 2010, and Korean Patent Application No. 10-2011-0059649 filed on Jun. 20, 2011, in the Korean Intellectual Property Office, the disclosures of which are incorporated herein in their entireties by reference.
1. Field
Methods and apparatus consistent with exemplary embodiments relate to a method and a camera for detecting a region having a specific shape, and more particularly, to a method and a camera for detecting a region having a specific shape by which input image data is processed in the camera to detect the region having the specific shape.
2. Description of the Related Art
A camera, for example, a surveillance camera or a digital camera, may function to process input image data and detect a region having a specific shape, for example, a region of the human's face or a region of a license plate of a vehicle. The above-described function of the camera may be employed in many fields.
For example, a digital camera may correct a skin tone of the detected region of the human's face or remove defects from the detected region of the human's face. Also, only when the face turns towards a front surface of the camera by measuring an angle of the detected region of the human's face, the camera may capture an image or perform an auto-focus (AF) operation.
A surveillance camera may detect a face region and perform a surveillance function or pursue a motion track only when a human appears on the camera. Thus, unnecessary calculation amounts and storage spaces may be reduced.
When the surveillance camera watches an automated teller machine (ATM), the surveillance camera may determine a human's face during withdrawal of cash, the surveillance camera may prevent the withdrawal of cash when the human's face is disguised, and enable the withdrawal of the cash when the human's face is normally exposed.
Meanwhile, in another example, a surveillance camera may precisely detect a region of a license plate of a vehicle and aid in the capture of vehicles that violate traffic regulations.
Referring to
Since a gradation 70 of a left-upper pixel is greater than a gradation 60 of a central pixel, binary data of a first bit (bit number 0, least significant bit (LSB) may be “1”.
Since a gradation 20 of a middle-upper pixel is less than the gradation 60 of the central pixel, binary data of a second bit (bit number 1) may be “0”. Similarly, since the gradation 20 of a right-upper pixel is less than the gradation 60 of the central pixel, binary data of a third bit (bit number 2) may be “0”.
Since a gradation 120 of a right-middle pixel is greater than the central pixel, binary data of the fourth bit (bit number 3) may be “1”. Similarly, when the gradation 120 of a right-lower pixel is greater than the gradation 60 of the central pixel, binary data of a fifth bit (bit number 4) may be “1”.
Since the gradation 20 of a middle-lower pixel is less than the gradation 60 of the central pixel, binary data of a sixth bit (bit number 5) may be “0”. Since the gradation 20 of a left-lower pixel is less than the gradation 60 of the central pixel, binary data of a seventh bit (bit number 6) may be “0”. Similarly, since a gradation 50 of a left-middle pixel is less than the gradation 60 of the central pixel, binary data of an eighth bit (bit number 7) may be “0”.
The above-described method of forming the LBP may be expressed as in Equation 1:
wherein xc, yc denotes central coordinates of each of the local regions 11, ic denotes the gradation 60 of the central pixel, and in denotes each of the gradations of pixels disposed adjacent to the central pixel. Function of s(in−ic) is “1” when (in−ic) is zero (0) or more, and is “0” when (in−ic) is less than 0.
When a camera detects a region having a specific shape using an LBP as described above, since a gradation pattern is not directly used, the camera may be robust against a variation of illumination.
However, when a gradation difference between adjacent pixels is exceptionally great in an interfacial region having a specific shape, LBP values may be also exceptionally increased. Thus, detecting a region having a specific shape may be difficult under the circumstances of limited learning result data.
For example, when a human as a subject for photography wears very dark glasses at a high luminous intensity or wears very bright makeup at a low luminous intensity, detecting a face region may be difficult.
Similarly, when a license plate of a vehicle is against a very dark background in very bright light or is against a very bright background in very dark light, detecting a region of the license plate of the vehicle may be difficult.
One or more exemplary embodiments provide a method of detecting a region having a specific shape, which may work in a variety of illumination settings and detect a region having a specific shape even if a gradation difference between adjacent pixels is exceptionally great in an interface region having a specific shape.
According to an aspect of an exemplary embodiment, there is provided a method of detecting a region having a specific shape including processing input image data in a camera and detecting a region having a specific shape. The method includes (a) calculating gradation differences between a central pixel and respective peripheral pixels in each of local regions of an image frame, (b) comparing an average gradation difference with each of the gradation differences and obtaining values of a local gradient pattern (LGP) based on a comparison result in each of the local regions, and (c) detecting the region having the specific shape from the image frame using the LGP values obtained from the respective local regions.
The above and/or other features and advantages of the present disclosure will become more apparent by describing in detail certain exemplary embodiments thereof with reference to the attached drawings in which:
Certain exemplary embodiments will be described more fully hereinafter with reference to the accompanying drawings.
Referring to
The OPS including a lens unit and a filter unit may optically process light emitted from a subject.
The lens unit of the OPS may include a zoom lens and a focus lens. The filter unit of the OPS may include an optical low pass filter (OLPF) used in a night operation mode and an infrared cut filter (IRF) used in a daytime operation mode. The OLPF may remove radio-frequency (RF) optical noise, and the IRF may cut off an IR component of incident light.
The OEC, which is a charge coupled device (CCD) type or a complementary metal-oxide-semiconductor (CMOS) type, may convert light emitted by the OPS into an electric analog signal. Here, the DSP 207 may control the timing circuit 202 and control operations of the OEC and the CDS-ADC 201.
The CDS-ADC 201 may process an analog image signal from the optoelectric converter OEC to remove radio-frequency (RF) noise from the analog image signal and adjust the amplitude of the analog image signal and convert the processed analog image signal into a digital image signal. The digital image signal may be transmitted to the digital signal processor 207.
The digital signal processor 207 serving as a main controller may process the digital image signal transmitted from the CDS-ADC 201 and generate digital image data classified into a luminance signal and a chromaticity signal.
The video-signal generator 208 may convert digital image data generated by the digital signal processor 207 into a video signal SVID, which is an analog image signal.
The digital signal processor 207 serving as a main controller may communicate with host devices, for example, computers, via a communication interface 212 and a communication channel DCOM and transmit the video signal SVID from the video-signal generator 208 through a video signal channel to the host devices.
Meanwhile, the micro-computer 213 may control the driver 210 and drive the iris motor MA, the zoom motor MZ, the focus motor MF, the filter motor MD, the panning motor MP, and the tilting motor MT. Also, the micro-computer 213 may control the illuminator 215 and irradiate illumination light to a transparent cover (not shown).
The iris motor MA may drive an iris diaphragm, the zoom motor MZ may drive a zoom lens, and the focus motor MF may drive a focus lens. The filter motor MD may drive the OLPF and the IRF.
The panning motor MP may rotate the OPS rightward and leftward. The tilting motor MT may rotate the OPS upward and downward.
Hereinafter, a shape detection method performed by a digital signal processor 207 serving as a main controller will be described with reference to
When data of an image frame is input (operation S31), the digital signal processor 207 may calculate gradation differences between a gradation 60 of a central pixel and gradations of respective peripheral pixels in each of local regions 41 of an image frame (operation S32).
In addition, the DSP 207 may compare the average gradation difference with each of the gradation differences and obtain values 42 and 43 of the LGP based on a comparison result (operation S33).
Also, the DSP 207 may detect a region having a specific shape, for example, a region of the human's face or a region of a license number of a vehicle, from an image frame using values 43 of the LGP obtained from the respective local regions 41.
Operations S31 through S35 may be repetitively performed.
That is, the region having the specific shape may be detected from the image frame using the values of the LGP. Accordingly, a camera may perform well under a variation of illumination using a texture pattern instead of directly using a gradation pattern.
In addition, each of the LGP values may include gradient information regarding gradation differences in each of the local regions. That is, each of the LGP values may include information regarding each of the gradation differences to the average gradation difference.
Accordingly, even if the gradation difference between the adjacent pixels becomes exceptionally great in the interfacial region having the specific shape, since the LGP values are not increased, difficulty of detecting the region having the specific shape under the circumstances of limited learning result data may be solved.
For example, when a human serving as a subject for photography wears very dark glasses at a high luminous intensity or when the human wears very bright makeup at a low luminous intensity, difficulty of detecting a face region may be solved.
Similarly, when a license plate of a vehicle is against a very dark background in a very bright light or is against a very bright background in a very dark light, difficulty of detecting a region of the license plate of the vehicle may be solved.
In connection with operations S32 and S33, a detailed process of obtaining a value of the LGP from any one local region will now be described below.
Each of the local regions 41 may include nine pixels and have four sides in form of a square, each side having three pixels. That is, the nine pixels may be arranged in form of a 3×3 matrix.
Operation S32 will now be described in detail with reference to
First, a first gradation difference 10 between the gradation 60 of a central pixel and a gradation 70 of a left-upper pixel may be calculated.
Second, a second gradation difference 40 between the gradation 60 of the central pixel and a gradation 20 of a middle-upper pixel may be calculated.
Third, a third gradation difference 40 between the gradation 60 of the central pixel and the gradation 20 of a right-upper pixel may be calculated.
Fourth, a fourth gradation difference 60 between the gradation 60 of the central pixel and a gradation 120 of a right-middle pixel may be calculated.
Fifth, a fifth gradation difference 60 between the gradation 60 of the central pixel and the gradation 120 of a right-lower pixel may be calculated.
Sixth, a sixth gradation difference 40 between the gradation 60 of the central pixel and the gradation 20 of a middle-lower pixel may be calculated.
Seventh, a seventh gradation difference 40 between the gradation 60 of the central pixel and the gradation 20 of a left-lower pixel may be calculated.
Eighth, an eighth gradation difference 10 between the gradation 60 of the central pixel and a gradation 50 of a left-middle pixel may be calculated.
In operation S33, to begin with, an average (37.5) of the first through eighth gradation differences may be calculated. Accordingly, the average may be obtained as expressed in Equation 2:
wherein Δm denotes the average of the gradation differences, ic denotes the gradation 60 of the central pixel, and in denotes each of gradations of pixels disposed adjacent to the central pixel.
Next, each of the gradation differences may be compared with the average (Δm=37.5) of the gradation differences, and an 8-bit value 126 of the LGP may be obtained based on a comparison result.
Here, binary data may be set as “0” when each of the first through eighth gradation differences is less than the average (Δm=37.5), and be set as “1” when each of the first through eighth gradation differences is not less than the average. Thus, the 8-bit value 126 of the LGP may be obtained. 8 bits may be arranged such that binary data obtained based on the result of comparison between the first gradation difference 10 and the average (Δm=37.5) is a least significant bit (LSB), and binary data obtained based on the result of comparison between the eighth gradation difference 10 and the average (Δm=37.5) is a most significant bit (MSB).
More specifically, since the first gradation difference 10 is less than the average (Δm=37.5), binary data of a first bit (bit number 0, the LSB) may e “0”.
Since the second gradation difference 40 is greater than the average (Δm=37.5), binary data of a second bit (bit number 1) may be “1”. Since the third gradation difference 40 is greater than the average (Δm=37.5), binary data of a third bit (bit number 2) may be “1”.
Since the fourth gradation difference 60 is greater than the average (Δm=37.5), binary data of a fourth bit (bit number 3) may be “1”. Since the fifth gradation difference 60 is greater than the average (Δm=37.5), binary data of a fifth bit (bit number 4) may be “1”.
Since the sixth gradation difference 40 is greater than the average (Δm=37.5), binary data of a sixth bit (bit number 5) may be “1”. Since the seventh gradation difference 40 is greater than the average (Δm=37.5), a seventh bit (bit number 6) may be “1”.
Also, since the eighth gradation difference 10 is less than the average (Δm=37.5), binary data of an eighth bit (bit number 7) may be “0”.
The method of forming the LGP may be expressed as in Equation 3:
wherein xc, yc denotes central coordinates of each of the local regions 41, ic denotes the gradation of the central pixel, and in denotes each of gradations of pixels disposed adjacent to the central pixel. Function of s(|in−ic|−Δm) is “1” when |in−ic|−Δm is 0 or more, and is “0” when |in−ic|−Δm is less than “0”.
Referring to
However, referring to
In
That is, when a face region is detected using the images of the LGP of
The entire shape detection method to which the shape detection method of
When data of an image frame is input (FRin) (operation S81), a DSP 207 serving as a main controller may obtain respective gradation data of a series of image frames having different sizes, which may range from an image frame having the smallest size (FRminp) to an image frame having the greatest size (FRmaxp) (operation S82).
In addition, the DSP 207 may perform operations S32 and S33 of
Also, the DSP 207 may scan the LGP values FRming to FRmaxg of the respective image frames using a sub-window and detect a region having a specific shape (e.g., a face region) in operation S34 of
Operations S81 to S84 may be repetitively performed until an end signal is generated (operation S85).
In operation S84, to determine whether any one region to which the sub-window is applied is the region having the specific shape (e.g., the face region), when the sub-window is a non-shape region (e.g., a non-face region), non-shape weights of the LGP values, for example, learning result data (101, etc.) of the non-face weights (WT1 etc.), may be applied to specific positions of the sub-window.
Here, the learning result data may be a plurality of learning result data (101, etc.) obtained when reference data of non-shape weights (e.g., non-face weights (WT1, etc.)) have different precisions. Also, learning result data having a lowest precision through learning result data having a highest precision may be applied in a sequential order to any one region to which the sub-window is applied.
Initially, the DSP 207 serving as a main controller may add up first non-face weights WT1 of LGP values obtained at first specific positions SW1 of the sub-window (operation S901).
Next, when a sum H1 of the first non-face weights WT1 is not less than a first reference value T1 (operation S902), the DSP 207 may determine that a current region of the sub-window is a non-face region (operation S912) and end the process. Here, the end of the process may refer to transferring the sub-window to the next region.
When the sum H1 is less than the first reference value T1 in operation S902, the DSP 207 may add up second non-face weights of the respective LGP values obtained at second specific positions SW2 of the sub-window (operation S903).
Next, when a sum H2 of the second non-face weights is not less than a second reference value T2 (operation S904), the DSP 207 may determine that a current region of the sub-window is a non-face region (operation S912) and end the process.
The above-described process may be applied likewise to a sum H3 of third non-face weights and a third reference value T3 corresponding to third specific positions SW3 of the sub-window and a sum H4 of fourth non-face weights and a fourth reference value T4 corresponding to fourth specific positions SW4 of the sub-window.
When the sum H4 of the fourth non-face weights obtained at the fourth specific positions SW4 of the sub-window is less than the fourth reference value T4, the DSP 207 may add up fifth non-face weights of LGP values obtained at fifth specific positions SW5 of the sub-window (operation S909).
When a sum H5 of the fifth non-face weights is not less than a fifth reference value T5 (operation S910), the DSP 207 may determine that a current region of the sub-window is a non-face region (operation S912) and end the process.
When the sum H5 is less than the fifth reference value T5 (operation S910), the DSP 207 may determine that the current region of the sub-window is the face region (operation S911).
The method of
In a case where learning result data of any one of the specific positions SW1 to SW5 of the sub-window is applied, when it is determined that any one region to which the sub-window is applied is a non-shape region, for example, a non-face region, the non-shape region (e.g., the non-face region) may be finally determined without applying the next learning result data. Also, when it is determined that any one region to which the sub-window is applied is a region having a specific shape, for example, a face region, the next learning result data may be applied.
Here, in a case where learning result data having a highest degree of precision is finally applied, when it is determined that any one region to which the sub-window is applied is a region having a specific shape, for example, a face region, the region having the specific shape may be finally determined (refer to operations 910 to S911 of
According to the determination method of
Naturally, the method of
According to the shape detection method as explained thus far, a region having a specific shape can be detected from an image frame using LGP value newly named. Thus, a camera can be robust against a variation of illumination using a texture pattern instead of directly using a gradation pattern.
In addition, each of the LGP values may include gradient information regarding gradation differences in a local region. That is, each of the LGP values may include information regarding each of the gradation differences to the average gradation difference.
Thus, even if a gradation difference between adjacent pixels becomes exceptionally great in an interfacial region having a specific shape, LGP values are not increased so that the region having the specific shape cannot be detected under circumstances of limited learning result data.
For example, when a human serving as a subject for photography wears very dark glasses at a high luminous intensity or when the human wears very bright makeup at a low luminous intensity, difficulty of detecting a face region may be solved.
Similarly, when a license plate of a vehicle is against a very dark background in a very bright daytime or is against a very bright background in a very dark nighttime, difficulty of detecting a region of the license plate of the vehicle may be solved.
has Although a few exemplary embodiments have been shown and described, it will be understood by those of ordinary skill in the art that various changes in form and details may be made to the exemplary embodiments without departing from the spirit and scope of the inventive concept as defined by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2010-0068588 | Jul 2010 | KR | national |
10-2011-0059649 | Jun 2011 | KR | national |
Number | Name | Date | Kind |
---|---|---|---|
8429168 | Chechik et al. | Apr 2013 | B1 |
20060029291 | Sun et al. | Feb 2006 | A1 |
20070291999 | Ito et al. | Dec 2007 | A1 |
20080166026 | Huang et al. | Jul 2008 | A1 |
20090052798 | Kwon et al. | Feb 2009 | A1 |
20100014122 | Massicot et al. | Jan 2010 | A1 |
20100135574 | Buscema | Jun 2010 | A1 |
20110268319 | Niskanen et al. | Nov 2011 | A1 |
20120183177 | Ku et al. | Jul 2012 | A1 |
Number | Date | Country |
---|---|---|
3638028 | Jan 2005 | JP |
2009-123081 | Jun 2009 | JP |
10-0484141 | Apr 2005 | KR |
10-0559471 | Mar 2006 | KR |
10-0866792 | Oct 2008 | KR |
Entry |
---|
Baochang Zhang; Yongsheng Gao; Sanqiang Zhao; Jianzhuang Liu, “Local Derivative Pattern Versus Local Binary Pattern: Face Recognition With High-Order Local Pattern Descriptor,” Image Processing, IEEE Transactions on , vol. 19, No. 2, pp. 533,544, Feb. 2010. |
Xiaoyang Tan and Bill Triggs, “Enhanced Local Texture Feature Sets for Face Recognition Under Difficult Lighting Conditions”, Springer-Verlag Berlin Heidelberg 2007. |
Number | Date | Country | |
---|---|---|---|
20120014607 A1 | Jan 2012 | US |