JP2011022656A - Image processor and image processing program - Google Patents
Image processor and image processing program Download PDFInfo
- Publication number
- JP2011022656A JP2011022656A JP2009164825A JP2009164825A JP2011022656A JP 2011022656 A JP2011022656 A JP 2011022656A JP 2009164825 A JP2009164825 A JP 2009164825A JP 2009164825 A JP2009164825 A JP 2009164825A JP 2011022656 A JP2011022656 A JP 2011022656A
- Authority
- JP
- Japan
- Prior art keywords
- coefficient
- target pixel
- value
- image
- dither
- 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
Links
- 230000002093 peripheral effect Effects 0.000 claims abstract description 8
- 238000000034 method Methods 0.000 description 21
- 238000003384 imaging method Methods 0.000 description 10
- 230000000694 effects Effects 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 1
- 238000012886 linear function Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Abstract
Description
本発明は、画像処理装置及び画像処理プログラムに関する。 The present invention relates to an image processing apparatus and an image processing program.
カメラでの撮影時、被写界中に際だって高輝度な物体が存在すると、撮影した画像の一部が白飛びする。この白飛び部分(ハイライト部)は、他の部分と異なり階調が全く無いので、階調段差により、その輪郭が浮き出して観察者に不自然な印象を与える。 When shooting with a camera, if there is an extremely bright object in the field, a part of the shot image will be overexposed. Unlike the other portions, the whiteout portion (highlight portion) has no gradation at all, so that the contour is raised due to the gradation step, giving an unnatural impression to the observer.
特許文献1には、その輪郭を目立たなくする信号処理技術が開示されている。この技術は、飽和レベルに近い信号へ意図的にランダムノイズを加算するものである。これによって、ハイライト部の周辺にディザ効果(ざらつき感)を与え、その輪郭を曖昧にすることができる。
しかし、この信号処理技術をそのままデジタルカメラへ適用しても、その適用方法や使用状況などにより、必ずしもディザ効果が現れないことがわかった。また、ディザ効果が現れなくても良い部分に現れるおそれがあった。 However, it has been found that even if this signal processing technique is applied to a digital camera as it is, the dither effect does not necessarily appear depending on the application method and usage situation. Further, there is a possibility that the dither effect may appear in a portion where it does not have to appear.
そこで、本発明の画像処理装置及び画像処理プログラムは、ハイライト部周辺の階調段差を効果的に目立たなくすることを目的とする。 Therefore, an object of the image processing apparatus and the image processing program of the present invention is to effectively make the gradation step around the highlight portion inconspicuous.
本発明の画像処理装置は、画像中の注目画素の輝度値と、該注目画素の周辺に配置された周辺画素における平均輝度値との差分に基づいて第1係数を求める第1係数生成部と、前記第1係数とは異なる第2係数を前記注目画素に対して無作為に求める第2係数生成部と、前記第1係数及び前記第2係数を用いて、前記注目画素の輝度値を補正するディザ処理部とを備える。
なお、前記ディザ処理部は、少なくとも前記第1係数及び前記第2係数を用いて補正値を算出した後、算出した前記補正値を前記注目画素の輝度値に加算しても良い。
また、前記第1係数は、前記注目画素の輝度値と前記周辺画素の平均輝度値とが等しいときに0となるように設定されるとともに、前記第1係数が0となるとき、前記ディザ処理部により算出される前記補正値は0となっても良い。
また、前記第2係数が取り得る値として0が含まれるとともに、前記第2係数が0となるとき、前記ディザ処理部により算出される前記補正値は0となっても良い。
また、前記注目画素の輝度値に基づく第3係数を求める第3係数生成部をさらに備え、前記ディザ処理部は、前記第1係数及び前記第2係数の他に、前記第3係数を用いて前記補正値を算出しても良い。
また、前記第3係数は、前記注目画素の輝度値が予め定めた閾値以下となるときに0となるように設定されるとともに、前記第3係数が0となるとき、前記ディザ処理部により算出される前記補正値は0となっても良い。
An image processing apparatus according to the present invention includes a first coefficient generation unit that obtains a first coefficient based on a difference between a luminance value of a target pixel in an image and an average luminance value of peripheral pixels arranged around the target pixel. The second coefficient generation unit that randomly obtains a second coefficient different from the first coefficient for the target pixel, and the luminance value of the target pixel is corrected using the first coefficient and the second coefficient A dither processing unit.
The dither processing unit may calculate a correction value using at least the first coefficient and the second coefficient, and then add the calculated correction value to the luminance value of the target pixel.
The first coefficient is set to 0 when the luminance value of the target pixel is equal to the average luminance value of the surrounding pixels, and when the first coefficient is 0, the dither processing is performed. The correction value calculated by the unit may be zero.
Further, 0 may be included as a value that can be taken by the second coefficient, and when the second coefficient becomes 0, the correction value calculated by the dither processing unit may be 0.
The image processing apparatus further includes a third coefficient generation unit that obtains a third coefficient based on the luminance value of the target pixel, and the dither processing unit uses the third coefficient in addition to the first coefficient and the second coefficient. The correction value may be calculated.
The third coefficient is set to be 0 when the luminance value of the pixel of interest is equal to or less than a predetermined threshold, and is calculated by the dither processing unit when the third coefficient is 0. The correction value may be 0.
本発明の画像処理プログラムは、画像中の注目画素の輝度値と、該注目画素の周辺に配置された周辺画素における平均輝度値との差分に基づいて第1係数を求める第1係数生成工程と、前記第1係数とは異なる第2係数を前記注目画素に対して無作為に求める第2係数生成工程と、前記第1係数及び前記第2係数を用いて、前記注目画素の輝度値を補正するディザ処理工程とをコンピュータで実現する。 An image processing program according to the present invention includes a first coefficient generation step for obtaining a first coefficient based on a difference between a luminance value of a target pixel in an image and an average luminance value of peripheral pixels arranged around the target pixel. The second coefficient generation step for randomly obtaining the second coefficient different from the first coefficient for the target pixel, and the luminance value of the target pixel is corrected using the first coefficient and the second coefficient The dither processing step to be performed is realized by a computer.
本発明の画像処理装置及び画像処理プログラムによれば、ハイライト部周辺の階調段差を効果的に目立たなくすることができる。 According to the image processing apparatus and the image processing program of the present invention, the gradation step around the highlight portion can be effectively made inconspicuous.
以下、図面を用いて本発明の実施形態について説明する。なお、本実施形態では、本発明の画像処理装置の一例として、デジタルカメラを用いて説明する。図1は、本発明の実施形態におけるデジタルカメラ10の構成を示すブロック図である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In this embodiment, a digital camera is used as an example of the image processing apparatus of the present invention. FIG. 1 is a block diagram showing a configuration of a
図1に示すように、デジタルカメラ10は、撮像レンズ11、撮像素子12、A/D変換部13、バッファメモリ14、画像処理部15、制御部16、表示部17、操作部18、メモリ19、記録I/F部20、記録媒体21、バス22を備える。
As shown in FIG. 1, the
撮像レンズ11は、撮像素子12の撮像面に被写体像を結像する。なお、撮像レンズ11は、ズームレンズやフォーカスレンズ等の複数のレンズから構成されていても良い。撮像素子12は、撮像レンズ11を通過した被写体光を光電変換し、R、G、Bの各色に対応するアナログの画像信号を出力する。撮像素子12は、後述するレリーズ釦25が全押しされると、被写体についての画像を取得する。なお、画像としては、静止画像の他に、動画像が含まれる。
The imaging lens 11 forms a subject image on the imaging surface of the
撮像素子12から出力される画像信号は、A/D変換部13に入力される。A/D変換部13は、撮像素子12から出力されるアナログの画像信号をA/D変換し、デジタルの画像信号に変更する。なお、このデジタルの画像信号は、1コマにまとめられ、画像データとしてバッファメモリ14に記録される。バッファメモリ14は、画像処理部15による画像処理の前工程や後工程で画像データを一時的に記録する。
An image signal output from the
画像処理部15は、バッファメモリ14に記録された画像データに対して画像処理を施す。なお、この画像処理としては、周知のホワイトバランス調整、色補間、階調変換処理、輪郭強調処理等が挙げられる。また、画像処理部15は、JPEG(Joint Photographic Experts Group)形式等で圧縮する処理や、圧縮された上記のデータを伸長復元する処理をも実行する。例えば、圧縮処理前の階調数は、12bitであり、圧縮処理後の階調数は8bitである。以下、圧縮処理後の画像をJPEG画像と称する。
また、画像処理部15は、係数生成部23、ディザ処理部24の機能を有する。係数生成部23は、JPEG画像に含まれる画素毎に、ルックアップテーブルLUT27、LUT28、LUT29を用いて、ディザ処理に必要な係数A、係数B、係数Cを算出する。係数の算出については、後述する。
ディザ処理部24は、JPEG画像にディザ処理を行う。JPEG画像中の画素は、輝度成分(Y)を示す画像信号値(以下、Y信号値)と、色差成分を示す画像信号値(以下、Cr、Cb信号値)とにより構成される。ディザ処理部24は、下記に示す(1)式に従って、JPEG画像を構成する各画素のY信号値にディザ信号値を加算することにより、ディザ処理を行う。なお、2α は、係数Cの振幅である。
The
The
The
各係数は、以下のように求められる。なお、ディザ処理の対象となる画素を注目画素と称する。また、JPEG画像の横方向をX軸、縦方向をY軸とする。
まず、係数生成部23は、LUT27を用いて、注目画素のY信号値に応じた係数Aを算出する。図2は、LUT27の一例である。なお、横軸はY信号値であり、縦軸は係数Aである。また、JPEG画像の階調数が8bitである場合、0≦Y信号値≦255となる。LUT27は、Y信号値が閾値以下である(図2では、0≦Y信号値≦230)場合、係数A=0となるように設定され、Y信号値が閾値より高い(図2では、230<Y信号値≦255)場合、Y信号値が高いほど、係数Aが大きくなるように設定されている。
次に、係数Bは、以下のように求められる。最初に、係数生成部23は、注目画素を中心とし、縦7画素×横7画素の領域を設定する。そして、係数生成部23は、この領域に含まれる画素であって、注目画素を除く48個の画素のY信号値の平均値を算出し、周辺画素の平均Y信号値とする。さらに、係数生成部23は、下式に従って、差分値Dを算出する。
差分値D=|周辺画素の平均Y信号値−注目画素のY信号値|
そして、係数生成部23は、LUT28を用いて、注目画素のY信号値と周辺画素の平均Y信号値との差分値Dに応じた係数Bを算出する。図3は、LUT28の一例である。なお、横軸は差分値Dであり、縦軸は係数Bである。LUT28は、差分値D=0である場合、係数B=0となるように設定され、差分値Dが大きいほど、係数Bが大きくなるように設定されている。
次に、係数生成部23は、LUT29を用いて、注目画素のX座標値に応じた係数Cを算出する。図4は、LUT29の一例である。なお、横軸はX座標値であり、縦軸はランダムな値に予め決められている係数Cである。例えば、−2α≦係数C≦+2αとする。図4の例では、α=3である。
Each coefficient is obtained as follows. Note that a pixel to be subjected to dither processing is referred to as a target pixel. Also, the horizontal direction of the JPEG image is the X axis and the vertical direction is the Y axis.
First, the
Next, the coefficient B is obtained as follows. First, the
Difference value D = | Average Y signal value of surrounding pixels−Y signal value of target pixel |
Then, the
Next, the
以上説明したように、ディザ信号値は、Y信号値が飽和レベル近傍となる画素であって、該Y信号値と周辺画素の平均Y信号値とに差分がある画素に対し、Y信号値のバラツキを与えるように設定されている。
制御部16は、所定のシーケンスプログラムにしたがって、デジタルカメラ10の統括的な制御を行う。表示部17は、制御部16の制御により各種の画像を表示する。表示部17に表示される各種の画像は、撮像により取得した画像、後述する記録媒体21に記録された画像、メニュー画像等を含む。操作部18は、レリーズ釦25、十字キー26等を有する。メモリ19は、LUT27、LUT28、LUT29などを記録している。レリーズ釦25は、撮像時に操作される。十字キー26は、上記のメニュー画像等で操作される。なお、レリーズ釦25及び十字キー26の状態は制御部16により検知され、検知された釦やキーの状態に基づいたシーケンスが実行される。
As described above, the dither signal value is a pixel in which the Y signal value is near the saturation level, and the Y signal value of the pixel having a difference between the Y signal value and the average Y signal value of the surrounding pixels is It is set to give variation.
The
記録I/F部20は、記録媒体21を接続するためのコネクタを備えている。この記録I/F部20と記録媒体21とが接続されることにより、記録媒体21に対してデータの書き込み/読み出しを実行する。バス22は、バッファメモリ14、画像処理部15、制御部16、表示部17、記録I/F部20を相互に接続することにより、データや信号の出入力を実行する。
The recording I /
図5は、ディザ処理時の流れを示すフローチャートである。 FIG. 5 is a flowchart showing a flow during dither processing.
ステップS101は、JPEG画像を読み出す処理である。制御部16は、ディザ処理の対象となるJPEG画像を記録媒体21から読み出す。
Step S101 is processing for reading a JPEG image. The
ステップS102は、Y信号値を算出する処理である。係数生成部23は、注目画素のY信号値を算出する。
Step S102 is processing for calculating a Y signal value. The
ステップS103は、係数Aを算出する処理である。係数生成部23は、LUT27を用いて、ステップS102で算出したY信号値に応じた係数Aを算出する。
Step S103 is a process for calculating the coefficient A. The
ステップS104は、係数A≠0であるか否かを判定する処理である。係数生成部23は、係数A≠0である場合(ステップS104の判定がYESとなる場合)には、ステップS105に進む。一方、係数生成部23は、係数A=0である場合(ステップS105の判定がNOとなる場合)には、後述するステップS111に進む。
Step S104 is processing for determining whether or not the coefficient A ≠ 0. When the coefficient A is not 0 (when the determination in step S104 is YES), the
ステップS105は、周辺画素の平均Y信号値を算出する処理である。係数生成部23は、注目画素の周辺画素の平均Y信号値を算出する。
Step S105 is processing for calculating the average Y signal value of the peripheral pixels. The
ステップS106は、差分値Dを算出する処理である。係数生成部23は、注目画素のY信号値と周辺画素の平均Y信号値との差分値Dを算出する。
Step S106 is a process of calculating the difference value D. The
ステップS107は、係数Bを算出する処理である。係数生成部23は、LUT28を用いて、ステップS106で算出した差分値Dに応じた係数Bを算出する。
Step S107 is processing for calculating the coefficient B. The
ステップS108は、係数B≠0であるか否かを判定する処理である。係数生成部23は、係数B≠0である場合(ステップS108の判定がYESとなる場合)には、ステップS109に進む。一方、係数生成部23は、係数B=0である場合(ステップS108の判定がNOとなる場合)には、後述するステップS111に進む。
Step S108 is a process for determining whether or not the coefficient B ≠ 0. When the coefficient B ≠ 0 (when the determination in step S108 is YES), the
ステップS109は、X座標値を算出する処理である。係数生成部23は、注目画素のX座標値を算出する。
Step S109 is processing for calculating an X coordinate value. The
ステップS110は、係数Cを算出する処理である。係数生成部23は、LUT29を用いて、ステップS109で算出したX座標値に応じた係数Cを算出する。
Step S110 is a process for calculating the coefficient C. The
ステップS111は、Y’信号値を算出する処理である。ディザ処理部24は、注目画素のY信号値、係数A、係数B、係数Cを用いて、Y’信号値を算出する。なお、ステップS104又はステップS108の判定がNOとなる場合には、ディザ信号値が0になる。そのため、このような画素では、ディザ処理前のY信号値と、ディザ処理後のY’信号値とは同じである。また、係数生成部23は、注目画素のCb、Cr信号値を算出する。
Step S111 is a process of calculating the Y ′ signal value. The
ステップS112は、全ての画素についてY’信号値を算出したか否かを判定する処理である。ディザ処理部24は、全ての画素についてY’信号値を算出した場合(ステップS112の判定がYESとなる場合)には、ステップS113に進む。一方、ディザ処理部24は、全ての画素についてY’信号値を算出していない場合(ステップS112の判定がNOとなる場合)には、ステップS102に戻る。
Step S112 is a process of determining whether or not the Y ′ signal value has been calculated for all the pixels. When the
ステップS113は、ディザ処理後のJPEG画像を記録する処理である。ディザ処理部24は、ステップS111で算出したY’信号値とCb、Cr信号値とを画素毎に合成し、ディザ処理後のJPEG画像を生成する。そして、制御部16は、ディザ処理後のJPEG画像を記録媒体21に記録し、一連の処理を終了する。
例えば、ディザ処理前のJPEG画像30の例を図6(a)に示す。領域Kに含まれる画素のY信号値は全て同じであり、例えば、Y信号値=255とする。同様に、領域Lに含まれる画素のY信号値は全て同じであり、例えば、Y信号値=245とする。また、領域Mに含まれる画素のY信号値は全て同じであり、Y信号値=230とする。また、領域Nに含まれる画素のY信号値は全て同じであり、Y信号値=220とする。図6(b)は、ディザ処理前のJPEG画像30における直線Z上に位置する画素のX座標値とY信号値との対応関係を示す図である。
この場合、領域K、L、Mは、Y信号値が飽和レベル近傍である画素により構成される領域、すなわちハイライト部であり、領域Kと領域LとのY信号値の差分値、及び領域Lと領域MとのY信号値の差分値は大きい。そのため、領域Kと領域Lとの境界、及び領域Lと領域Mとの境界に、階調段差が生じる。
Step S113 is a process of recording the JPEG image after the dither process. The
For example, FIG. 6A shows an example of a JPEG image 30 before dither processing. The Y signal values of the pixels included in the region K are all the same, for example, Y signal value = 255. Similarly, the Y signal values of the pixels included in the region L are all the same, for example, Y signal value = 245. The Y signal values of the pixels included in the region M are all the same, and Y signal value = 230. Further, the Y signal values of the pixels included in the region N are all the same, and Y signal value = 220. FIG. 6B is a diagram showing a correspondence relationship between the X coordinate value and the Y signal value of the pixel located on the straight line Z in the JPEG image 30 before the dither process.
In this case, the regions K, L, and M are regions composed of pixels whose Y signal values are near the saturation level, that is, highlight portions, and the difference values of the Y signal values between the regions K and L, and the regions The difference value of the Y signal value between L and region M is large. Therefore, gradation steps are generated at the boundary between the region K and the region L and at the boundary between the region L and the region M.
図6(c)は、ディザ処理後のJPEG画像30における直線Z上に位置する画素のX座標値とY’信号値との対応関係を示す図である。領域Kと領域Lとの境界、領域Lと境界Mとの境界は、ディザ処理により曖昧になる。一方、領域Kと領域Lとの境界、及び領域Lと境界Mとの境界以外の部分では、Y’信号値は均一のままである。
上述したように、ディザ処理部24は、Y’信号値=Y信号値+(係数A×係数B×係数C)/2αを算出する。例えば、注目画素のY信号値が高いほど、階調段差が目立つので、ディザ処理の必要性が高く、注目画素のY信号値が低いほどディザ処理の必要性は低い。上記の式では、注目画素のY信号値が低い場合、係数A=0となり、注目画素のY信号値が高いほど、係数Aは大きくなる。そのため、ディザ処理部24は、上記の式のように、係数Aを乗じることにより、ハイライト部にのみディザ信号値を加算することができる。
また、注目画素のY信号値と周辺画素の平均Y信号値との差分値Dが大きいほど、階調段差が目立つので、ディザ処理の必要性が高く、差分値Dが小さいほどディザ処理の必要性は低い。上記の式では、差分値D=0である場合、係数B=0となり、差分値Dが大きいほど、係数Bは大きくなる。そのため、ディザ処理部24は、上記の式のように、係数Bを乗じることにより、Y信号値に差がある境界部分にのみディザ信号値を加算することができる。
また、一般的に、被写界の画像には、空間的に近接した画素同士はY信号値も近接するという傾向がある。上記の式では、注目画素のX座標値に応じた係数Cを乗じる。これにより、ディザ処理部24は、近接した画素同士でも、ランダムなディザ信号値を加算することができる。
すなわち、本実施形態のデジタルカメラ10では、ハイライト部周辺以外には、ディザ効果が現れず、ハイライト部周辺にのみディザ効果が現れる。したがって、本実施形態のデジタルカメラ10によれば、ハイライト部周辺の階調段差を効果的に目立たなくすることができる。また、ハイライト部の内側の領域など、ハイライト部周辺以外にディザ効果が現れないため、観察者に自然な印象を与えることができる。
FIG. 6C is a diagram illustrating a correspondence relationship between the X coordinate value and the Y ′ signal value of the pixel located on the straight line Z in the JPEG image 30 after the dither processing. The boundary between the region K and the region L and the boundary between the region L and the boundary M are made ambiguous by the dither processing. On the other hand, the Y ′ signal value remains uniform at the boundary between the region K and the region L and at portions other than the boundary between the region L and the boundary M.
As described above, the
Further, as the difference value D between the Y signal value of the target pixel and the average Y signal value of the surrounding pixels is larger, the gradation step is more conspicuous. Therefore, the necessity of dither processing is higher. The nature is low. In the above formula, when the difference value D = 0, the coefficient B = 0, and the larger the difference value D, the larger the coefficient B. Therefore, the
Further, generally, in an image of the object scene, pixels that are spatially close to each other tend to have Y signal values close to each other. In the above formula, the coefficient C corresponding to the X coordinate value of the target pixel is multiplied. Thus, the
That is, in the
なお、上記の実施形態では、LUT29を用いて、注目画素のX座標値に応じた係数Cを算出する例を示したが、これに限らない。例えば、ディザ処理部24は、注目画素毎に乱数演算を行って、ランダム値を算出し、このランダム値を係数Cとする。
In the above embodiment, an example is shown in which the coefficient C corresponding to the X coordinate value of the target pixel is calculated using the
また、上記の実施形態では、LUT29において、α=3である例を示したが、αの値は、これに限らない。また、ISO感度、彩度、エッジの度合いを加味してαの値を設定しても良い。例えば、ISO感度が高いと画像のSN比は高くなり、画像中のハイライト部周辺の階調段差もあまり目立たない傾向にある。よって、αの値が小さく設定されても問題はない。また、彩度補正の強度が低いほど、αの値を大きくしても良いし、エッジ強調の強度が低いほど、αの値を大きくしても良い。
In the above embodiment, an example in which α = 3 in the
また、上記の実施形態では、周辺画素の平均Y信号値を算出する際に、注目画素を除いた48個の画素のY信号値の平均値を算出する例を示したが、これに限らない。例えば、注目画素を含む49個の画素のY信号値の平均値を算出しても良い。また、縦7画素×横7画素の領域を設定する例を示したが、領域の大きさは、これに限らない。例えば、領域が小さいほど、図6(c)に示すようなY’信号値の刻みが細かくなる。 In the above embodiment, an example is shown in which the average value of the Y signal values of 48 pixels excluding the target pixel is calculated when calculating the average Y signal value of the surrounding pixels. However, the present invention is not limited to this. . For example, an average value of Y signal values of 49 pixels including the target pixel may be calculated. Moreover, although the example which sets the area | region of vertical 7 pixels x horizontal 7 pixels was shown, the magnitude | size of an area | region is not restricted to this. For example, the smaller the region, the finer the Y ′ signal value increments as shown in FIG.
また、上記の実施形態では、LUT27が曲線である例を示したが、これに限らない。例えば、一次関数の直線でも良い。また、230<Y信号値≦240の場合は、係数A=1とし、240<Y信号値≦255の場合は、係数A=2となるように設定しても良い。また、0≦係数A≦2となる例を示したが、係数Aの値は、限定されない。なお、LUT28、係数Bについても同様とする。
In the above-described embodiment, an example in which the
また、上記の実施形態では、係数A、係数B、係数Cの順に、係数を算出する例を示したが、これに限らない。例えば、係数生成部23は、係数B、係数A、係数Cの順に係数を算出しても良いし、3つの係数を併行して算出しても良い。
In the above embodiment, an example is shown in which the coefficients are calculated in the order of the coefficient A, the coefficient B, and the coefficient C. However, the present invention is not limited to this. For example, the
また、上記の実施形態では、係数A、係数B、係数Cを用いて、ディザ信号値を算出する例を示したが、これに限らない。例えば、ディザ処理部24は、係数Aを用いることなく、係数B及び係数Cのみを用いてディザ信号値を算出しても良い。
In the above embodiment, an example in which the dither signal value is calculated using the coefficient A, the coefficient B, and the coefficient C has been described. However, the present invention is not limited to this. For example, the
また、上記の実施形態では、係数A、係数B、係数Cを乗算して、ディザ信号値を算出する例を示したが、これに限らない。例えば、加算、減算、除算などを用いて、係数Aと係数Bと係数Cとのうち、少なくともいずれか1つが0となるときに、ディザ信号値が0となるような式を予め求めておく。そして、ディザ処理部24は、この式により、ディザ信号値を算出しても良い。
In the above embodiment, the dither signal value is calculated by multiplying the coefficient A, the coefficient B, and the coefficient C. However, the present invention is not limited to this. For example, using addition, subtraction, division, or the like, an expression is obtained in advance such that the dither signal value becomes 0 when at least one of coefficient A, coefficient B, and coefficient C is 0. . Then, the
また、上記の実施形態では、デジタルカメラ10を例に挙げて説明したが、これに限らない。例えば、図1に示した以外の構成を有するデジタルカメラにも本発明を同様に適用することができる。また、図1に示す機能や、図5に示すフローチャートの流れを実行することが可能なコンピュータなどの画像処理装置であっても良い。この場合、例えば、メモリカードの記録媒体やデジタルカメラ等などの電子機器と電気的に接続可能にし、これらの記録媒体に記録された画像やデジタルカメラで取得された画像を取り込むことができるような形態であれば良い。また、図1に示す機能や、図5に示すフローチャートの流れをコンピュータにて実行することが可能なプログラムであっても良い。このようなプログラムの場合には、メモリカードや光学ディスクや磁気ディスクなどのコンピュータに読み取り可能な記録媒体に記録されていることが好ましい。
In the above embodiment, the
10…デジタルカメラ、15…画像処理部、16…制御部、23…係数生成部、24…ディザ処理部
DESCRIPTION OF
Claims (7)
前記第1係数とは異なる第2係数を前記注目画素に対して無作為に求める第2係数生成部と、
前記第1係数及び前記第2係数を用いて、前記注目画素の輝度値を補正するディザ処理部と、
を備えたことを特徴とする画像処理装置。 A first coefficient generation unit for obtaining a first coefficient based on a difference between a luminance value of a target pixel in the image and an average luminance value in peripheral pixels arranged around the target pixel;
A second coefficient generation unit that randomly calculates a second coefficient different from the first coefficient for the target pixel;
A dither processing unit that corrects a luminance value of the target pixel using the first coefficient and the second coefficient;
An image processing apparatus comprising:
前記ディザ処理部は、少なくとも前記第1係数及び前記第2係数を用いて補正値を算出した後、算出した前記補正値を前記注目画素の輝度値に加算する
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 1.
The dither processing unit calculates a correction value using at least the first coefficient and the second coefficient, and then adds the calculated correction value to the luminance value of the target pixel.
前記第1係数は、前記注目画素の輝度値と前記周辺画素の平均輝度値とが等しいときに0となるように設定されるとともに、
前記第1係数が0となるとき、前記ディザ処理部により算出される前記補正値は0となる
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 2,
The first coefficient is set to be 0 when the luminance value of the target pixel and the average luminance value of the surrounding pixels are equal,
When the first coefficient is zero, the correction value calculated by the dither processing unit is zero.
前記第2係数が取り得る値として0が含まれるとともに、
前記第2係数が0となるとき、前記ディザ処理部により算出される前記補正値は0となる
ことを特徴とする画像処理装置。 In the image processing device according to any one of claims 2 and 3,
The possible value of the second coefficient includes 0,
The image processing apparatus according to claim 1, wherein when the second coefficient is 0, the correction value calculated by the dither processing unit is 0.
前記注目画素の輝度値に基づく第3係数を求める第3係数生成部をさらに備え、
前記ディザ処理部は、前記第1係数及び前記第2係数の他に、前記第3係数を用いて前記補正値を算出する
ことを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 2 to 4,
A third coefficient generation unit for obtaining a third coefficient based on a luminance value of the target pixel;
The dither processing unit calculates the correction value using the third coefficient in addition to the first coefficient and the second coefficient.
前記第3係数は、前記注目画素の輝度値が予め定めた閾値以下となるときに0となるように設定されるとともに、
前記第3係数が0となるとき、前記ディザ処理部により算出される前記補正値は0となる
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 5.
The third coefficient is set to be 0 when the luminance value of the target pixel is equal to or less than a predetermined threshold,
The image processing apparatus according to claim 1, wherein when the third coefficient is zero, the correction value calculated by the dither processing unit is zero.
前記第1係数とは異なる第2係数を前記注目画素に対して無作為に求める第2係数生成工程と、
前記第1係数及び前記第2係数を用いて、前記注目画素の輝度値を補正するディザ処理工程と、
をコンピュータで実現することを特徴とする画像処理プログラム。 A first coefficient generation step for obtaining a first coefficient based on a difference between a luminance value of a target pixel in the image and an average luminance value in peripheral pixels arranged around the target pixel;
A second coefficient generation step for randomly obtaining a second coefficient different from the first coefficient for the target pixel;
A dither processing step of correcting a luminance value of the target pixel using the first coefficient and the second coefficient;
An image processing program characterized by realizing the above by a computer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009164825A JP2011022656A (en) | 2009-07-13 | 2009-07-13 | Image processor and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009164825A JP2011022656A (en) | 2009-07-13 | 2009-07-13 | Image processor and image processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011022656A true JP2011022656A (en) | 2011-02-03 |
Family
ID=43632700
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009164825A Pending JP2011022656A (en) | 2009-07-13 | 2009-07-13 | Image processor and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011022656A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20220015915A (en) * | 2020-07-31 | 2022-02-08 | 베이징 시아오미 모바일 소프트웨어 컴퍼니 리미티드 | Method and device for image processing, terminal device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005072835A (en) * | 2003-08-22 | 2005-03-17 | Matsushita Electric Ind Co Ltd | Imaging unit and image processor |
WO2005125179A1 (en) * | 2004-06-22 | 2005-12-29 | Nikon Corporation | Image processing device emphasizing on texture, image processing program, electronic camera, and image processing method |
JP2008047102A (en) * | 2006-07-20 | 2008-02-28 | Matsushita Electric Ind Co Ltd | Image processing apparatus and image processing method |
JP2008118462A (en) * | 2006-11-06 | 2008-05-22 | Nikon Corp | Image processing apparatus, imaging apparatus, and image processing program |
JP2008129521A (en) * | 2006-11-24 | 2008-06-05 | Matsushita Electric Ind Co Ltd | Image processing apparatus, image processing method, program for image processing, integrated circuit, and plasma display device |
-
2009
- 2009-07-13 JP JP2009164825A patent/JP2011022656A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005072835A (en) * | 2003-08-22 | 2005-03-17 | Matsushita Electric Ind Co Ltd | Imaging unit and image processor |
WO2005125179A1 (en) * | 2004-06-22 | 2005-12-29 | Nikon Corporation | Image processing device emphasizing on texture, image processing program, electronic camera, and image processing method |
JP2008047102A (en) * | 2006-07-20 | 2008-02-28 | Matsushita Electric Ind Co Ltd | Image processing apparatus and image processing method |
JP2008118462A (en) * | 2006-11-06 | 2008-05-22 | Nikon Corp | Image processing apparatus, imaging apparatus, and image processing program |
JP2008129521A (en) * | 2006-11-24 | 2008-06-05 | Matsushita Electric Ind Co Ltd | Image processing apparatus, image processing method, program for image processing, integrated circuit, and plasma display device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20220015915A (en) * | 2020-07-31 | 2022-02-08 | 베이징 시아오미 모바일 소프트웨어 컴퍼니 리미티드 | Method and device for image processing, terminal device and storage medium |
KR102459527B1 (en) * | 2020-07-31 | 2022-10-27 | 베이징 시아오미 모바일 소프트웨어 컴퍼니 리미티드 | Method and device for image processing, terminal device and storage medium |
US11783450B2 (en) | 2020-07-31 | 2023-10-10 | Beijing Xiaomi Mobile Software Co., Ltd. | Method and device for image processing, terminal device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4831067B2 (en) | Image processing apparatus, image processing method, image processing program product, and imaging apparatus | |
US8170362B2 (en) | Edge-enhancement device and edge-enhancement method | |
JP4875032B2 (en) | Solid-state imaging device | |
JPWO2010053029A1 (en) | Image input device | |
JP4818393B2 (en) | Image processing method and image processing apparatus | |
JP4479527B2 (en) | Image processing method, image processing apparatus, image processing program, and electronic camera | |
US8345121B2 (en) | Image processing apparatus, method, and program | |
JP2011171842A (en) | Image processor and image processing program | |
JP2009200743A (en) | Image processor, image processing method, image processing program and imaging apparatus | |
JP5614256B2 (en) | Imaging apparatus, image processing apparatus, and imaging method | |
JP4438363B2 (en) | Image processing apparatus and image processing program | |
JP5365881B2 (en) | Image processing apparatus and image processing method | |
JP5330291B2 (en) | Signal processing apparatus and imaging apparatus | |
JP2011022656A (en) | Image processor and image processing program | |
JP5213604B2 (en) | Imaging device | |
JP5159647B2 (en) | Image processing apparatus and image processing method | |
JP2006279162A (en) | Method for inputting image and device for inputting image using the same | |
JP5147912B2 (en) | Image processing method, image processing apparatus, program, and recording medium | |
JP2009258284A (en) | Image processing device, imaging apparatus, image processing method, and program | |
CN116266864A (en) | Information processing apparatus, control method thereof, medium, and head-mounted display | |
JP2014086957A (en) | Image processing device and image processing method | |
WO2014192412A1 (en) | Image processing device, imaging device, image processing method and program | |
JP2010199783A (en) | Correction amount calculation system and electronic camera |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120711 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130509 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130514 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130704 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130716 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130903 |