JP5256236B2 - Image processing apparatus and method, and image processing program - Google Patents
Image processing apparatus and method, and image processing program Download PDFInfo
- Publication number
- JP5256236B2 JP5256236B2 JP2010070595A JP2010070595A JP5256236B2 JP 5256236 B2 JP5256236 B2 JP 5256236B2 JP 2010070595 A JP2010070595 A JP 2010070595A JP 2010070595 A JP2010070595 A JP 2010070595A JP 5256236 B2 JP5256236 B2 JP 5256236B2
- Authority
- JP
- Japan
- Prior art keywords
- target pixel
- image
- processing target
- luminance
- pixel
- 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.)
- Expired - Fee Related
Links
Landscapes
- Image Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
Description
この発明は,画像処理装置および方法,ならびに画像処理プログラムに関する。 The present invention relates to an image processing apparatus and method, and an image processing program.
ディジタル・スチル・カメラ等による撮像によって得られた画像中にパープルフリンジが視認されることがある。高輝度の被写体(たとえば,光源)が撮像されることで輝度差(輝度勾配)の大きな輪郭(エッジ)が撮像画像中に存在する場合に,画像輪郭の周辺にパープルフリンジは生じやすい。 Purple fringes may be visually recognized in an image obtained by imaging with a digital still camera or the like. When a high brightness subject (for example, a light source) is imaged and a contour (edge) having a large luminance difference (luminance gradient) is present in the captured image, purple fringes tend to occur around the image contour.
特許文献1および特許文献2には,画像データを縮小した縮小画像データを生成してパープルフリンジ補正を行うものが記載されている。画像データを縮小するのでパープルフリンジの検出精度は悪くなってしまう。 Patent Documents 1 and 2 describe a technique that generates reduced image data obtained by reducing image data and performs purple fringe correction. Since the image data is reduced, the purple fringe detection accuracy deteriorates.
特許文献3には画像サイズ(画素数)に応じたサイズの平滑化フィルタまたはメジアンフィルタを用いて色にじみを低減するものが記載されている。また,特許文献3には色にじみ画素のうちのエッジ画素を判断することが記載されている。しかし,エッジ画素かどうかの判断において隣接画素同士の色差成分の変化の度合いが用いられており,画像輪郭の周辺に広がりをもって生じたパープルフリンジを精度良く検出できない。 Japanese Patent Application Laid-Open No. H10-228561 describes a technique for reducing color blur using a smoothing filter or a median filter having a size corresponding to an image size (number of pixels). Patent Document 3 describes that an edge pixel among color blur pixels is determined. However, the degree of change in color difference component between adjacent pixels is used in determining whether or not the pixel is an edge pixel, and purple fringes that are spread around the image contour cannot be detected with high accuracy.
この発明は,パープルフリンジが発生している可能性のある画素を精度よく検出することを目的とする。 An object of the present invention is to accurately detect pixels in which purple fringes may occur.
この発明による画像補正装置は,与えられる画像データの入力を受付ける画像入力手段,サイズによって処理対象画素とその処理対象画素の周囲に位置する輝度算出対象画素との距離を定める,互いに異なるサイズを有する複数のカーネルを,一方が他方を包含する位置関係を保ったまま,上記画像入力手段によって受付けられた画像データによって表される処理対象画像上を走査させることによって,処理対象画素ごとかつ上記カーネルごとに,水平方向,垂直方向および2つの斜め方向のそれぞれについて,上記処理対象画素を中心にして対称位置にある輝度算出対象画素の輝度差を算出する輝度差算出手段,ならびに上記輝度差算出手段によって算出された複数の輝度差のうち最も大きな輝度差を所定の閾値と比較する比較手段を備え,上記比較手段によって最大輝度差が上記閾値よりも大きいと判断された場合に,上記処理対象画素がパープルフリンジを発生している画素であるかどうかの判断に進むことを特徴とする。 An image correction apparatus according to the present invention has different sizes for determining the distance between a pixel to be processed and a luminance calculation target pixel located around the pixel to be processed according to the size of image input means for receiving input of given image data. By scanning a plurality of kernels on a processing target image represented by image data received by the image input means while maintaining a positional relationship in which one includes the other, each processing target pixel and each kernel Further, by each of the horizontal direction, the vertical direction, and the two oblique directions, a luminance difference calculation unit that calculates a luminance difference of luminance calculation target pixels that are symmetrical with respect to the processing target pixel, and the luminance difference calculation unit. Comparing means for comparing the largest luminance difference among a plurality of calculated luminance differences with a predetermined threshold value When the maximum luminance difference is determined to be larger than the threshold value by the comparing means, the processing target pixel is equal to or proceed to decide whether a pixel is generated purple fringing.
この発明による画像処理方法は,画像入力手段が,与えられる画像データの入力を受付け,輝度差算出手段が,サイズによって処理対象画素とその処理対象画素の周囲に位置する輝度算出対象画素との距離を定める,互いに異なるサイズを有する複数のカーネルを,一方が他方を包含する位置関係を保ったまま,上記画像入力手段によって受付けられた画像データによって表される処理対象画像上を走査させることによって,処理対象画素ごとかつ上記カーネルごとに,水平方向,垂直方向および2つの斜め方向のそれぞれについて,上記処理対象画素を中心にして対称位置にある輝度算出対象画素の輝度差を算出し,比較手段が上記輝度差算出手段によって算出された複数の輝度差のうち最も大きな輝度差を所定の閾値と比較し,上記比較手段によって最大輝度差が上記閾値よりも大きいと判断された場合に,上記処理対象画素がパープルフリンジを発生している画素であるかどうかの判断に進むことを特徴とする。 In the image processing method according to the present invention, the image input means accepts input of given image data, and the luminance difference calculation means determines the distance between the processing target pixel and the luminance calculation target pixel located around the processing target pixel according to the size. By scanning a plurality of kernels having different sizes from each other on a processing target image represented by image data received by the image input means while maintaining a positional relationship in which one includes the other, For each pixel to be processed and for each of the kernels, a luminance difference between luminance calculation target pixels at symmetrical positions with respect to the pixel to be processed is calculated for each of a horizontal direction, a vertical direction, and two oblique directions. The largest brightness difference among the plurality of brightness differences calculated by the brightness difference calculating means is compared with a predetermined threshold, and the comparison When the maximum luminance difference is determined to be larger than the threshold value by the step, the processing target pixel is equal to or proceed to decide whether a pixel is generated purple fringing.
この発明は,コンピュータを上記画像処理装置として機能させるためのプログラムも提供する。 The present invention also provides a program for causing a computer to function as the image processing apparatus.
この発明によると,異なるサイズを有する複数のカーネルが,一方が他方を包含する位置関係を保ったまま処理対象画像上を走査する。カーネルは処理対象画素とその処理対象画素の周囲に位置する輝度算出対象画素との距離を定めるもので,カーネルのサイズでその距離は異なる。異なるサイズを有する複数のカーネルが,一方が他方を包含する位置関係を保ったまま処理対象画像上を走査されるので,上記処理対象画素を中心にして,処理対象画素とその処理対象画素の周囲に位置する輝度算出対象画素との距離が2つ以上定められる。また,複数のカーネルは一方が他方を包含する位置関係を保って走査されるので,上記処理対象画素を中心にして,上記処理対象画素を2重以上に取巻く周囲画素が輝度算出対象画素の候補になる。 According to the present invention, a plurality of kernels having different sizes scan the processing target image while maintaining a positional relationship in which one includes the other. The kernel determines the distance between the processing target pixel and the luminance calculation target pixel located around the processing target pixel, and the distance differs depending on the size of the kernel. Since a plurality of kernels having different sizes are scanned on the processing target image while maintaining the positional relationship including one of the other, the processing target pixel and the surroundings of the processing target pixel are centered on the processing target pixel. Two or more distances with respect to the luminance calculation target pixel located at are determined. In addition, since a plurality of kernels are scanned while maintaining a positional relationship in which one of them includes the other, surrounding pixels surrounding the processing target pixel doubly or more around the processing target pixel are candidates for luminance calculation target pixels. become.
水平方向,垂直方向および2つの斜め方向のそれぞれについて,上記処理対象画素を中心にして対称位置にある輝度算出対象画素が用いられて,輝度差がそれぞれ算出される。輝度差は水平方向,垂直方向および2つの斜め方向のそれぞれについて算出されるので,一つのカーネルについて4つの輝度差が算出される。上述のように,輝度差はカーネルごとに算出されるので,カーネル数×4の数の輝度差が算出されることになる。 For each of the horizontal direction, the vertical direction, and the two diagonal directions, the luminance calculation target pixel at the symmetrical position with respect to the processing target pixel is used, and the luminance difference is calculated. Since the luminance difference is calculated for each of the horizontal direction, the vertical direction, and the two diagonal directions, four luminance differences are calculated for one kernel. As described above, since the brightness difference is calculated for each kernel, the number of kernels × 4 brightness differences is calculated.
算出された複数の輝度差のうち,最も大きな輝度差が所定の閾値と比較され,最大輝度差が上記閾値よりも大きいと判断された場合に,上記処理対象画素がパープルフリンジを発生している画素であるかどうかの判断に進む。パープルフリンジは輝度差の大きい画像輪郭において発生し,輝度差の小さい画像部分にパープルフリンジは発生しない,または発生してもほぼ視認されないからである。 Among the plurality of calculated luminance differences, the largest luminance difference is compared with a predetermined threshold value, and when it is determined that the maximum luminance difference is larger than the threshold value, the processing target pixel generates a purple fringe. Proceed to determine if it is a pixel. This is because purple fringes occur in image contours with a large luminance difference, and purple fringes do not occur in image portions with a small luminance difference, or even if they occur, they are hardly visible.
この発明によると,サイズの異なる複数のカーネルを用いることで,処理対象画素の周囲の輝度差の大きい画像部分,すなわち輝度差の大きい画像輪郭があるかどうかが精度良く検出される。パープルフリンジが発生している可能性のある画素がほぼ漏れなくその後の処理の対象とされる。パープルフリンジ補正の精度を高めることができる。 According to the present invention, by using a plurality of kernels having different sizes, it is possible to accurately detect whether there is an image portion having a large luminance difference around the processing target pixel, that is, an image contour having a large luminance difference. Pixels in which purple fringes may have occurred are subjected to subsequent processing with almost no omission. The accuracy of purple fringe correction can be increased.
上記処理対象画素がパープルフリンジを発生している画素であるかどうかの判断は,一実施態様では上記処理対象画素の色が紫色かどうかによって判断される。パープルフリンジは紫色であることをその特性の一つとして有しているからである。 In one embodiment, whether or not the processing target pixel is a pixel that has generated purple fringes is determined based on whether or not the color of the processing target pixel is purple. This is because purple fringe has a purple color as one of its characteristics.
好ましくは,上記処理対象画素の色が紫色と判断された場合に上記処理対象画素の色または彩度を異ならせる補正係数を算出する補正係数算出手段,および上記補正係数算出手段によって算出された補正係数を用いて上記処理対象画素を色補正する色補正手段を備える。パープルフリンジが発生している処理対処画素の色が紫色でなくなる,または紫色が目立たなくなるので,パープルフリンジが抑制された画像を得ることができる。 Preferably, when it is determined that the color of the processing target pixel is purple, a correction coefficient calculation unit that calculates a correction coefficient that changes the color or saturation of the processing target pixel, and the correction calculated by the correction coefficient calculation unit Color correction means for correcting the color of the pixel to be processed using a coefficient is provided. Since the color of the processing coping pixel in which purple fringe is generated is not purple or purple is not noticeable, an image in which purple fringe is suppressed can be obtained.
一実施態様では,上記補正係数が上記処理対象画素の青色成分信号の信号量を増やすものである場合に,上記色補正手段による上記補正係数を用いた色補正を回避する色補正回避手段をさらに備える。パープルフリンジは青(B)成分信号のレベルが緑(G)成分に比べてレベルが高いために紫色に現れる。上記補正係数が上記処理対象画素の青色成分信号の信号量を増やすものである場合,すなわち青(B)成分信号の信号量が,緑(G)成分の信号量からさらにかけ離れた信号量にされると,色補正後の処理対象画素とその周囲の画素との間に色の相違等の違和感が生じることがある。上記補正係数が上記処理対象画素の青色成分信号の信号量を増やすものである場合に,上記色補正手段による上記補正係数を用いた色補正を回避することによって,違和感のある色補正を抑制することができる。 In one embodiment, color correction avoiding means for avoiding color correction using the correction coefficient by the color correcting means when the correction coefficient increases the signal amount of the blue component signal of the processing target pixel. Prepare. Purple fringe appears purple because the level of the blue (B) component signal is higher than that of the green (G) component. When the correction coefficient increases the signal amount of the blue component signal of the pixel to be processed, that is, the signal amount of the blue (B) component signal is set to a signal amount far from the signal amount of the green (G) component. As a result, a sense of incongruity such as a color difference may occur between the pixel to be processed after color correction and the surrounding pixels. When the correction coefficient increases the signal amount of the blue component signal of the pixel to be processed, the color correction using the correction coefficient by the color correction unit is avoided, thereby suppressing uncomfortable color correction. be able to.
他の実施態様では,上記画像入力手段から受付けられた画像データによって表される画像に撮像素子における傷を起因とする傷ノイズが含まれているかどうかを判断する傷ノイズ判断手段,および上記傷ノイズ判断によって撮像素子における傷を起因とする傷ノイズが含まれていると判断された場合に,上記傷ノイズを除去する傷ノイズ除去手段をさらに備える。傷ノイズが除去された画像データがその後の処理に用いられるので,パープルフリンジが発生している可能性のある画素を精度良く検出することができる In another embodiment, the flaw noise judging means for judging whether or not the image represented by the image data received from the image input means contains flaw noise caused by flaws in the image sensor, and the flaw noise When it is determined by the determination that flaw noise due to flaws in the image sensor is included, flaw noise removing means for removing the flaw noise is further provided. Since the image data from which the flaw noise has been removed is used for the subsequent processing, it is possible to accurately detect pixels in which purple fringes may have occurred.
さらに他の実施態様では,上記画像入力手段から受付けられた画像データによって表される画像に含まれるノイズのノイズ量を検出するノイズ量検出手段,ノイズ量検出手段によって所定の閾値以上のノイズ量が検出された場合に,上記ノイズを除去するノイズ除去手段をさらに備える。ノイズが除去された画像データがその後の処理に用いられるので,パープルフリンジが発生している可能性のある画素を精度良く検出することができる。 In still another embodiment, a noise amount detection unit for detecting a noise amount of noise included in an image represented by the image data received from the image input unit, and a noise amount equal to or greater than a predetermined threshold is detected by the noise amount detection unit. A noise removing unit for removing the noise when detected is further provided. Since the image data from which the noise has been removed is used in the subsequent processing, it is possible to accurately detect pixels in which purple fringes may have occurred.
図1はパープルフリンジが発生している画像を示している。図2,図3および図4は,図1に示す画像80に示す3つのライン位置L1〜L3のそれぞれに対応する,画素位置ごとのRGB各成分の信号量(強度)を示すグラフである。 FIG. 1 shows an image in which purple fringes are generated. 2, 3 and 4 are graphs showing signal amounts (intensities) of RGB components for each pixel position corresponding to each of the three line positions L 1 to L 3 shown in the image 80 shown in FIG. is there.
パープルフリンジとは高輝度の被写体(たとえば,光源)を撮像したときに,画像輪郭の周辺が紫色に滲む現象である。画像中の輝度差の大きい輪郭部分においてパープルフリンジは生じやすい。輪郭部分における輝度差が大きいほどパープルフリンジは視認されやすくなる。 Purple fringing is a phenomenon in which the periphery of an image contour blurs purple when a high-luminance subject (for example, a light source) is imaged. Purple fringes are likely to occur in contour portions having a large luminance difference in the image. The purple fringe becomes more visible as the luminance difference in the contour portion increases.
図1に示す画像80において白色の高輝度部HAと黒色の低輝度部LAが接している。高輝度部HAと低輝度部LAの境界が画像輪郭(エッジ)Eである。画像輪郭Eの周辺にパープルフリンジが生じている。画像80においてパープルフリンジが発生している領域(範囲)がパープルフリンジ発生領域PFとして示されている。 In the image 80 shown in FIG. 1, the white high-luminance portion HA and the black low-luminance portion LA are in contact. The boundary between the high luminance portion HA and the low luminance portion LA is an image contour (edge) E. Purple fringes are generated around the image contour E. A region (range) where purple fringes are generated in the image 80 is shown as a purple fringe generation region PF.
画像80において高輝度部HAはその上側に向かうにつれて輝度が小さくなっている。低輝度部LAの輝度は一定である。すなわち,画像80における下端部付近における高輝度部HAと低輝度部LAの輝度差は非常に大きく,上端部付近では高輝度部HAと低輝度部LAの輝度差はそれよりも小さい。 In the image 80, the brightness of the high brightness portion HA decreases as it goes upward. The luminance of the low luminance part LA is constant. That is, the luminance difference between the high luminance portion HA and the low luminance portion LA in the vicinity of the lower end portion in the image 80 is very large, and the luminance difference between the high luminance portion HA and the low luminance portion LA is smaller in the vicinity of the upper end portion.
図2〜図4を参照して,パープルフリンジは,RGB成分で見ると,青(B)成分,または青(B)成分および赤(R)成分の信号量が,緑(G)成分の信号量よりも大きな信号量を持つことで紫色を表すものになる。図2〜図4において両端矢印D1〜D3は,画像輪郭Eの近傍の画素位置における,青(B)成分の信号量と緑(G)成分の信号量との差を示している。高輝度部HAと低輝度部LAの輝度差が大きいほど,画像輪郭Eの近傍の画素位置における青(B)成分の信号量と緑(G)成分の信号量との差は大きい(D1<D2<D3)。この信号量差に比例してパープルフリンジ発生領域PFも大きくなり,目立つものになる。 Referring to FIGS. 2 to 4, purple fringe is a signal of blue (B) component or blue (B) component and red (R) component when the RGB component is viewed as green (G) component. By having a signal amount greater than the amount, it represents purple. 2 to 4, double-ended arrows D 1 to D 3 indicate the difference between the signal amount of the blue (B) component and the signal amount of the green (G) component at the pixel position in the vicinity of the image contour E. As the luminance difference between the high luminance portion HA and the low luminance portion LA is larger, the difference between the signal amount of the blue (B) component and the signal amount of the green (G) component at the pixel position near the image contour E is larger (D 1 <D 2 <D 3 ). In proportion to this signal amount difference, the purple fringe generation region PF also increases and becomes conspicuous.
この発明の実施例のディジタル・スチル・カメラは,上述したパープルフリンジ発生領域PDを有する画像に対してパープルフリンジを低減する画像処理を行うことができる。以下,パープルフリンジ低減機能を有するディジタル・スチル・カメラを説明する。 The digital still camera according to the embodiment of the present invention can perform image processing for reducing purple fringes on an image having the purple fringe generation area PD described above. Hereinafter, a digital still camera having a purple fringe reduction function will be described.
図5はディジタル・スチル・カメラの電気的構成を概略的に示すブロック図である。 FIG. 5 is a block diagram schematically showing the electrical configuration of the digital still camera.
ディジタル・スチル・カメラの全体的な動作はCPU2によって統括される。 The overall operation of the digital still camera is controlled by the CPU 2.
CPU2は,データバス1を介して,撮像ユニット10,パープルフリンジ補正装置20,外部メモリ・インターフェース(外部メモリI/F)5,メモリ・インターフェース(メモリI/F)7,および圧縮伸張処理回路9に接続されている。 The CPU 2 is connected via the data bus 1 to the imaging unit 10, purple fringe correction device 20, external memory interface (external memory I / F) 5, memory interface (memory I / F) 7, and compression / decompression processing circuit 9. It is connected to the.
撮像ユニット10はCCD12を備え,CCD12の前方に撮像レンズ,絞り,赤外線カット・フィルタ,光学的ロウパス・フィルタ(OLPF)等を含む光学ユニット11が設けられている。 The imaging unit 10 includes a CCD 12, and an optical unit 11 including an imaging lens, a diaphragm, an infrared cut filter, an optical low pass filter (OLPF), and the like is provided in front of the CCD 12.
ディジタル・スチル・カメラには,フラッシュ撮像のためのフラッシュ4,およびフラッシュ4に電源を供給する充電回路3を備えている。CPU2によってフラッシュ4に対する発光指示,充電回路3に対する充電指示が行われる。 The digital still camera includes a flash 4 for flash imaging and a charging circuit 3 for supplying power to the flash 4. The CPU 2 issues a light emission instruction for the flash 4 and a charging instruction for the charging circuit 3.
ディジタル・スチル・カメラの電源がオンされ,撮影モードが設定されると,被写体像を表す光線束が光学ユニット11に入射する。光線束は光学ユニット11を介してCCD12の受光面上に入射する。CCD12には多数のフォトダイオード(光電変換素子)がその受光面に二次元的に配置され,かつ受光面上には所定の配列構造(ベイヤー配列,Gストライプ配列など)を持って配列された赤(R),緑(G),青(B)のカラーフィルタが設けられている。光学ユニット11によって結像された被写体像がCCD12によって電子的に撮像される。CCD12はCPU2からの指令に応じてタイミング信号等を出力する撮像素子駆動回路17によって駆動される。 When the power of the digital still camera is turned on and the photographing mode is set, a light beam representing the subject image is incident on the optical unit 11. The light beam is incident on the light receiving surface of the CCD 12 via the optical unit 11. The CCD 12 has a number of photodiodes (photoelectric conversion elements) arranged two-dimensionally on the light receiving surface, and a red array arranged on the light receiving surface with a predetermined arrangement structure (Bayer arrangement, G stripe arrangement, etc.). Color filters of (R), green (G), and blue (B) are provided. A subject image formed by the optical unit 11 is electronically captured by the CCD 12. The CCD 12 is driven by an image sensor driving circuit 17 that outputs a timing signal and the like in response to a command from the CPU 2.
CCD12から出力された被写体像を表すアナログ信号は,アナログ信号処理装置13に入力する。 An analog signal representing the subject image output from the CCD 12 is input to the analog signal processing device 13.
アナログ信号処理装置13には,相関二重サンプリング回路,信号増幅器などが含まれている。CCD12から出力された被写体像を表すアナログ信号はアナログ信号処理装置13に入力し,相関二重サンプリング,信号増幅などが行われる。アナログ信号処理装置13から出力されたアナログ映像信号(アナログRGB信号)はアナログ/ディジタル変換回路(ADC)14に入力し,所定の信号処理の後,ディジタル画像データ(デジタルRGBデータ)に変換される。また,必要に応じてRGBデータは輝度データ(Yデータ)と色差データ(Cr,Cbデータ)とからなる画像データ(YUVデータ)に変換される。 The analog signal processing device 13 includes a correlated double sampling circuit, a signal amplifier, and the like. An analog signal representing the subject image output from the CCD 12 is input to the analog signal processing device 13, where correlated double sampling, signal amplification, and the like are performed. An analog video signal (analog RGB signal) output from the analog signal processing device 13 is input to an analog / digital conversion circuit (ADC) 14 and converted into digital image data (digital RGB data) after predetermined signal processing. . Further, the RGB data is converted into image data (YUV data) including luminance data (Y data) and color difference data (Cr, Cb data) as necessary.
ADC14から出力されたディジタル画像データに対して,ディジタル信号処理装置15において白バランス調整,ガンマ補正,同時化処理(単板CCDのカラーフィルタ配列に伴う色信号の空間的ズレを補間して色信号を同時式に変換する処理)などの所定のディジタル信号処理が行われる。 The digital signal data output from the ADC 14 is subjected to white balance adjustment, gamma correction, and synchronization processing in the digital signal processing unit 15 (interpolation of the spatial shift of the color signal associated with the color filter array of the single CCD). Predetermined digital signal processing, such as a process for simultaneously converting
ディジタル画像データはメモリI/F7の制御のもとRAM8Aに一時的に記録される。メモリI/F7にはROM8Bも接続されている。ROM8Bには,CPU2が実行する制御プログラム,制御に必要な各種データ,撮影者設定情報等,デジタル・スチル・カメラの動作に関する各種設定情報等が記憶されている。 Digital image data is temporarily recorded in the RAM 8A under the control of the memory I / F 7. A ROM 8B is also connected to the memory I / F 7. The ROM 8B stores a control program executed by the CPU 2, various data necessary for control, photographer setting information, and various setting information related to the operation of the digital still camera.
RAM8Aから読出されたディジタル画像データによって表される被写体像は,表示装置(図示略)の表示画面上に表示される。 A subject image represented by digital image data read from the RAM 8A is displayed on a display screen of a display device (not shown).
シャッタ・レリーズ・ボタン(図示略)の第一段階の押下があると,モータ駆動回路16によって光学ユニット11のレンズが駆動されて焦点合わせが行われる。RAM8Aから読出される画像データに基づいてディジタル信号処理装置15において輝度データが得られる。輝度データの積算値を表すデータがCPU2に与えられて露出量が算出される。算出された露出量となるように光学ユニット11の絞りの開口がモータ駆動回路16によって制御され,CCD12のシャッタ速度が撮像素子駆動回路17によって制御される。 When a shutter release button (not shown) is pressed in the first stage, the lens of the optical unit 11 is driven by the motor drive circuit 16 to perform focusing. Luminance data is obtained in the digital signal processor 15 based on the image data read from the RAM 8A. Data representing the integrated value of the luminance data is given to the CPU 2 to calculate the exposure amount. The aperture of the diaphragm of the optical unit 11 is controlled by the motor drive circuit 16 so that the calculated exposure amount is obtained, and the shutter speed of the CCD 12 is controlled by the image sensor drive circuit 17.
シャッタ・レリーズ・ボタンの第二段階の押下があると,ディジタル画像データはRAM8Aに記憶される。RAM8Aから読出された画像データに対し,所定のディジタル信号処理がデジタル信号処理装置15において行われ,その後圧縮伸張処理回路9においてデータ圧縮される。圧縮された画像データが外部メモリI/F5の制御によってメモリカード6に記録される。 When the shutter release button is pressed in the second stage, the digital image data is stored in the RAM 8A. Predetermined digital signal processing is performed on the image data read from the RAM 8A in the digital signal processing device 15, and thereafter the data is compressed in the compression / decompression processing circuit 9. The compressed image data is recorded on the memory card 6 under the control of the external memory I / F 5.
再生モードが設定されると,メモリカード6に記録されている圧縮画像データが読み取られる。読取られた圧縮画像データは圧縮伸張処理回路9において伸張された後,表示装置に与えられて再生画像が表示される。 When the reproduction mode is set, the compressed image data recorded on the memory card 6 is read. The read compressed image data is expanded by the compression / expansion processing circuit 9 and then given to the display device to display a reproduced image.
パープルフリンジ補正装置20は,画像入力装置(外部機器接続インターフェース(USBポートなど))21,輝度差算出回路22,最大輝度差選択回路23,色相判定回路24,補正判断回路25,パープルフリンジ補正回路26および処理終了判断回路27を含む。画像入力装置21からディジタル・スチル・カメラに入力した画像データ,CCD12による撮像によって得られた画像データ,およびメモリカード6から読出された画像データに対して,パープルフリンジ補正装置20が用いられて,上述したパープルフリンジを低減する画像処理が行われる。 The purple fringe correction device 20 includes an image input device (external device connection interface (USB port, etc.)) 21, a luminance difference calculation circuit 22, a maximum luminance difference selection circuit 23, a hue determination circuit 24, a correction determination circuit 25, and a purple fringe correction circuit. 26 and a process end determination circuit 27. A purple fringe correction device 20 is used for image data input to the digital still camera from the image input device 21, image data obtained by imaging with the CCD 12, and image data read from the memory card 6. Image processing for reducing the above-described purple fringe is performed.
図6は,パープルフリンジ補正装置20において行われるパープルフリンジ低減処理の手順を示すフローチャートである。 FIG. 6 is a flowchart showing a procedure of purple fringe reduction processing performed in the purple fringe correction apparatus 20.
処理対象の画像データが入力される(ステップ51)。上述のように,処理対象の画像データは,CCD12によって撮像されて得られた画像データであってもよいし,メモリカード6から読出された画像データであってもよいし,画像入力装置21を通じてディジタル・スチル・カメラに取込まれた画像データであってもよい。入力された画像データはRAM8Aに一時的に記憶される。 Image data to be processed is input (step 51). As described above, the image data to be processed may be image data obtained by being imaged by the CCD 12, image data read from the memory card 6, or through the image input device 21. It may be image data captured by a digital still camera. The input image data is temporarily stored in the RAM 8A.
輝度差算出回路22によって,サイズの異なる3つのカーネルKA,KBおよびKCが用いられて,画像データによって表される画像を構成する処理対象画素について,4方向(上下方向,左右方向,右斜め方向および左斜め方向)の輝度差ΔYの算出処理が並列(同時)に行われる(ステップ52,53,54)。 The luminance difference calculation circuit 22 uses three kernels KA, KB, and KC having different sizes, and the processing target pixels constituting the image represented by the image data have four directions (vertical direction, horizontal direction, diagonal right direction). And the process of calculating the luminance difference ΔY in the left diagonal direction is performed in parallel (simultaneously) (steps 52, 53, 54).
図7は処理対象の画像40と,サイズの異なる3つのカーネルKA,KBおよびKCとの関係を示している。 FIG. 7 shows the relationship between the image 40 to be processed and the three kernels KA, KB, and KC having different sizes.
カーネルKA,KBおよびKCは,いずれも,中心画素と,その中心画素の近傍範囲に位置する,輝度差ΔYを算出するための8つの画素(輝度差算出対象画素)との間の距離を規定するもので,正方形の形状を有している。中心画素と輝度差算出対象画素との間の距離は,カーネルのサイズによって規定される。カーネルKAのサイズが最も小さく,カーネルKBのサイズはカーネルKAのサイズよりも大きい。カーネルKCのサイズはカーネルKBのサイズよりも大きい。カーネルKAによって定められる輝度差算出対象画素よりも中心画素から離れた位置の画素がカーネルKBによって輝度差算出対象画素とされる。カーネルKBによって定められる輝度差算出対象画素よりも中心画素から離れた位置の画素がカーネルKCによって輝度差算出対象画素とされる。 The kernels KA, KB, and KC all specify the distance between the central pixel and eight pixels (luminance difference calculation target pixels) that are located in the vicinity of the central pixel and that calculate the luminance difference ΔY. It has a square shape. The distance between the center pixel and the luminance difference calculation target pixel is defined by the size of the kernel. The size of the kernel KA is the smallest, and the size of the kernel KB is larger than the size of the kernel KA. The size of the kernel KC is larger than the size of the kernel KB. A pixel at a position farther from the center pixel than the luminance difference calculation target pixel determined by the kernel KA is set as a luminance difference calculation target pixel by the kernel KB. A pixel at a position farther from the center pixel than the luminance difference calculation target pixel determined by the kernel KB is set as a luminance difference calculation target pixel by the kernel KC.
3つのカーネルKA,KBおよびKCは,最もサイズの大きいカーネルKCが2番目にサイズの大きいカーネルKBを包含し,2番目にサイズの大きいカーネルKBが最もサイズの小さいカーネルKCを包含する位置関係を持つ。3つのカーネルKA,KBおよびKCはこの位置関係を保ったまま,対象画像40上を走査される。 The three kernels KA, KB, and KC have a positional relationship in which the largest kernel KC includes the second largest kernel KB, and the second largest kernel KB includes the smallest kernel KC. Have. The three kernels KA, KB, and KC are scanned on the target image 40 while maintaining this positional relationship.
図8は,カーネルKAと,中心画素(処理対象画素)P1と,中心画素P1の周囲に位置する8つの輝度差算出対象画素P2〜P9の位置関係を示している。 FIG. 8 shows the positional relationship among the kernel KA, the central pixel (processing target pixel) P1, and the eight luminance difference calculation target pixels P2 to P9 located around the central pixel P1.
図8を参照して,中心画素P1が定められるとその中心画素P1の左右方向(H方向),上下方向(V方向),右斜め方向(NE方向)および左斜め方向(NW)の4方向のそれぞれにおいて,カーネルKAのサイズに応じて定められる8つの輝度差算出対象画素が決められる。カーネルKAが縦4画素×横4画素のサイズを有する場合,中心画素P1 から左右,上下,右斜めおよび左斜めのそれぞれに4画素分離れた8つの画素P2〜P9が,輝度差算出対象画素になる。 Referring to FIG. 8, when the center pixel P1 is determined, the four directions of the center pixel P1 in the left-right direction (H direction), the up-down direction (V direction), the right diagonal direction (NE direction), and the left diagonal direction (NW). In each of these, eight luminance difference calculation target pixels determined according to the size of the kernel KA are determined. When the kernel KA has a size of 4 vertical pixels × 4 horizontal pixels, eight pixels P2 to P9, which are separated from the central pixel P1 by 4 pixels on the left, right, top, bottom, right diagonal and left diagonal, are luminance difference calculation target pixels. become.
4方向(上下方向,左右方向,右斜め方向および左斜め方向)の輝度差ΔYの算出処理では,左右方向(H方向),上下方向(V方向),右斜め方向(NE方向)および左斜め方向(NW)のそれぞれについて,中心画素P1を中心にして対称位置にある2つの画素同士で差がとられる。たとえば,左右方向(H方向)であれば,中心画素P1から左方向に4画素分離れた位置にある画素P2の輝度と,中心画素P1から右方向に4画素分離れた画素P3の輝度差が算出される。同様にして,中心画素P1から上方向に4画素分離れた位置にある画素P4の輝度と,中心画素P2から下方向に4画素分離れた画素P5の輝度差が算出され(上下方向),中心画素P1から左斜め上方向に4画素分離れた位置にある画素P6の輝度と,中心画素P2から右斜め下方向に4画素分離れた画素P7の輝度の差が算出され(左斜め方向),中心画素P1から右斜め上方向に4画素分離れた位置にある画素P8の輝度と,中心画素P2から左斜め下方向に4画素分離れた画素P9の輝度の差が算出される(右斜め方向)。一つのカーネルについて4つの方向のそれぞれに対応する4つの輝度差が算出されることになる。 In the calculation process of the luminance difference ΔY in four directions (vertical direction, horizontal direction, diagonal right direction and diagonal left direction), the horizontal direction (H direction), vertical direction (V direction), diagonal right direction (NE direction) and diagonal left For each direction (NW), a difference is taken between two pixels located symmetrically with respect to the center pixel P1. For example, in the left-right direction (H direction), the luminance difference between the pixel P2 at the position separated by 4 pixels in the left direction from the center pixel P1 and the luminance of the pixel P3 separated by 4 pixels in the right direction from the center pixel P1. Is calculated. Similarly, the luminance difference of the pixel P4 at a position separated by four pixels upward from the center pixel P1 and the luminance of the pixel P5 separated by four pixels downward from the center pixel P2 is calculated (up and down direction). The difference between the luminance of the pixel P6 at a position separated by four pixels in the diagonally upper left direction from the central pixel P1 and the luminance of the pixel P7 separated by four pixels in the diagonally downward right direction from the central pixel P2 is calculated (diagonal in the left diagonal direction). ), The difference between the luminance of the pixel P8 at a position separated by four pixels in the diagonally upper right direction from the center pixel P1 and the luminance of the pixel P9 separated by four pixels in the diagonally lower left direction from the central pixel P2 is calculated ( Diagonally to the right). Four luminance differences corresponding to each of the four directions are calculated for one kernel.
図7を参照して,上述のように,カーネルKA,KB,KCのサイズは,カーネルKAのサイズが最も小さく,カーネルKBはカーネルKAのサイズよりも大きく,カーネルKCのサイズはカーネルKBのサイズよりも大きい。そして,カーネルKCはカーネルKBを包含し,カーネルKBはさらにカーネルKAを包含する位置関係を有する。したがって,上述のように,カーネルKBによって定められる8つの輝度算出対象画素としては,カーネルKAによって定められる輝度算出対象画素(図8)よりも中心画素P1から離れた位置にある画素が用いられる。カーネルKCによって定められる8つの輝度算出対象画素としては,カーネルKBによって定められる輝度算出対象画素よりも中心画素P1から離れた位置にある画素が用いられる。 Referring to FIG. 7, as described above, the sizes of kernels KA, KB, and KB are the smallest in the size of kernel KA, kernel KB is larger than the size of kernel KA, and the size of kernel KC is the size of kernel KB. Bigger than. The kernel KC includes the kernel KB, and the kernel KB further has a positional relationship including the kernel KA. Therefore, as described above, as the eight luminance calculation target pixels determined by the kernel KB, pixels that are located farther from the central pixel P1 than the luminance calculation target pixels (FIG. 8) determined by the kernel KA are used. As the eight luminance calculation target pixels determined by the kernel KC, pixels located at positions farther from the central pixel P1 than the luminance calculation target pixels determined by the kernel KB are used.
カーネルKA,KB,KCの中心画素の位置が行方向および列方向に1画素ずつずらされて3つのカーネルKA,KBおよびKCは対象画像40上を走査される。処理画像40を構成する各画素が順次中心画素P1(すなわち処理対象画素)になる。処理対象画素ごとに輝度差算出処理は行われる。一つの処理対象画素について合計12の輝度差ΔYが算出されることになる。処理画像40の全画素に対して輝度差算出処理は行われる。 The positions of the central pixels of the kernels KA, KB, and KC are shifted by one pixel in the row direction and the column direction, and the three kernels KA, KB, and KC are scanned on the target image 40. Each pixel constituting the processed image 40 sequentially becomes the central pixel P1 (that is, the processing target pixel). A luminance difference calculation process is performed for each pixel to be processed. A total of 12 luminance differences ΔY are calculated for one processing target pixel. The luminance difference calculation process is performed on all the pixels of the processed image 40.
図6に戻って,処理対象画素について12の輝度差ΔYが算出されると,次に,最大輝度差選択回路23によって,算出された12の輝度差ΔYのうち最大のもの(最大輝度差ΔYmax)が選択される(ステップ55)。選択された最大輝度差ΔYmaxが所定の閾値よりも大きいかどうかが判定される(ステップ56)。 Returning to FIG. 6, when twelve luminance differences ΔY are calculated for the pixel to be processed, the maximum luminance difference selection circuit 23 then calculates the maximum one of the twelve luminance differences ΔY calculated (maximum luminance difference ΔYmax). ) Is selected (step 55). It is determined whether or not the selected maximum luminance difference ΔYmax is greater than a predetermined threshold (step 56).
上述したように,パープルフリンジは輝度差の大きな画像輪郭の周辺に発生する。したがって,選択された最大輝度差ΔYが低いものであれば処理対象画素にパープルフリンジが発生している可能性は低い。最大輝度差ΔYが所定の閾値よりも大きい場合にその後の処理に進み(ステップ56でYES ),最大輝度差ΔYが所定の閾値以下であれば,その処理対象画素に対するその後の処理はスキップされ,次の画素に対する処理に移行する(ステップ56でNO)。 As described above, the purple fringe occurs around the image contour having a large luminance difference. Therefore, if the selected maximum luminance difference ΔY is low, it is unlikely that purple fringes have occurred in the processing target pixel. If the maximum luminance difference ΔY is larger than the predetermined threshold value, the process proceeds to the subsequent processing (YES in step 56). If the maximum luminance difference ΔY is equal to or smaller than the predetermined threshold value, the subsequent processing for the processing target pixel is skipped, The process proceeds to the process for the next pixel (NO in step 56).
図9(A)は輝度差のある画像輪郭を含む画像42と,3つのカーネルKA,KBおよびKCとの関係を示している。図9(A)においてハッチングで示す部分(範囲)が低輝度画像部分を示し,ハッチングの無い部分が高輝度画像部分を示す。図9(B),(C)および(D)は,図9(A)においてカーネルKA,KBおよびKCによって囲まれている範囲の画像部分をそれぞれ示している。 FIG. 9A shows the relationship between an image 42 including an image contour having a luminance difference and three kernels KA, KB, and KC. In FIG. 9A, a hatched portion (range) indicates a low luminance image portion, and a non-hatched portion indicates a high luminance image portion. FIGS. 9B, 9C, and 9D respectively show image portions in a range surrounded by the kernels KA, KB, and KC in FIG. 9A.
図9(A),(B),(C)を参照して,カーネルKAによって囲まれている画素のすべてが低輝度画像部分LA1の画素であれば,上述の4方向のすべてについて算出される輝度差はいずれも小さくしたがって最大輝度差も小さい。カーネルKBについても同様である。これに対し,図9(A)および(D)を参照して,カーネルKCによって規定される範囲では,その一端部に高輝度画像部分HA1の画素が位置し,他端部に低輝度画像部分LA1の画素が位置している。カーネルKCが用いられて算出される4つの輝度差の中に大きな輝度差が現れる(図9(D)の場合,水平方向に位置する画素P2およびP3の輝度差が大きな値になる)。カーネルKAおよびカーネルKBではその後の処理がスキップされる画素であっても,サイズの大きなカーネルKCによってその後の処理が行われる画素になる。 With reference to FIGS. 9A, 9B, and 9C, if all of the pixels surrounded by the kernel KA are pixels of the low-luminance image portion LA1, the calculation is performed for all of the four directions described above. All the luminance differences are small, and therefore the maximum luminance difference is also small. The same applies to the kernel KB. On the other hand, with reference to FIGS. 9A and 9D, in the range defined by the kernel KC, the pixel of the high luminance image portion HA1 is located at one end and the low luminance image portion is located at the other end. The pixel of LA1 is located. A large luminance difference appears among the four luminance differences calculated using the kernel KC (in the case of FIG. 9D, the luminance difference between the pixels P2 and P3 positioned in the horizontal direction becomes a large value). In the kernel KA and the kernel KB, even if the subsequent processing is skipped, the pixel is processed by the kernel KC having a large size.
図10(A)も輝度差のある画像輪郭を含む画像42と,3つのカーネルKA,KBおよびKCを示している。図9(A)とはカーネルKA,KBおよびKCの位置が異なっている。図10(B),(C)および(D)は,図10(A)においてカーネルKA,KBおよびKCによって規定される範囲の画像部分を示している。 FIG. 10A also shows an image 42 including an image contour having a luminance difference, and three kernels KA, KB, and KC. The positions of the kernels KA, KB, and KC are different from those in FIG. FIGS. 10B, 10C, and 10D show image portions in a range defined by the kernels KA, KB, and KC in FIG.
図10(A),(B)を参照して,カーネルKAによって規定される範囲においてその一側部に高輝度画像部分HA2が,他側部に低輝度画像部分LA2が位置している。カーネルAを用いた輝度差算出処理において大きな輝度差が算出される(図10(A)の場合,水平方向に位置する画素P2およびP3の輝度差が大きな値になる)。これに対し,図10(A),(C)および(D)を参照して,カーネルKBによって規定される範囲およびカーネルKCによって規定される範囲にはいずれも高輝度画像部分HA1および低輝度画像部分LA3が含まれているが,上述した4方向のいずれについても,一方に高輝度画像部分が位置し,かつ他方に低輝度画像部分が位置する関係にない。カーネルKBおよびKCを用いた輝度算出処理では大きな輝度差は算出されない。カーネルKBおよびカーネルKCを用いることではその後の処理がスキップされる画素であっても,サイズの小さなカーネルKAによってその後の処理が行われる画素になる。 Referring to FIGS. 10A and 10B, the high-luminance image portion HA2 is located on one side and the low-luminance image portion LA2 is located on the other side in the range defined by the kernel KA. A large luminance difference is calculated in the luminance difference calculation process using the kernel A (in the case of FIG. 10A, the luminance difference between the pixels P2 and P3 located in the horizontal direction becomes a large value). On the other hand, referring to FIGS. 10A, 10C, and 10D, the range defined by the kernel KB and the range defined by the kernel KC are both high-luminance image portion HA1 and low-luminance image. Although the portion LA3 is included, the high luminance image portion is located on one side and the low luminance image portion is not located on the other side in any of the four directions described above. In the luminance calculation processing using the kernels KB and KC, a large luminance difference is not calculated. By using the kernel KB and the kernel KC, even if the subsequent processing is skipped, the pixel is processed by the kernel KA having a small size.
図6に戻って,最大輝度差ΔYmaxが所定の閾値より大きい場合(ステップ56でYES ),処理対象画素にパープルフリンジが発生しているかどうかの判定が行われる。この実施例では,色相判定回路24によって処理対象画素の色相が算出され,それが紫色または紫色に近い色相かどうかが判定される(ステップ57)。紫色でないと判定されるとその後の処理はスキップされ,次の画素の処理に進む(ステップ57でNO)。パープルフリンジは紫色によって現れることをその特性の一つとするからである。 Returning to FIG. 6, when the maximum luminance difference ΔYmax is larger than the predetermined threshold value (YES in step 56), it is determined whether purple fringing has occurred in the processing target pixel. In this embodiment, the hue determination circuit 24 calculates the hue of the pixel to be processed and determines whether it is purple or a hue close to purple (step 57). If it is determined that the color is not purple, the subsequent process is skipped and the process proceeds to the next pixel (NO in step 57). This is because purple fringe has one of the characteristics of appearing in purple.
紫色の色相を持つと判定されると,パープルフリンジを低減するための補正係数,たとえば青(B)成分,または青(B)成分および赤(R)成分に対する補正係数が補正判断回路25によって算出される(ステップ57でYES ,ステップ58)。算出される補正係数は処理対象画素から所定画素数(たとえば8画素)離れた位置の画素の色に,処理対象画素の色を合致させる係数であってもよいし,処理対象画素の彩度を低めるような係数であってもよい。いずれにしても,処理対象画素の色が紫色とは異なる色になるような補正係数,処理対象画素の紫色が目立たなくなるような補正係数などが算出される。 When it is determined that the hue is purple, a correction coefficient for reducing purple fringe, for example, a correction coefficient for the blue (B) component, or the blue (B) component and the red (R) component is calculated by the correction determination circuit 25. (YES in step 57, step 58). The calculated correction coefficient may be a coefficient for matching the color of the pixel to be processed with the color of the pixel located at a predetermined number of pixels (for example, 8 pixels) away from the pixel to be processed. It may be a low coefficient. In any case, a correction coefficient so that the color of the pixel to be processed is different from purple, a correction coefficient that makes the purple of the pixel to be processed inconspicuous, and the like are calculated.
補正判断回路25はさらに,算出された補正係数が,青(B)成分の信号量(強度)を低めるもの(信号量をマイナス方向に補正するもの)かどうかを判定する(ステップ59)。すなわち,上述したように,パープルフリンジは青(B)成分の信号量が緑(G)成分の信号量よりも多い(プラス)方向にかけ離れていることをその特性としているので,パープルフリンジを低減するには青(B)成分の信号量を少なくする(マイナス方向に補正する)必要がある。算出された青(B)成分の補正係数が処理対象画素の青(B)成分の信号量をより大きくするものである場合,その補正係数を用いて色補正を行うと画像輪郭における違和感のある色に補正されてしまうおそれがある。 The correction determination circuit 25 further determines whether or not the calculated correction coefficient is one that reduces the signal amount (intensity) of the blue (B) component (one that corrects the signal amount in the negative direction) (step 59). That is, as described above, the purple fringe has a characteristic that the signal amount of the blue (B) component is far away in the (plus) direction than the signal amount of the green (G) component. In order to achieve this, it is necessary to reduce the signal amount of the blue (B) component (correct in the minus direction). When the calculated blue (B) component correction coefficient increases the signal amount of the blue (B) component of the pixel to be processed, color correction using the correction coefficient may cause a sense of incongruity in the image contour. There is a risk of being corrected to color.
算出された補正係数が青(B)成分の信号量(強度)を低めるものでない(高めるものである)場合には,その後の処理がスキップされ,次の画素に対する処理に進む(ステップ59でNO)。 If the calculated correction coefficient does not reduce (increase) the signal amount (intensity) of the blue (B) component, the subsequent processing is skipped and the processing proceeds to the next pixel (NO in step 59). ).
算出された補正係数が青(B)成分の信号量(強度)を低めるものであれば,パープルフリンジ補正回路26によって,算出された補正係数が用いられて処理対象画素が色補正される。すなわち,処理対象画素に対するパープルフリンジ補正処理が行われる(ステップ60)。 If the calculated correction coefficient reduces the signal amount (intensity) of the blue (B) component, the purple fringe correction circuit 26 uses the calculated correction coefficient to correct the color of the processing target pixel. That is, purple fringe correction processing is performed on the processing target pixel (step 60).
対象画像のすべての画素に対して上述の処理が繰り返される(ステップ61でNO)。すべての画素に対する処理を終えると,処理終了判断回路27によって処理終了が判断され,補正後の画像データがRAM8Aから出力され,メモリカード6,画像入力装置21に接続されている外部機器等に記録等される(ステップ62)。 The above-described process is repeated for all pixels of the target image (NO in step 61). When the processing for all the pixels is completed, the processing end determination circuit 27 determines the end of the processing, and the corrected image data is output from the RAM 8A and recorded in an external device or the like connected to the memory card 6 and the image input device 21. (Step 62).
上述のように,サイズの異なる3つのカーネルKA,KBおよびKCを用いることで,輝度差の大きい画像輪郭の近傍の画素を,ほぼ漏れなく,その後の処理の対象とすることができる。パープルフリンジが発生している可能性のある画素を精度良く検出してパープルフリンジの低減(軽減)を図ることができる。 As described above, by using the three kernels KA, KB, and KC having different sizes, pixels in the vicinity of the image contour having a large luminance difference can be targeted for subsequent processing with almost no omission. It is possible to reduce (reduce) purple fringes by accurately detecting pixels in which purple fringes may occur.
上述した実施例では,パープルフリンジ低減処理がハードウェア装置(パープルフリンジ補正装置20)によって実行されているが,CPU2またはディジタル信号処理装置15に,パープルフリンジ低減処理を実行させてもよい。この場合には,CPU2またはディジタル信号処理装置15にパープルフリンジ低減処理を実行させるプログラムがROM8Bに記憶される。このことは,後述する他の実施例でも同様である。 In the above-described embodiment, the purple fringe reduction processing is executed by the hardware device (purple fringe correction device 20). However, the CPU 2 or the digital signal processing device 15 may execute the purple fringe reduction processing. In this case, a program for causing the CPU 2 or the digital signal processing device 15 to perform purple fringe reduction processing is stored in the ROM 8B. The same applies to other embodiments described later.
図11は他の実施例のディジタル・スチル・カメラの電気的構成を示すブロック図である。図5に示すものとは,パープルフリンジ補正装置20Aが,CCD傷検出回路31,CCD傷補正回路32,ノイズ量検出回路33およびノイズリダクション処理回路34をさらに備えている点が異なる。図12は図11に示す他の実施例のディジタル・スチル・カメラによるパープルフリンジ低減処理の手順を示すフローチャートである。図6に示すフローチャートと同一処理には同一符号を付し,重複説明を避ける。 FIG. 11 is a block diagram showing the electrical configuration of a digital still camera according to another embodiment. 5 differs from that shown in FIG. 5 in that the purple fringe correction device 20A further includes a CCD flaw detection circuit 31, a CCD flaw correction circuit 32, a noise amount detection circuit 33, and a noise reduction processing circuit. FIG. 12 is a flowchart showing a procedure of purple fringe reduction processing by the digital still camera of another embodiment shown in FIG. The same processes as those in the flowchart shown in FIG.
CCD傷検出回路31によって,処理対象の画像データによって表される画像上にCCD傷によって現れる画像特徴が検出される(ステップ71)。たとえば,CCD12に傷があると,CCD12から出力される画像データによって表される画像中に白色点が発生することがある。この白色点が検出された場合,その白色点をその周囲画素の色に合わせる等のCCD傷ノイズの補正処理が,CCD傷補正回路32によって行われる(ステップ72)。 The CCD flaw detection circuit 31 detects image features that appear due to CCD flaws on the image represented by the image data to be processed (step 71). For example, if the CCD 12 is scratched, a white point may occur in the image represented by the image data output from the CCD 12. When this white point is detected, CCD flaw noise correction processing such as matching the white point with the color of the surrounding pixels is performed by the CCD flaw correction circuit 32 (step 72).
さらに,ノイズ量検出回路33によって画像データ中に含まれるノイズ量が検出される。たとえば,処理対象画素の画素値とその近傍のメジアン値の差が所定の閾値以上の場合はノイズが存在すると判断され,所定の閾値より小さければノイズはないと判断される。閾値を超える大きさに応じてノイズ量が得られる(ステップ73)。 Further, the noise amount detection circuit 33 detects the amount of noise included in the image data. For example, if the difference between the pixel value of the pixel to be processed and the median value in the vicinity thereof is greater than or equal to a predetermined threshold, it is determined that noise exists, and if it is smaller than the predetermined threshold, it is determined that there is no noise. A noise amount is obtained according to the magnitude exceeding the threshold (step 73).
ノイズ量が所定閾値よりも少なければそのまま上述したパープルフリンジ低減処理に進む(ステップ74でNO)。ノイズ量が所定閾値以上と判定された場合にはメジアンフィルタ等を用いたノイズリダクション処理がノイズリダクション処理回路34によって行われ,ノイズリダクション処理された画像データがパープルフリンジ低減処理される(ステップ74でYES ,ステップ75)。 If the amount of noise is less than the predetermined threshold, the process proceeds to the purple fringe reduction process described above (NO in step 74). When it is determined that the noise amount is equal to or greater than the predetermined threshold value, noise reduction processing using a median filter or the like is performed by the noise reduction processing circuit 34, and the image data subjected to noise reduction processing is subjected to purple fringe reduction processing (in step 74). YES, step 75).
CCD12の傷によるノイズおよびその他のノイズが減少された画像データがパープルフリンジ低減処理の対象とされるので,パープルフリンジが発生している可能性のある画素の検出精度を高めることができる。 Since image data in which noise due to scratches on the CCD 12 and other noises is reduced is subjected to purple fringe reduction processing, it is possible to increase the detection accuracy of pixels in which purple fringes may occur.
20,20A パープルフリンジ補正装置
21 画像入力装置
22 輝度差算出回路
23 最大輝度差選択回路
24 色相判定回路
25 補正判断回路
26 パープルフリンジ補正回路
31 CCD傷検出回路
32 CCD傷補正回路
33 ノイズ量検出回路
34 ノイズリダクション処理回路
20,20A Purple fringe correction device
21 Image input device
22 Luminance difference calculation circuit
23 Maximum brightness difference selection circuit
24 Hue judgment circuit
25 Correction judgment circuit
26 Purple fringe correction circuit
31 CCD scratch detection circuit
32 CCD scratch correction circuit
33 Noise detection circuit
34 Noise reduction processing circuit
Claims (8)
サイズによって処理対象画素とその処理対象画素の周囲に位置する輝度算出対象画素との距離を定める,互いに異なるサイズを有する複数のカーネルを,一方が他方を包含する位置関係を保ったまま,上記画像入力手段によって受付けられた画像データによって表される処理対象画像上を走査させることによって,処理対象画素ごとかつ上記カーネルごとに,水平方向,垂直方向および2つの斜め方向のそれぞれについて,上記処理対象画素を中心にして対称位置にある輝度算出対象画素の輝度差を算出する輝度差算出手段,ならびに
上記輝度差算出手段によって算出された複数の輝度差のうち最も大きな輝度差を所定の閾値と比較する比較手段を備え,
上記比較手段によって最大輝度差が上記閾値よりも大きいと判断された場合に,上記処理対象画素がパープルフリンジを発生している画素であるかどうかの判断に進む,
画像処理装置。 Image input means for accepting input of given image data;
A plurality of kernels having different sizes that define the distance between the processing target pixel and the luminance calculation target pixel located around the processing target pixel according to the size, while maintaining the positional relationship including one of the other. By scanning the processing target image represented by the image data received by the input means, the processing target pixel for each of the processing target pixel and for each of the kernels in the horizontal direction, the vertical direction, and the two diagonal directions. A luminance difference calculating means for calculating a luminance difference of a luminance calculation target pixel at a symmetrical position with respect to the center, and comparing the largest luminance difference among a plurality of luminance differences calculated by the luminance difference calculating means with a predetermined threshold value A comparison means,
When the comparison means determines that the maximum luminance difference is greater than the threshold value, the process proceeds to a determination as to whether the processing target pixel is a pixel that has generated purple fringes.
Image processing device.
請求項1に記載の画像処理装置。 Whether or not the processing target pixel is a pixel that has generated purple fringes is determined by whether or not the color of the processing target pixel is purple.
The image processing apparatus according to claim 1.
上記補正係数算出手段によって算出された補正係数を用いて上記処理対象画素を色補正する色補正手段を備える,
請求項2に記載の画像処理装置。 When it is determined that the color of the processing target pixel is purple, a correction coefficient calculation unit that calculates a correction coefficient that changes the color or saturation of the processing target pixel, and a correction coefficient calculated by the correction coefficient calculation unit Using color correction means for correcting the color of the pixel to be processed using
The image processing apparatus according to claim 2.
請求項3に記載の画像処理装置。 A color correction avoiding means for avoiding color correction using the correction coefficient by the color correcting means when the correction coefficient increases the signal amount of the blue component signal of the processing target pixel;
The image processing apparatus according to claim 3.
上記傷ノイズ判断によって撮像素子における傷を起因とする傷ノイズが含まれていると判断された場合に,上記傷ノイズを除去する傷ノイズ除去手段をさらに備える,
請求項1に記載の画像処理装置。 Scratch noise determining means for determining whether or not the image represented by the image data received from the image input means includes scratch noise due to scratches in the image sensor; and A scratch noise removing means for removing the scratch noise when it is determined that the scratch noise is caused by
The image processing apparatus according to claim 1.
ノイズ量検出手段によって所定の閾値以上のノイズ量が検出された場合に,少なくとも上記ノイズ量が上記閾値より少なくなるように,上記ノイズを除去するノイズ除去手段をさらに備える,
請求項1に記載の画像処理装置。 A noise amount detecting means for detecting a noise amount of noise included in an image represented by image data received from the image input means, and a noise amount equal to or greater than a predetermined threshold value detected by the noise amount detecting means; A noise removing means for removing the noise so that at least the amount of noise is less than the threshold value;
The image processing apparatus according to claim 1.
輝度差算出手段が,サイズによって処理対象画素とその処理対象画素の周囲に位置する輝度算出対象画素との距離を定める,互いに異なるサイズを有する複数のカーネルを,一方が他方を包含する位置関係を保ったまま,上記画像入力手段によって受付けられた画像データによって表される処理対象画像上を走査させることによって,処理対象画素ごとかつ上記カーネルごとに,水平方向,垂直方向および2つの斜め方向のそれぞれについて,上記処理対象画素を中心にして対称位置にある輝度算出対象画素の輝度差を算出し,
比較手段が,上記輝度差算出手段によって算出された複数の輝度差のうち最も大きな輝度差を所定の閾値と比較し,
上記比較手段によって最大輝度差が上記閾値よりも大きいと判断された場合に,上記処理対象画素がパープルフリンジを発生している画素であるかどうかの判断に進む,
画像処理方法。 Image input means accepts input of given image data,
The luminance difference calculating means determines the distance between the processing target pixel and the luminance calculation target pixel located around the processing target pixel according to the size, and includes a plurality of kernels having different sizes, one of which includes the other By scanning the processing target image represented by the image data received by the image input means while maintaining the horizontal direction, the vertical direction, and the two diagonal directions for each processing target pixel and for each kernel. , The luminance difference of the luminance calculation target pixel at the symmetrical position with respect to the processing target pixel is calculated,
A comparing means for comparing the largest brightness difference among the plurality of brightness differences calculated by the brightness difference calculating means with a predetermined threshold;
When the comparison means determines that the maximum luminance difference is greater than the threshold value, the process proceeds to a determination as to whether the processing target pixel is a pixel that has generated purple fringes.
Image processing method.
与えられる画像データの入力を受付ける画像入力手段,
サイズによって処理対象画素とその処理対象画素の周囲に位置する輝度算出対象画素との距離を定める,互いに異なるサイズを有する複数のカーネルを,一方が他方を包含する位置関係を保ったまま,上記画像入力手段によって受付けられた画像データによって表される処理対象画像上を走査させることによって,処理対象画素ごとかつ上記カーネルごとに,水平方向,垂直方向および2つの斜め方向のそれぞれについて,上記処理対象画素を中心にして対称位置にある輝度算出対象画素の輝度差を算出する輝度差算出手段,ならびに
上記輝度差算出手段によって算出された複数の輝度差のうち最も大きな輝度差を所定の閾値と比較する比較手段として機能させ,
上記最大輝度差が上記閾値よりも大きいと判断された場合に,上記処理対象画素がパープルフリンジを発生している画素であるかどうかの判断に進むように上記コンピュータを制御する,
プログラム。 Computer,
Image input means for accepting input of given image data;
A plurality of kernels having different sizes that define the distance between the processing target pixel and the luminance calculation target pixel located around the processing target pixel according to the size, while maintaining the positional relationship including one of the other. By scanning the processing target image represented by the image data received by the input means, the processing target pixel for each of the processing target pixel and for each of the kernels in the horizontal direction, the vertical direction, and the two diagonal directions. A luminance difference calculating means for calculating a luminance difference of a luminance calculation target pixel at a symmetrical position with respect to the center, and comparing the largest luminance difference among a plurality of luminance differences calculated by the luminance difference calculating means with a predetermined threshold value Function as a means of comparison,
If the maximum brightness difference is determined to be greater than the threshold, the computer is controlled to proceed to determine whether the processing target pixel is a pixel that has generated purple fringes;
program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010070595A JP5256236B2 (en) | 2010-03-25 | 2010-03-25 | Image processing apparatus and method, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010070595A JP5256236B2 (en) | 2010-03-25 | 2010-03-25 | Image processing apparatus and method, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011205399A JP2011205399A (en) | 2011-10-13 |
JP5256236B2 true JP5256236B2 (en) | 2013-08-07 |
Family
ID=44881558
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010070595A Expired - Fee Related JP5256236B2 (en) | 2010-03-25 | 2010-03-25 | Image processing apparatus and method, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5256236B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102009185B1 (en) | 2013-01-10 | 2019-08-09 | 삼성전자 주식회사 | Method for removing color fringe |
JP6337441B2 (en) * | 2013-10-30 | 2018-06-06 | リコーイメージング株式会社 | Image processing apparatus, imaging apparatus, image processing method, and image processing program |
US20230333250A1 (en) | 2020-09-16 | 2023-10-19 | Nec Corporation | Monitoring system, method, and non-transitory computer-readable medium storing program |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4419479B2 (en) * | 2003-08-29 | 2010-02-24 | 株式会社ニコン | Image processing apparatus and image processing program |
JP4479457B2 (en) * | 2004-05-27 | 2010-06-09 | ソニー株式会社 | Image processing apparatus, image processing method, and computer program |
JP5200645B2 (en) * | 2008-04-24 | 2013-06-05 | 株式会社ニコン | Image processing apparatus, imaging apparatus, image processing method, and program |
-
2010
- 2010-03-25 JP JP2010070595A patent/JP5256236B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2011205399A (en) | 2011-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4054184B2 (en) | Defective pixel correction device | |
JP4904440B2 (en) | Image processing method and apparatus, image processing program, and medium storing this program | |
US8035704B2 (en) | Method and apparatus for processing a digital image having defective pixels | |
US8970745B2 (en) | Image processing device, image processing method and storage medium to suppress shading of images in which pixel addition processing is performed | |
US9367902B2 (en) | Image processing device, endoscope apparatus, isolated point noise correction method, and information storage device | |
JP5060535B2 (en) | Image processing device | |
JP2002033964A (en) | Defective pixel correction method for digital images | |
US9936172B2 (en) | Signal processing device, signal processing method, and signal processing program for performing color reproduction of an image | |
US20180077395A1 (en) | Image processing apparatus, image processing method, and storage medium for performing correction for a target pixel having high luminance in an image | |
JP4604078B2 (en) | Defective pixel correction method, defective pixel correction program, and defective pixel correction device | |
JP6099536B2 (en) | Image processing apparatus, image processing method, and image processing program | |
US20190166320A1 (en) | Image processing apparatus, image processing method, and non-transitory computer readable recording medium | |
JP4386959B1 (en) | Image processing device | |
JP6230760B1 (en) | Imaging apparatus, image processing apparatus, image processing method, and image processing program | |
JP2014027403A (en) | Image processor | |
JP5256236B2 (en) | Image processing apparatus and method, and image processing program | |
US20070269133A1 (en) | Image-data noise reduction apparatus and method of controlling same | |
JP4993275B2 (en) | Image processing device | |
JP2006041687A (en) | Image processing apparatus, image processing method, image processing program, electronic camera, and scanner | |
JP5458906B2 (en) | Image processing device | |
JP6041523B2 (en) | Image processing apparatus and method | |
JP2010056817A (en) | Imaging apparatus | |
JP2010154390A (en) | Imaging device, imaging method, and program | |
JP4021306B2 (en) | False color reduction device | |
JP2025035240A (en) | Image Processing Device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120514 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130315 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130402 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130422 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5256236 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160426 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |