JP4681407B2 - In-focus area display image generation apparatus and in-focus area display image generation program - Google Patents

In-focus area display image generation apparatus and in-focus area display image generation program Download PDF

Info

Publication number
JP4681407B2
JP4681407B2 JP2005275898A JP2005275898A JP4681407B2 JP 4681407 B2 JP4681407 B2 JP 4681407B2 JP 2005275898 A JP2005275898 A JP 2005275898A JP 2005275898 A JP2005275898 A JP 2005275898A JP 4681407 B2 JP4681407 B2 JP 4681407B2
Authority
JP
Japan
Prior art keywords
distance
weight
focus
pixel
image
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.)
Active
Application number
JP2005275898A
Other languages
Japanese (ja)
Other versions
JP2007086481A (en
Inventor
良平 船津
公二 三谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Japan Broadcasting Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
Priority to JP2005275898A priority Critical patent/JP4681407B2/en
Publication of JP2007086481A publication Critical patent/JP2007086481A/en
Application granted granted Critical
Publication of JP4681407B2 publication Critical patent/JP4681407B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Focusing (AREA)
  • Indication In Cameras, And Counting Of Exposures (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Description

本発明は、ピントの情報を表示する技術に係り、特に、撮影された画像上にピントの合う領域を表示する合焦領域表示画像生成装置及び合焦領域表示画像生成プログラムに関する。 The present invention relates to a technique for displaying the information of focus, in particular, to focus area display image generating instrumentation 置及 beauty focus area display image generating program to display the area in focus on the captured image.

近年、ハイビジョンに代表されるように、映像の高解像度化が進み、それに伴って、撮影時に精度よくピントを合わせることの要求が高まっている。しかし、カメラ用のビューファインダの映像は、物理的な制約から高解像度化することは困難である。そこで、低い解像度でも精度よくピントを合わせるために、ピントの位置を、数値やゲージを用いて撮影者に提示する方法が開示されている(特許文献1参照)。また、撮影された映像上において、ピントが合っている領域に多く含まれる高域の周波数成分にフリッカを発生させて表示する方法が開示されている(特許文献2参照)。
特開平8−286254号公報(段落番号0001〜0010) 特公平7−87539号公報(第2頁右欄第13行目〜第4頁右欄第9行目)
In recent years, as represented by high vision, the resolution of images has been increased, and accordingly, there has been an increasing demand for accurate focusing at the time of shooting. However, it is difficult to increase the resolution of a viewfinder image for a camera due to physical limitations. Therefore, a method of presenting the focus position to the photographer using a numerical value or a gauge is disclosed in order to focus accurately with a low resolution (see Patent Document 1). Further, a method is disclosed in which flicker is generated and displayed on high frequency components included in a focused area on a captured video (see Patent Document 2).
JP-A-8-286254 (paragraph numbers 0001 to 0010) JP-B-7-87539 (page 2, right column, line 13 to page 4, right column, line 9)

しかしながら、特許文献1に記載の方法では、ピントの位置を具体的な数値や目盛りで知ることはできるが、それが撮影された映像上のどの領域に対応するのかを撮影者が瞬時に正確に特定することは困難であった。また、特許文献2に記載の方法では、映像上においてピントが合っている領域を撮影者に提示することができるが、映像から信号処理によって高域周波数成分を抽出して表示するため、特に解像度の高い撮像素子では、実際にはピントが合っていない領域にまで誤ってフリッカが発生してしまう可能性があった。更に、フリッカを発生させる映像自体も、フリッカが輝度成分として合成されるために視覚的に見づらくなってしまうという問題があった。また、撮影者がこの映像に基づいて撮影する場合に、輝度を変化させてしまうと、明るさの変化に合わせてアイリスを調整するアイリスフォローを適切に行うことが困難になるという問題があった。   However, in the method described in Patent Document 1, although the position of the focus can be known with specific numerical values and scales, the photographer can instantly and accurately determine which area on the image where the image is taken. It was difficult to identify. In the method described in Patent Document 2, a photographer can be presented with an in-focus area on the video. However, since a high-frequency component is extracted from the video by signal processing and displayed, the resolution is particularly high. In an image pickup device with a high image quality, there is a possibility that flicker may occur erroneously even in an area that is not in focus. Further, the video itself that generates flicker has a problem that it is difficult to visually see because the flicker is synthesized as a luminance component. In addition, when the photographer shoots based on this video, if the brightness is changed, there is a problem that it is difficult to appropriately perform iris follow to adjust the iris according to the change in brightness. .

本発明は、前記従来技術の問題を解決するために創作されたもので、撮影された映像を見づらくすることなく、当該映像においてピントの合う領域を提示することができる合焦領域表示画像生成装置及び合焦領域表示画像生成プログラムを提供することを目的とする。 The present invention was created to solve the above-described problems of the prior art, and is an in-focus area display image generation device capable of presenting an in-focus area in the video without making it difficult to see the captured video. and to provide a 置及 beauty focus area display image generation program.

前記課題を解決するため、請求項1に記載の合焦領域表示画像生成装置は、被写体を撮影したカメラのフォーカスの情報を含むレンズ情報と、前記カメラから前記被写体までの距離を示す距離情報とを外部から入力し、前記カメラによって撮影された画像である被写体画像において、ピントの合う領域である合焦領域を示す画像を生成する合焦領域表示画像生成装置であって、重み関数算出手段と、重み分布算出手段と、画素値算出手段とを備える構成とした。 In order to solve the above problem, the in-focus area display image generating device according to claim 1, lens information including information on a focus of a camera that has photographed a subject, distance information indicating a distance from the camera to the subject, Is an in-focus area display image generation device that generates an image indicating an in-focus area, which is an in-focus area, in a subject image that is an image captured by the camera, and a weighting function calculating unit ; The weight distribution calculating means and the pixel value calculating means are provided.

かかる構成によれば、合焦領域表示画像生成装置は、合焦距離算出手段によって、レンズ情報に基づいて、ピント位置と前方被写界深度d1と後方被写界深度d2とを算出し、被写体画像において、ピント位置から前方被写界深度d1および後方被写界深度d2の範囲に対応する画素に対して、画素の画素値に重み付けするための重みと、カメラから画素に対応する実空間上の位置までの距離dとの関係を示す重み関数I(d)を算出する。この重み関数I(d)は、距離dがカメラから前記ピント位置までの距離Lのときに重みが最大になり、距離dと距離Lとの差が大きくなるにつれて重みが減少して、距離dが前方被写界深度d1および後方被写界深度d2に対応する距離(L−d1)、(L−d2)のときに重みが0になる。また、合焦領域表示画像生成装置は、重み分布算出手段によって、重み関数算出手段が算出した重み関数I(d)に基づいて、画素ごとに距離情報に対応した重みを算出する。つまり、合焦領域特定手段は、距離情報によって示されるカメラから被写体までの距離が、合焦距離算出手段で算出された距離の範囲内にある被写体画像上の領域を、合焦領域として特定することができる。また、合焦領域表示画像生成装置は、画素値算出手段によって、被写体画像の画素ごとに、被写体画像の画素の輝度を維持したままで重み分布算出手段によって算出された重みに応じた量だけ画素の色を変化させて合焦領域を示す画像を生成するAccording to such a configuration, the focus area display image generation device calculates the focus position, the front depth of field d1, and the rear depth of field d2 based on the lens information by the focus distance calculation unit, and In the image, for the pixels corresponding to the range of the forward depth of field d1 and the backward depth of field d2 from the focus position, the weight for weighting the pixel value of the pixel, and the real space corresponding to the pixel from the camera A weighting function I (d) indicating the relationship with the distance d to the position is calculated. The weight function I (d) has the maximum weight when the distance d is the distance L from the camera to the focus position, and the weight decreases as the difference between the distance d and the distance L increases. Is a distance (L−d1) and (L−d2) corresponding to the front depth of field d1 and the rear depth of field d2, the weight becomes zero. In the focused area display image generation device, the weight distribution calculation unit calculates a weight corresponding to the distance information for each pixel based on the weight function I (d) calculated by the weight function calculation unit. That is, the focus area specifying unit specifies, as the focus area, an area on the subject image in which the distance from the camera indicated by the distance information to the subject is within the distance range calculated by the focus distance calculation unit. be able to. Further, the in-focus area display image generating device uses the pixel value calculating unit to generate pixels for each pixel of the subject image by an amount corresponding to the weight calculated by the weight distribution calculating unit while maintaining the luminance of the pixel of the subject image. An image showing the in-focus area is generated by changing the color of .

これによって、合焦領域表示画像生成装置は、被写体画像において、各画素の輝度を維持しつつ、ピントの合う領域(合焦領域)とピントの合わない領域とを異なる色で示した画像を生成することができる。   As a result, the focused area display image generating device generates an image in which the focused area (in-focus area) and the out-of-focus area are displayed in different colors while maintaining the luminance of each pixel in the subject image. can do.

また、請求項2に記載の合焦領域表示画像生成装置は、請求項1に記載の合焦領域表示画像生成装置において、重み関数算出手段が、式(2)で定義される重み関数I(d)を算出する構成とした。 Further, the in-focus area display image generating apparatus according to claim 2 is the in-focus area display image generating apparatus according to claim 1, wherein the weight function calculating means is a weight function I ( It was set as the structure which calculates d) .

更に、請求項3に記載の合焦領域表示画像生成装置は、請求項1又は請求項2に記載の合焦領域表示画像生成装置において、画素値算出手段が、被写体画像が単色の画像である場合、α、β、γがα+β+γ=1、α≧0、β≧0、γ≧0と定義されるときに、3原色の信号レベルG、B、Rと、重み付け後の3原色の信号レベルG’、B’、R’との変化量ΔG、ΔB、ΔRをGmをG信号の取りうる最大値として式(5)によって算出し、変化量ΔG、ΔB、ΔRだけ前記3原色の信号レベルG、B、Rを変化させる構成とした。 Furthermore, the focused area display image generation device according to claim 3 is the focused area display image generation device according to claim 1 or 2 , wherein the pixel value calculation means is an image in which the subject image is a single color. In this case, when α, β, and γ are defined as α + β + γ = 1, α ≧ 0, β ≧ 0, and γ ≧ 0, the signal levels G, B, and R of the three primary colors and the signal levels of the three primary colors after weighting The change amounts ΔG, ΔB, and ΔR with G ′, B ′, and R ′ are calculated by Equation (5) , where Gm is the maximum value that the G signal can take, and the signals of the three primary colors are changed by the change amounts ΔG, ΔB, and ΔR. The level G, B, and R are changed .

また、請求項4に記載の合焦領域表示画像生成装置は、請求項1又は請求項2に記載の合焦領域表示画像生成装置において、被写体画像がカラーの画像である場合、α、β、γがα+β+γ=1、α≧0、β≧0、γ≧0と定義され、輝度信号の信号レベルYとG、B、R信号の信号レベルG、B、Rとの間にY=αG+βB+γRの関係が成り立つときに、3原色の信号レベルG、B、Rと、重み付け後の3原色の信号レベルG’、B’、R’との変化量ΔG、ΔB、ΔRを式(7)によって算出し、変化量ΔG、ΔB、ΔRだけ3原色の信号レベルを変化させる構成とした。 Further, the in-focus area display image generating apparatus according to claim 4 is the in-focus area display image generating apparatus according to claim 1 or 2, wherein when the subject image is a color image, α, β, γ is defined as α + β + γ = 1, α ≧ 0, β ≧ 0, γ ≧ 0, and Y = αG + βB + γR between the signal level Y of the luminance signal and the signal levels G, B, R of the G, B, and R signals. When the relationship holds, the change amounts ΔG, ΔB, ΔR between the signal levels G, B, R of the three primary colors and the signal levels G ′, B ′, R ′ of the three primary colors after weighting are calculated by the equation (7). In addition, the signal levels of the three primary colors are changed by the change amounts ΔG, ΔB, and ΔR.

更に、請求項5に記載の合焦領域表示画像生成プログラムは、被写体を撮影したカメラのフォーカスの情報を含むレンズ情報と、前記カメラから前記被写体までの距離を示す距離情報とを外部から入力し、前記カメラによって撮影された画像である被写体画像において、ピントの合う領域である合焦領域を示す画像を生成するためにコンピュータを、重み関数算出手段重み分布算出手段、画素値算出手段として機能させることとした。 Furthermore, the focused area display image generation program according to claim 5 inputs lens information including information on a focus of a camera that has photographed a subject and distance information indicating a distance from the camera to the subject from the outside. The computer functions as a weighting function calculating unit , a weight distribution calculating unit , and a pixel value calculating unit for generating an image indicating a focused region that is a focused region in a subject image that is an image captured by the camera. I decided to let them.

かかる構成によれば、合焦領域表示画像生成プログラムは、重み関数算出手段によって、レンズ情報に基づいて、ピント位置と前方被写界深度d1と後方被写界深度d2とを算出し、被写体画像において、ピント位置から前方被写界深度d1および後方被写界深度d2の範囲に対応する画素に対して、画素の画素値に重み付けするための重みと、カメラから画素に対応する実空間上の位置までの距離dとの関係を示す重み関数I(d)を算出する。また、合焦領域表示画像生成プログラムは、重み分布算出手段によって、重み関数算出手段によって算出された重み関数I(d)に基づいて、画素ごとに距離情報に対応した重みを算出する。また、合焦領域表示画像生成プログラムは、画素値算出手段によって、被写体画像の画素ごとに、被写体画像の画素の輝度を維持したままで重み分布算出手段によって算出された重みに応じた量だけ画素の色を変化させて合焦領域を示す画像を生成するAccording to this configuration, the focused area display image generation program calculates the focus position, the front depth of field d1, and the rear depth of field d2 based on the lens information by the weight function calculation unit , and the subject image. , The weight for weighting the pixel value of the pixel corresponding to the range of the forward depth of field d1 and the backward depth of field d2 from the focus position, and the real space corresponding to the pixel from the camera A weight function I (d) indicating a relationship with the distance d to the position is calculated. Further, the focused area display image generation program calculates a weight corresponding to the distance information for each pixel based on the weight function I (d) calculated by the weight function calculation unit by the weight distribution calculation unit. Further, the focus area display image generation program generates, for each pixel of the subject image, the pixel value calculation unit by the amount corresponding to the weight calculated by the weight distribution calculation unit while maintaining the luminance of the pixel of the subject image. An image showing the in-focus area is generated by changing the color of .

これによって、合焦領域表示画像生成プログラムは、被写体画像において、各画素の輝度を維持しつつ、ピントの合う領域とピントの合わない領域とを異なる色で示した画像を生成することができる。   Accordingly, the focused area display image generation program can generate an image in which the focused area and the unfocused area are displayed in different colors while maintaining the luminance of each pixel in the subject image.

本発明に係る合焦領域表示画像生成装置及び合焦領域表示画像生成プログラムでは、以下のような優れた効果を奏する。
請求項1又は請求項5に記載の発明によれば、輝度を変えることなくピントの合う領域とピントの合わない領域とを異なる色で示す画像を生成するため、撮影されたものを見づらくすることなくピントの合う領域を示すことができる画像となる。そのため、ビューファインダのような物理的に大きさや解像度が制限された表示装置を用いてもピントの合う領域を撮影者に対して示すことができ、撮影者が適切にピントを合わせることが可能になるとともに、撮影された画像と比べて輝度に変化がないため、アイリスフォローも適切に行うことが可能になる。
The focus area display image generating instrumentation 置及 beauty focus area display image generating program according to the present invention exhibits the following excellent effects.
If the claim 1 or the invention of claim 5, for generating an image showing a region that does not match the area and the subject is in focus without changing the luminance in different colors, difficult to see what was photographed The image can show the in-focus area without any problem. Therefore, even when using a display device such as a viewfinder that is physically limited in size and resolution, it is possible to show the photographer the in-focus area, and the photographer can properly focus. In addition, since there is no change in luminance as compared with the photographed image, it is possible to appropriately perform iris follow-up.

また、請求項1又は請求項5に記載の発明によれば、ピントの合う領域の画素の画素値に重みを付けて、その重みと距離情報とに基づいて、輝度を変えることなくピントの合う領域とピントの合わない領域とを異なる色で示す画像を生成することができる。 In addition, according to the first or fifth aspect of the invention, the pixel values of the pixels in the in-focus area are weighted, and the focus is achieved without changing the luminance based on the weight and distance information. It is possible to generate an image indicating the area and the out-of-focus area in different colors.

また、請求項1又は請求項5に記載の発明によれば、ピントの合う領域内においてピント位置から遠ざかるにしたがって色が変化するため、ピント位置に近いか遠いかを示すことができる画像を生成することができる。 According to the first or fifth aspect of the invention, since the color changes as the distance from the focus position increases within the in-focus area, an image that can indicate whether the focus position is close or far is generated. can do.

以下、本発明の実施の形態について図面を参照して説明する。
[合焦領域表示画像生成装置の構成]
まず、図1を参照して、本発明における合焦領域表示画像生成装置1の構成について説明する。図1は、本発明における合焦領域表示画像生成装置の構成を示したブロック図である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[Configuration of Focused Area Display Image Generation Device]
First, with reference to FIG. 1, the structure of the focus area | region display image generation apparatus 1 in this invention is demonstrated. FIG. 1 is a block diagram showing a configuration of a focused area display image generating apparatus according to the present invention.

合焦領域表示画像生成装置1は、カメラCによって撮影された映像において、フレーム画像あるいはフィールド画像ごとにピントが合っている領域である合焦領域を示す画像を生成するものである。合焦領域表示画像生成装置1は、重み関数算出手段11と、重み分布算出手段12と、重み付き画素値算出手段13とを備える。   The in-focus area display image generating device 1 generates an image indicating an in-focus area, which is an in-focus area for each frame image or field image, in the video captured by the camera C. The focused area display image generation apparatus 1 includes a weight function calculation unit 11, a weight distribution calculation unit 12, and a weighted pixel value calculation unit 13.

なお、合焦領域表示画像生成装置1には、外部から、被写体を撮影したカメラCのフォーカスの情報を含むレンズ情報、被写体の画像である被写体画像、及び、カメラCから被写体までの距離を示す距離情報の当該被写体画像の各画素に対応する分布を示す距離分布情報が入力される。   The in-focus area display image generation device 1 indicates lens information including focus information of the camera C that has photographed the subject, a subject image that is a subject image, and a distance from the camera C to the subject. Distance distribution information indicating the distribution of distance information corresponding to each pixel of the subject image is input.

ここで、被写体画像は、カメラCによって撮影された被写体の画像のデータであり、実空間上のある点の輝度の情報を2次元状に配列したものである。この被写体画像は、単色(モノクロ)の画像であってもよく、このとき、合焦領域表示画像生成装置1には輝度の信号が外部から入力される。また、被写体画像をカラー画像とし、合焦領域表示画像生成装置1に、例えば、赤(R)、緑(G)、青(B)の3原色の信号(あるいは、輝度及び色差の信号)が入力されることとしてもよい。また、合焦領域とは、被写体画像においてピントが合う領域であり、カメラCによって撮影された際に実空間上においてピントの合う位置にある被写体が、被写体画像上において撮影されている領域である。   Here, the subject image is data of a subject image taken by the camera C, and is information in which luminance information at a certain point in the real space is arranged in a two-dimensional manner. The subject image may be a single color (monochrome) image, and at this time, a luminance signal is input to the focused area display image generation device 1 from the outside. Further, the subject image is a color image, and the focused area display image generating apparatus 1 receives, for example, signals of three primary colors (or luminance and color difference signals) of red (R), green (G), and blue (B). It may be input. The in-focus area is an area in which the subject image is in focus, and an object that is in focus on the real space when captured by the camera C is captured on the subject image. .

また、距離分布情報は、2次元状に距離情報を配置したデータであり、各距離情報は、前記画像の各画素に対応する実空間上の点とカメラCとの間の距離を示すものである。距離情報として、例えば、実空間上の点とカメラC上の代表的な点との間の距離を一意に決定できる数値を用いることができる。すなわち、例えば、実空間上の点とカメラCのレンズの第1光学主点との距離を距離情報とすることができる。   The distance distribution information is data in which distance information is arranged two-dimensionally, and each distance information indicates a distance between a point in the real space corresponding to each pixel of the image and the camera C. is there. As the distance information, for example, a numerical value that can uniquely determine the distance between a point on the real space and a representative point on the camera C can be used. That is, for example, a distance between a point in real space and the first optical principal point of the lens of the camera C can be used as distance information.

重み関数算出手段(合焦距離算出手段)11は、外部から入力されたレンズ情報に含まれるカメラCのフォーカスの情報に基づいて、重み関数を算出するものである。重み関数は、カメラCからレンズのピントの合う位置までの距離に対応する被写体画像の画素に対して、輝度の情報によって示される色の情報(画素値)に重み付けをするための重みを表すもので、カメラCから被写体までの距離と重みとの関係を表す関数である。ここで算出された重み関数は、重み分布算出手段12に出力される。なお、このピントの合う位置とは、重み関数算出手段11によって算出される、レンズのピント位置から前方被写界深度及び後方被写界深度の範囲内の位置を示す。   The weight function calculating means (focus distance calculating means) 11 calculates a weight function based on the focus information of the camera C included in the lens information input from the outside. The weight function represents the weight for weighting the color information (pixel value) indicated by the luminance information for the pixel of the subject image corresponding to the distance from the camera C to the in-focus position of the lens. This is a function representing the relationship between the distance from the camera C to the subject and the weight. The weight function calculated here is output to the weight distribution calculation means 12. The in-focus position indicates a position within the range of the front depth of field and the rear depth of field calculated by the weight function calculation means 11 from the focus position of the lens.

ここで、図2を参照(適宜図1参照)して、重み関数算出手段11によって算出される重み関数の例について説明する。図2は、重み関数算出手段によって算出される重み関数の例を示すグラフである。   Here, an example of the weight function calculated by the weight function calculation means 11 will be described with reference to FIG. 2 (refer to FIG. 1 as appropriate). FIG. 2 is a graph showing an example of the weight function calculated by the weight function calculating means.

ここで、重み関数算出手段11は、フォーカスの情報に基づいて、カメラCから当該カメラCのレンズのピント位置までの距離Lと、前方被写界深度d1及び後方被写界深度d2に対応する距離とを算出する。ここでは、重み関数算出手段11は、カメラCからの距離dの関数である重み関数I(d)を算出し、図2に示すように、距離dがカメラCからピント位置までの距離Lのときに最大(図2では1)になり、距離dがLより大きくあるいは小さくなるにつれて徐々に減少して、距離dが前方被写界深度d1及び後方被写界深度d2に対応する距離(L−d1)、(L+d2)のときに0になる重み関数I(d)を算出する。   Here, the weight function calculation unit 11 corresponds to the distance L from the camera C to the focus position of the lens of the camera C, the front depth of field d1, and the rear depth of field d2 based on the focus information. Calculate the distance. Here, the weight function calculating means 11 calculates a weight function I (d) that is a function of the distance d from the camera C, and as shown in FIG. 2, the distance d is the distance L from the camera C to the focus position. Sometimes it becomes maximum (1 in FIG. 2) and gradually decreases as the distance d becomes larger or smaller than L, and the distance d corresponds to the distance (L) corresponding to the forward depth of field d1 and the backward depth of field d2. A weighting function I (d) that is 0 when -d1) and (L + d2) is calculated.

例えば、重み関数算出手段11は、重み関数I(d)を以下の式(1)のように算出することとしてもよい。   For example, the weight function calculating unit 11 may calculate the weight function I (d) as in the following formula (1).

Figure 0004681407
Figure 0004681407

また、例えば、重み関数算出手段11は、重み関数I(d)を以下の式(2)のように算出することとしてもよい。   Further, for example, the weight function calculating unit 11 may calculate the weight function I (d) as shown in the following equation (2).

Figure 0004681407
Figure 0004681407

図1に戻って説明を続ける。重み分布算出手段(合焦領域特定手段)12は、外部から入力された距離分布情報と、重み関数算出手段11によって算出された重み関数I(d)とに基づいて、被写体画像の各々の画素の画素値に対する重みを算出するものである。ここで、重み関数I(d)は、カメラCから被写体までの距離dに依存する関数であるので、重み分布算出手段12は、距離分布情報によって示される画素ごとの距離dに基づいて、重み関数I(d)から画素ごとの重みを算出することができる。ここで算出された重みの情報は、重み付き画素値算出手段13に出力される。   Returning to FIG. 1, the description will be continued. The weight distribution calculating means (focused area specifying means) 12 is based on the distance distribution information input from the outside and the weight function I (d) calculated by the weight function calculating means 11 to each pixel of the subject image. The weight for the pixel value is calculated. Here, since the weighting function I (d) is a function that depends on the distance d from the camera C to the subject, the weight distribution calculating unit 12 performs weighting based on the distance d for each pixel indicated by the distance distribution information. The weight for each pixel can be calculated from the function I (d). The weight information calculated here is output to the weighted pixel value calculation means 13.

ここで、図3を参照(適宜図1参照)して、重み分布算出手段12によって算出される重みの分布の例について説明する。図3は、平面状の被写体において、図2に示す重み関数に基づいて、重み分布算出手段によって算出される重みの値の分布を模式的に示す模式図である。   Here, an example of the weight distribution calculated by the weight distribution calculating means 12 will be described with reference to FIG. 3 (refer to FIG. 1 as appropriate). FIG. 3 is a schematic diagram schematically showing a distribution of weight values calculated by the weight distribution calculating unit based on the weight function shown in FIG. 2 in a planar subject.

例えば、撮影される被写体が平面の場合には、重み分布算出手段12は、図3に示すようにカメラCからの距離がL、(L−d1)、(L+d2)となる位置が、各々曲線(閉曲線)EL、Ed1、Ed2となる重みの分布を算出する。そして、曲線Ed1と曲線Ed2によって囲まれる領域が合焦領域となる。つまり、この合焦領域は、領域内の各々の画素に対応する実空間上の点とカメラCとの間の距離dが、ピント位置から前方被写界深度及び後方被写界深度の範囲内[(L−d1)<d<(L+d2)]になる領域である。このとき、曲線EL上において重みが最大(図2では1)、曲線Ed1、Ed2上において重みが0となり、曲線ELから曲線Ed1、Ed2に近づくにつれて重みは単調減少する。 For example, when the subject to be photographed is a plane, the weight distribution calculating unit 12 indicates that the positions where the distance from the camera C is L, (L−d1), and (L + d2) are curved as shown in FIG. (Closed curve) The distribution of weights for E L , E d1 and E d2 is calculated. A region surrounded by the curve E d1 and the curve E d2 is a focusing region. In other words, in this in-focus area, the distance d between the point in the real space corresponding to each pixel in the area and the camera C is within the range of the forward depth of field and the backward depth of field from the focus position. This is a region where [(L−d1) <d <(L + d2)]. At this time, the weight is the maximum on the curve E L (in FIG. 2 1), the weight as the weight on the curve E d1, E d2 is 0, approaches the curve E L curve E d1, E d2 monotonically decreases.

図1に戻って説明を続ける。重み付き画素値算出手段(画素値算出手段)13は、重み分布算出手段12によって解析された重みに基づいて、外部から入力された被写体画像の各画素の画素値に対して重み付けし、合焦領域を示す画像を生成するものである。ここで算出された画素値の情報は外部に出力される。   Returning to FIG. 1, the description will be continued. The weighted pixel value calculating means (pixel value calculating means) 13 weights the pixel value of each pixel of the subject image inputted from the outside based on the weight analyzed by the weight distribution calculating means 12, and focuses it. An image showing a region is generated. The pixel value information calculated here is output to the outside.

以下、重み付き画素値算出手段13が、合焦領域を示す画像を生成する方法について説明する。まず、重み付き画素値算出手段13が、単色の被写体画像を入力し、合焦領域をグリーンの領域として示すように画素値を設定する場合について説明する。なお、ここでは、合焦領域をグリーンの領域として示すこととしたが、他の色の領域として示すこととしてもよい。   Hereinafter, a method in which the weighted pixel value calculation unit 13 generates an image indicating the in-focus area will be described. First, a case will be described in which the weighted pixel value calculation unit 13 inputs a single-color subject image and sets pixel values so as to indicate the in-focus area as a green area. Here, the focus area is shown as a green area, but it may be shown as another color area.

被写体画像が単色の画像である場合、入力された被写体画像の各画素の輝度信号の信号レベルYに基づいて、被写体画像の各画素のG信号、B信号及びR信号の各々の信号レベルG、B、Rは、以下の式(3)のようになる。
G=B=R=Y …(3)
ここで、輝度信号の信号レベルYとG、B、R信号の信号レベルG、B、Rには、以下の式(4)の関係が成り立つ。
Y=αG+βB+γR …(4)
ここで、α+β+γ=1、α≧0、β≧0、γ≧0である。
When the subject image is a single color image, based on the signal level Y of the luminance signal of each pixel of the input subject image, the signal level G of each of the G signal, B signal, and R signal of each pixel of the subject image, B and R are represented by the following formula (3).
G = B = R = Y (3)
Here, the relationship of the following equation (4) is established between the signal level Y of the luminance signal and the signal levels G, B, and R of the G, B, and R signals.
Y = αG + βB + γR (4)
Here, α + β + γ = 1, α ≧ 0, β ≧ 0, and γ ≧ 0.

そして、重み付き画素値算出手段13は、G、B、R信号の信号レベルG、B、Rに対して、輝度の信号レベルが変化しないように重み付けを行う。ここで、重み付け後のG、B、R信号の信号レベルをG’、B’、R’とし、G、B、R信号の信号レベルの変化量をΔG、ΔB、ΔRとすると、重み付き画素値算出手段13は、変化量ΔG、ΔB、ΔRを、以下の式(5)によって算出する。なお、Gmは、G信号の信号レベルの取りうる最大値であり、ここでは、被写体画像のG信号の信号レベルGの値によって決定されることとした。   Then, the weighted pixel value calculation unit 13 weights the signal levels G, B, and R of the G, B, and R signals so that the luminance signal level does not change. Here, if the signal levels of the weighted G, B, and R signals are G ′, B ′, and R ′, and the amount of change in the signal level of the G, B, and R signals is ΔG, ΔB, and ΔR, weighted pixels The value calculation means 13 calculates the change amounts ΔG, ΔB, ΔR by the following equation (5). Gm is the maximum value that can be taken by the signal level of the G signal, and here, it is determined by the value of the signal level G of the G signal of the subject image.

Figure 0004681407
Figure 0004681407

ここで、重み関数I(d)が、図2に示すように、距離dがカメラCからピント位置までの距離Lのときに最大になり、距離dがLより大きくあるいは小さくなるにつれて徐々に減少して、距離dが前方被写界深度d1及び後方被写界深度d2に対応する距離(L−d1)、(L+d2)のときには0になるような関数とした。そのため、図4に示すように、重み付き画素値算出手段13(図1参照)は、距離dがLのときにG信号の信号レベルG’をGmとし、距離dが(L−d1)、(L+d2)のときには、G信号の信号レベルG’を被写体画像のG信号の信号レベルG(=Y)と同じ値とする。そして、重み付き画素値算出手段13は、距離dがLより大きくあるいは小さくなるにつれて、G信号の信号レベルG’を、値がGmからYに近づくように設定する。また、重み付き画素値算出手段13は、距離dが(L−d1)、(L+d2)のときには、B信号及びR信号の信号レベルB’、R’を被写体画像のB信号及びR信号の信号レベルB、R(=Y)と同じ値とし、距離dがLに近づくにつれてB信号及びR信号の信号レベルB’、R’が小さくなるように設定する。なお、図4は、単色の被写体画像において、重み付き画素値算出手段が算出するG、B、R信号の信号レベルと、カメラから画素に対応する実空間上の点までの距離との関係を示したグラフである。   Here, as shown in FIG. 2, the weight function I (d) becomes maximum when the distance d is the distance L from the camera C to the focus position, and gradually decreases as the distance d becomes larger or smaller than L. Thus, the distance d is set to 0 when the distance (L−d1) and (L + d2) correspond to the forward depth of field d1 and the backward depth of field d2. Therefore, as shown in FIG. 4, the weighted pixel value calculation means 13 (see FIG. 1) sets the signal level G ′ of the G signal to Gm when the distance d is L, and the distance d is (L−d1), When (L + d2), the signal level G ′ of the G signal is set to the same value as the signal level G (= Y) of the G signal of the subject image. Then, the weighted pixel value calculation means 13 sets the signal level G ′ of the G signal so that the value approaches G to Y as the distance d becomes larger or smaller than L. Further, the weighted pixel value calculation means 13 uses the signal levels B ′ and R ′ of the B signal and the R signal as the signals of the B signal and the R signal of the subject image when the distance d is (L−d1) and (L + d2). The values are the same as the levels B and R (= Y), and are set so that the signal levels B ′ and R ′ of the B signal and the R signal become smaller as the distance d approaches L. FIG. 4 shows the relationship between the signal level of the G, B, and R signals calculated by the weighted pixel value calculation means and the distance from the camera to the point in the real space corresponding to the pixel in a monochromatic subject image. It is the shown graph.

これによって、重み付き画素値算出手段13は、合焦領域内の各画素の輝度は維持しつつ、G信号の信号レベルを上げ、B信号とR信号との信号レベルを下げることで、合焦領域内のみにグリーン成分を強く持たせた画像を生成することができる。そして、重み付き画素値算出手段13によって生成された画像は、ピント位置に対応する画素ではグリーン成分が強く、ピント位置から遠ざかるにしたがってグリーン成分が弱くなり、ピント位置から前方被写界深度及び後方被写界深度だけ離れた位置に対応する画素ではグリーン成分のない単色になる。   As a result, the weighted pixel value calculation means 13 increases the signal level of the G signal and decreases the signal level of the B signal and the R signal while maintaining the luminance of each pixel in the in-focus area, thereby focusing. It is possible to generate an image with a strong green component only in the area. The image generated by the weighted pixel value calculation means 13 has a strong green component in the pixel corresponding to the focus position, and a weak green component as the distance from the focus position increases. A pixel corresponding to a position separated by the depth of field becomes a single color having no green component.

このように、重み付き画素値算出手段13は、輝度を変えることなく所定の色成分を持たせることで合焦領域を示す画像を生成するため、撮影されたものを見づらくすることなくピントの合う領域(合焦領域)を示すことができるとともに、合焦領域内においてピント位置から遠ざかるにしたがってグリーン成分を弱くした画像を生成するため、ピント位置に近いか遠いかを示すことができる画像を生成することができる。   In this way, the weighted pixel value calculation means 13 generates an image showing the in-focus area by giving a predetermined color component without changing the luminance, so that it is in focus without making it difficult to see the captured image. In addition to showing the area (in-focus area) and generating an image with a weaker green component as you move away from the focus position within the in-focus area, you can generate an image that can indicate whether it is close or far from the focus position can do.

なお、ここでは、合焦領域をグリーンの領域として示す例について説明したが、例えば、合焦領域において、前方被写界深度側の領域と、後方被写界深度側の領域とを異なる色で示すこととしてもよい。   Here, the example in which the in-focus area is shown as the green area has been described, but for example, in the in-focus area, the area on the front depth of field side and the area on the rear depth of field side are different colors. It may be shown.

次に、重み付き画素値算出手段13が、カラーの被写体画像を入力し、合焦領域のみをカラーの領域として示すように画素値を設定する場合について説明する。   Next, a case will be described in which the weighted pixel value calculation unit 13 inputs a color subject image and sets pixel values so that only the in-focus area is indicated as a color area.

被写体画像がカラーの画像である場合、入力された被写体画像の各画素の画素値は、G信号、B信号及びR信号の各々の信号レベルG、B、Rにおいて異なる値を持ち、以下の式(6)の関係が成り立つ。
Y=αG+βB+γR …(6)
ここで、α+β+γ=1、α≧0、β≧0、γ≧0である。
When the subject image is a color image, the pixel value of each pixel of the input subject image has a different value at each of the signal levels G, B, and R of the G signal, the B signal, and the R signal. The relationship (6) is established.
Y = αG + βB + γR (6)
Here, α + β + γ = 1, α ≧ 0, β ≧ 0, and γ ≧ 0.

そして、重み付き画素値算出手段13は、G、B、R信号の信号レベルG、B、Rに対して、輝度の信号レベルが変化しないように重み付けを行う。ここで、重み付け後のG、B、R信号の信号レベルをG’、B’、R’とし、G、B、R信号の信号レベルの変化量をΔG、ΔB、ΔRとすると、重み付き画素値算出手段13は、変化量ΔG、ΔB、ΔRを、以下の式(7)によって算出する。
ΔG={1−I(d)}(Y−G)
ΔB={1−I(d)}(Y−B) …(7)
ΔR={1−I(d)}(Y−R)
Then, the weighted pixel value calculation unit 13 weights the signal levels G, B, and R of the G, B, and R signals so that the luminance signal level does not change. Here, if the signal levels of the weighted G, B, and R signals are G ′, B ′, and R ′, and the amount of change in the signal level of the G, B, and R signals is ΔG, ΔB, and ΔR, weighted pixels The value calculating means 13 calculates the change amounts ΔG, ΔB, ΔR by the following equation (7).
ΔG = {1−I (d)} (Y−G)
ΔB = {1−I (d)} (Y−B) (7)
ΔR = {1−I (d)} (Y−R)

ここで、重み関数I(d)が、図2に示すように、距離dがカメラCからピント位置までの距離Lのときに最大になり、距離dがLより大きくあるいは小さくなるにつれて徐々に減少して、距離dが前方被写界深度d1及び後方被写界深度d2に対応する距離(L−d1)、(L+d2)のときには0になるような関数とした。そのため、図5に示すように、重み付き画素値算出手段13(図1参照)は、距離dがLのときにG、B、R信号の信号レベルG’、B’、R’を、各々被写体画像のG、B、R信号の信号レベルG、B、Rと同じ値とし、距離dが(L−d1)、(L+d2)のときには、G、B、R信号の信号レベルG’、B’、R’を、すべて被写体画像の輝度の信号レベルYと同じ値とする。そして、重み付き画素値算出手段13は、距離dがLより大きくあるいは小さくなるにつれて、G、B、R信号の信号レベルG’、B’、R’を、値がG、B、RからYに近づくように設定する。なお、図5は、カラーの被写体画像において、重み付き画素値算出手段が算出するG、B、R信号の信号レベルと、カメラから画素に対応する実空間上の点までの距離との関係を示したグラフである。   Here, as shown in FIG. 2, the weight function I (d) becomes maximum when the distance d is the distance L from the camera C to the focus position, and gradually decreases as the distance d becomes larger or smaller than L. Thus, the distance d is set to 0 when the distance (L−d1) and (L + d2) correspond to the forward depth of field d1 and the backward depth of field d2. Therefore, as shown in FIG. 5, the weighted pixel value calculation means 13 (see FIG. 1) sets the signal levels G ′, B ′, and R ′ of the G, B, and R signals when the distance d is L, respectively. When the signal level G, B, R of the G, B, R signal of the subject image is the same value and the distance d is (L−d1), (L + d2), the signal levels G ′, B of the G, B, R signal 'And R' are all set to the same value as the luminance signal level Y of the subject image. Then, the weighted pixel value calculation means 13 changes the signal levels G ′, B ′, and R ′ of the G, B, and R signals to values Y from G, B, and R as the distance d becomes larger or smaller than L. Set to approach. FIG. 5 shows the relationship between the signal level of the G, B, and R signals calculated by the weighted pixel value calculation means and the distance from the camera to the point in the real space corresponding to the pixel in the color subject image. It is the shown graph.

これによって、重み付き画素値算出手段13は、重み付けの前後で各画素の輝度は維持しつつ、合焦領域以外の領域を単色にすることで、合焦領域内のみをカラーで表示した画像を生成することができる。そして、重み付き画素値算出手段13によって生成された画像は、ピント位置に対応する画素では重み付けの前と同じ色とし、ピント位置から遠ざかるにしたがってカラーの情報を徐々に失って、ピント位置から前方被写界深度及び後方被写界深度だけ離れた位置に対応する画素では単色になる。   Thereby, the weighted pixel value calculation means 13 maintains the brightness of each pixel before and after the weighting and makes the area other than the in-focus area monochromatic, thereby displaying an image displaying only the in-focus area in color. Can be generated. Then, the image generated by the weighted pixel value calculating unit 13 has the same color as that before weighting in the pixel corresponding to the focus position, and gradually loses color information as the distance from the focus position increases. Pixels corresponding to positions separated by the depth of field and the rear depth of field are monochromatic.

このように、重み付き画素値算出手段13は、輝度を変えることなく合焦領域以外の領域を単色にすることで合焦領域を示す画像を生成するため、撮影されたものを見づらくすることなくピントの合う領域である合焦領域を示すことができるとともに、合焦領域内においてピント位置から遠ざかるにしたがってカラーの情報を徐々に失うため、ピント位置に近いか遠いかを示すことができる画像を生成することができる。   In this way, the weighted pixel value calculation unit 13 generates an image indicating the in-focus area by changing the area other than the in-focus area to a single color without changing the luminance, so that it is not difficult to see the captured image. The focus area that is the focus area can be shown, and the color information is gradually lost as you move away from the focus position in the focus area, so the image that can show whether it is close or far from the focus position Can be generated.

このように、重み付き画素値算出手段13は、合焦領域のみ、あるいは、合焦領域以外の領域のみを、入力された被写体画像とは異なる色で表示した画像を生成してもよい。また、重み付き画素値算出手段13は、合焦領域内と合焦領域以外の領域とを異なる色で表示した画像を生成することとしてもよい。   As described above, the weighted pixel value calculating unit 13 may generate an image in which only the in-focus area or only the area other than the in-focus area is displayed in a color different from the input subject image. Further, the weighted pixel value calculation means 13 may generate an image in which the in-focus area and the area other than the in-focus area are displayed in different colors.

なお、合焦領域表示画像生成装置1(図1参照)は、コンピュータにおいて各手段を各機能プログラムとして実現することも可能であり、各機能プログラムを結合して、合焦領域表示画像生成プログラムとして動作させることも可能である。   The in-focus area display image generation apparatus 1 (see FIG. 1) can also realize each unit as a function program in a computer, and combine the function programs as an in-focus area display image generation program. It is also possible to operate.

[合焦領域表示画像生成装置の動作]
次に図6を参照(適宜図1参照)して、本発明における合焦領域表示画像生成装置1の動作について説明する。図6は、本発明における合焦領域表示画像生成装置の動作を示したフローチャートである。
[Operation of Focused Area Display Image Generation Device]
Next, referring to FIG. 6 (refer to FIG. 1 as appropriate), the operation of the in-focus area display image generating apparatus 1 according to the present invention will be described. FIG. 6 is a flowchart showing the operation of the in-focus area display image generating apparatus according to the present invention.

まず、合焦領域表示画像生成装置1は、重み付き画素値算出手段13によって被写体画像を入力し、重み関数算出手段11によって、当該被写体画像に対応するレンズ情報を入力するとともに、重み分布算出手段12によって当該被写体画像に対応する距離分布情報を入力する(ステップS10)。   First, the focus area display image generation device 1 inputs a subject image by the weighted pixel value calculation unit 13, inputs lens information corresponding to the subject image by the weight function calculation unit 11, and weight distribution calculation unit. 12, distance distribution information corresponding to the subject image is input (step S10).

続いて、合焦領域表示画像生成装置1は、重み関数算出手段11によって、ステップS10において入力されたレンズ情報に基づいて、カメラCから当該カメラCのレンズのピント位置までの距離と、前方被写界深度及び後方被写界深度に対応する距離とを算出し、重み関数を算出する(ステップS11;合焦距離算出ステップ)。   Subsequently, the in-focus area display image generation device 1 determines the distance from the camera C to the focus position of the lens of the camera C and the front coverage by the weight function calculation unit 11 based on the lens information input in step S10. The depth corresponding to the depth of field and the rear depth of field is calculated, and a weight function is calculated (step S11; focus distance calculation step).

そして、合焦領域表示画像生成装置1は、重み分布算出手段12によって、ステップS10において入力された距離分布情報と、ステップS11において算出された重み関数とに基づいて、ステップS10において入力された被写体の画像の各々の画素値に対する重みを算出して、重み分布を算出する(ステップS12;合焦領域特定ステップ)。このとき、ある画素に対応する実空間上の点が、ピント位置から前方被写界深度及び後方被写界深度の範囲内にあるときには、カメラCからこの点までの距離に応じた重みが算出され、範囲内にないときには当該画素に対する重みは0になる。   Then, the focus area display image generation device 1 uses the weight distribution calculation unit 12 to input the subject input in step S10 based on the distance distribution information input in step S10 and the weight function calculated in step S11. The weight for each pixel value of the image is calculated to calculate the weight distribution (step S12; focus area specifying step). At this time, when a point in the real space corresponding to a certain pixel is within the range of the forward depth of field and the backward depth of field from the focus position, a weight corresponding to the distance from the camera C to this point is calculated. When it is not within the range, the weight for the pixel is zero.

更に、合焦領域表示画像生成装置1は、重み付き画素値算出手段13によって、ステップS12において算出された重み分布の各々の重みを、ステップS10において入力された被写体画像の、対応する画素の画素値に対して重み付けし、合焦領域を示す画像の画素値として外部に出力する(ステップS13;画素値算出ステップ)。そして、ステップS10に戻って、次のフレーム画像(あるいはフィールド画像)となる被写体画像と、この被写体画像に対応するレンズ情報及び距離分布情報を入力する動作以降の動作を行う。   Further, the in-focus area display image generation device 1 uses the weighted pixel value calculation unit 13 to calculate the weight of each of the weight distributions calculated in step S12 as the corresponding pixel of the subject image input in step S10. The values are weighted and output to the outside as pixel values of an image indicating the in-focus area (step S13; pixel value calculation step). Then, returning to step S10, the operation after the operation of inputting the subject image to be the next frame image (or field image) and the lens information and distance distribution information corresponding to the subject image is performed.

本発明における合焦領域表示画像生成装置の構成を示したブロック図である。It is the block diagram which showed the structure of the focus area | region display image generation apparatus in this invention. 本発明における合焦領域表示画像生成装置の重み関数算出手段によって算出される重み関数の例を示すグラフである。It is a graph which shows the example of the weight function calculated by the weight function calculation means of the focus area | region display image generation apparatus in this invention. 平面状の被写体において、本発明における合焦領域表示画像生成装置の重み関数算出手段によって算出される重みの値の分布の例を模式的に示す模式図である。FIG. 6 is a schematic diagram schematically showing an example of a distribution of weight values calculated by a weight function calculating unit of the focused area display image generation device according to the present invention in a planar subject. 単色の被写体画像において、本発明における合焦領域表示画像生成装置の重み付き画素値算出手段が算出するG、B、R信号の信号レベルと、カメラから画素に対応する実空間上の点までの距離との関係を示したグラフである。In a monochromatic subject image, the signal levels of the G, B, and R signals calculated by the weighted pixel value calculation means of the in-focus area display image generation apparatus according to the present invention and the points from the camera to the point in real space corresponding to the pixels. It is the graph which showed the relationship with distance. カラーの被写体画像において、本発明における合焦領域表示画像生成装置の重み付き画素値算出手段が算出するG、B、R信号の信号レベルと、カメラから画素に対応する実空間上の点までの距離との関係を示したグラフである。In the color subject image, the signal level of the G, B, and R signals calculated by the weighted pixel value calculation means of the in-focus area display image generation apparatus according to the present invention and the points from the camera to the real space corresponding to the pixel. It is the graph which showed the relationship with distance. 本発明における合焦領域表示画像生成装置の動作を示したフローチャートである。It is the flowchart which showed operation | movement of the focusing area | region display image generation apparatus in this invention.

符号の説明Explanation of symbols

1 合焦領域表示画像生成装置
11 重み関数算出手段(合焦距離算出手段)
12 重み分布算出手段(合焦領域特定手段)
13 重み付き画素値算出手段(画素値算出手段)
DESCRIPTION OF SYMBOLS 1 Focus area | region display image generation apparatus 11 Weight function calculation means (focus distance calculation means)
12 Weight distribution calculating means (focused area specifying means)
13 Weighted pixel value calculation means (pixel value calculation means)

Claims (5)

被写体を撮影したカメラのフォーカスの情報を含むレンズ情報と、前記カメラから前記被写体までの距離を示す距離情報とを外部から入力し、前記カメラによって撮影された画像である被写体画像において、ピントの合う領域である合焦領域を示す画像を生成する合焦領域表示画像生成装置であって、
前記レンズ情報に基づいて、ピント位置と前方被写界深度d1と後方被写界深度d2とを算出し、前記被写体画像において、当該ピント位置から前記前方被写界深度d1および前記後方被写界深度d2の範囲に対応する画素に対して、当該画素の画素値に重み付けするための重みと、前記カメラから当該画素に対応する実空間上の位置までの距離dとの関係を示す重み関数I(d)を算出する重み関数算出手段と、
前記重み関数算出手段によって算出された重み関数I(d)に基づいて、前記画素ごとに前記距離情報に対応した重みを算出する重み分布算出手段と、
前記被写体画像の画素ごとに、前記被写体画像の画素の輝度を維持したままで前記重み分布算出手段によって算出された重みに応じた量だけ画素の色を変化させて前記合焦領域を示す画像を生成する画素値算出手段と、
を備え
前記重み関数算出手段は、前記距離dが前記カメラから前記ピント位置までの距離Lのときに前記重みが最大になり、前記距離dと前記距離Lとの差が大きくなるにつれて前記重みが減少して、前記距離dが前記前方被写界深度d1および前記後方被写界深度d2に対応する距離(L−d1)、(L−d2)のときに前記重みが0になる前記重み関数I(d)を算出することを特徴とする合焦領域表示画像生成装置。
Lens information including focus information of the camera that has photographed the subject and distance information indicating the distance from the camera to the subject are input from the outside, and the subject image that is an image photographed by the camera is in focus. An in-focus area display image generating device that generates an image showing an in-focus area, which is an area,
Based on the lens information, a focus position, a front depth of field d1, and a rear depth of field d2 are calculated. In the subject image, the front depth of field d1 and the rear depth of field are calculated from the focus position. For a pixel corresponding to the range of the depth d2, a weight function I indicating a relationship between a weight for weighting the pixel value of the pixel and a distance d from the camera to a position in the real space corresponding to the pixel. A weight function calculating means for calculating (d);
Weight distribution calculation means for calculating a weight corresponding to the distance information for each pixel based on the weight function I (d) calculated by the weight function calculation means;
For each pixel of the subject image , an image showing the in-focus region by changing the color of the pixel by an amount corresponding to the weight calculated by the weight distribution calculating unit while maintaining the luminance of the pixel of the subject image. A pixel value calculating means to generate ;
Equipped with a,
The weight function calculating means has the maximum weight when the distance d is the distance L from the camera to the focus position, and the weight decreases as the difference between the distance d and the distance L increases. When the distance d is the distances (L-d1) and (L-d2) corresponding to the front depth of field d1 and the rear depth of field d2, the weight function I ( d) calculating an in- focus area display image generation device.
前記重み関数算出手段は、以下の式(2)で定義される前記重み関数I(d)を算出することを特徴とする請求項1に記載の合焦領域表示画像生成装置。The in-focus area display image generating apparatus according to claim 1, wherein the weighting function calculating unit calculates the weighting function I (d) defined by the following equation (2).
Figure 0004681407
Figure 0004681407
前記画素値算出手段は、前記被写体画像が単色の画像である場合、α、β、γがα+β+γ=1、α≧0、β≧0、γ≧0と定義されるときに、前記3原色の信号レベルG、B、Rと、重み付け後の3原色の信号レベルG’、B’、R’との変化量ΔG、ΔB、ΔRをGmをG信号の取りうる最大値として以下の式(5)によって算出し、当該変化量ΔG、ΔB、ΔRだけ前記3原色の信号レベルG、B、Rを変化させることを特徴とする請求項1又は請求項2に記載の合焦領域表示画像生成装置。
Figure 0004681407
When the subject image is a single-color image, the pixel value calculation means determines that the three primary colors are defined when α, β, and γ are defined as α + β + γ = 1, α ≧ 0, β ≧ 0, and γ ≧ 0. Changes ΔG, ΔB, and ΔR between the signal levels G, B, and R and the weighted signal levels G ′, B ′, and R ′ of the three primary colors are defined as follows: 5. The focus area display image generation according to claim 1, wherein the signal levels G, B, and R of the three primary colors are changed by the change amounts ΔG, ΔB, and ΔR. apparatus.
Figure 0004681407
前記画素値算出手段は、前記被写体画像がカラーの画像である場合、α、β、γがα+β+γ=1、α≧0、β≧0、γ≧0と定義され、輝度信号の信号レベルYとG、B、R信号の信号レベルG、B、Rとの間にY=αG+βB+γRの関係が成り立つときに、前記3原色の信号レベルG、B、Rと、重み付け後の3原色の信号レベルG’、B’、R’との変化量ΔG、ΔB、ΔRを以下の式(7)によって算出し、当該変化量ΔG、ΔB、ΔRだけ前記3原色の信号レベルを変化させることを特徴とする請求項1又は請求項2に記載の合焦領域表示画像生成装置。When the subject image is a color image, the pixel value calculation means defines α, β, and γ as α + β + γ = 1, α ≧ 0, β ≧ 0, γ ≧ 0, and the signal level Y of the luminance signal When the relationship of Y = αG + βB + γR is established between the signal levels G, B, R of the G, B, R signals, the signal levels G, B, R of the three primary colors and the signal levels G of the three primary colors after weighting Change amounts ΔG, ΔB, ΔR with respect to ', B', R 'are calculated by the following equation (7), and the signal levels of the three primary colors are changed by the change amounts ΔG, ΔB, ΔR. The in-focus area display image generation device according to claim 1 or 2.
ΔG={1−I(d)}(Y−G)ΔG = {1−I (d)} (Y−G)
ΔB={1−I(d)}(Y−B)・・・(7)ΔB = {1−I (d)} (Y−B) (7)
ΔR={1−I(d)}(Y−R)ΔR = {1−I (d)} (Y−R)
被写体を撮影したカメラのフォーカスの情報を含むレンズ情報と、前記カメラから前記被写体までの距離を示す距離情報とを外部から入力し、前記カメラによって撮影された画像である被写体画像において、ピントの合う領域である合焦領域を示す画像を生成するためにコンピュータを、
前記レンズ情報に基づいて、ピント位置と前方被写界深度d1と後方被写界深度d2とを算出し、前記被写体画像において、当該ピント位置から前記前方被写界深度d1および前記後方被写界深度d2の範囲に対応する画素に対して、当該画素の画素値に重み付けするための重みと、前記カメラから当該画素に対応する実空間上の位置までの距離dとの関係を示す重み関数I(d)を算出する重み関数算出手段、
前記重み関数算出手段によって算出された重み関数I(d)に基づいて、前記画素ごとに前記距離情報に対応した重みを算出する重み分布算出手段、
前記被写体画像の画素ごとに、前記被写体画像の画素の輝度を維持したままで前記重み分布算出手段によって算出された重みに応じた量だけ画素の色を変化させて前記合焦領域を示す画像を生成する画素値算出手段、
として機能させ
前記重み関数算出手段は、前記距離dが前記カメラから前記ピント位置までの距離Lのときに前記重みが最大になり、前記距離dと前記距離Lとの差が大きくなるにつれて前記重みが減少して、前記距離dが前記前方被写界深度d1および前記後方被写界深度d2に対応する距離(L−d1)、(L−d2)のときに前記重みが0になる前記重み関数I(d)を算出することを特徴とする合焦領域表示画像生成プログラム。
Lens information including focus information of the camera that has photographed the subject and distance information indicating the distance from the camera to the subject are input from the outside, and the subject image that is an image photographed by the camera is in focus. Computer to generate an image showing the in-focus area,
Based on the lens information, a focus position, a front depth of field d1, and a rear depth of field d2 are calculated. In the subject image, the front depth of field d1 and the rear depth of field are calculated from the focus position. For a pixel corresponding to the range of the depth d2, a weight function I indicating a relationship between a weight for weighting the pixel value of the pixel and a distance d from the camera to a position in the real space corresponding to the pixel. A weight function calculating means for calculating (d),
Weight distribution calculating means for calculating a weight corresponding to the distance information for each pixel based on the weight function I (d) calculated by the weight function calculating means;
For each pixel of the subject image , an image showing the in-focus region by changing the color of the pixel by an amount corresponding to the weight calculated by the weight distribution calculating unit while maintaining the luminance of the pixel of the subject image. Pixel value calculation means to generate ,
To function as,
The weight function calculating means has the maximum weight when the distance d is the distance L from the camera to the focus position, and the weight decreases as the difference between the distance d and the distance L increases. When the distance d is the distances (L-d1) and (L-d2) corresponding to the front depth of field d1 and the rear depth of field d2, the weight function I ( d) calculating an in- focus area display image generation program.
JP2005275898A 2005-09-22 2005-09-22 In-focus area display image generation apparatus and in-focus area display image generation program Active JP4681407B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005275898A JP4681407B2 (en) 2005-09-22 2005-09-22 In-focus area display image generation apparatus and in-focus area display image generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005275898A JP4681407B2 (en) 2005-09-22 2005-09-22 In-focus area display image generation apparatus and in-focus area display image generation program

Publications (2)

Publication Number Publication Date
JP2007086481A JP2007086481A (en) 2007-04-05
JP4681407B2 true JP4681407B2 (en) 2011-05-11

Family

ID=37973515

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005275898A Active JP4681407B2 (en) 2005-09-22 2005-09-22 In-focus area display image generation apparatus and in-focus area display image generation program

Country Status (1)

Country Link
JP (1) JP4681407B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10313465A (en) * 1997-05-13 1998-11-24 Olympus Optical Co Ltd Video signal processor
JP2002311488A (en) * 2001-04-17 2002-10-23 Olympus Optical Co Ltd Camera
JP2003241067A (en) * 2002-02-18 2003-08-27 Minolta Co Ltd Image pickup unit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10313465A (en) * 1997-05-13 1998-11-24 Olympus Optical Co Ltd Video signal processor
JP2002311488A (en) * 2001-04-17 2002-10-23 Olympus Optical Co Ltd Camera
JP2003241067A (en) * 2002-02-18 2003-08-27 Minolta Co Ltd Image pickup unit

Also Published As

Publication number Publication date
JP2007086481A (en) 2007-04-05

Similar Documents

Publication Publication Date Title
US10997696B2 (en) Image processing method, apparatus and device
US9992478B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for synthesizing images
US8208008B2 (en) Apparatus, method, and program for displaying stereoscopic images
WO2018019282A1 (en) Binocular panorama image obtaining method and apparatus, and storage medium
JP5230456B2 (en) Image processing apparatus and image processing method
JP5544047B2 (en) Image processing apparatus, method and program, stereoscopic imaging apparatus, portable electronic device, printer, and stereoscopic image reproducing apparatus
US10567646B2 (en) Imaging apparatus and imaging method
US9619886B2 (en) Image processing apparatus, imaging apparatus, image processing method and program
TWI451184B (en) Focus adjusting method and image capture device thereof
JP6604908B2 (en) Image processing apparatus, control method thereof, and control program
JP2010279054A (en) Image pickup device, image processing device, image pickup method, and image processing method
US20160275657A1 (en) Imaging apparatus, image processing apparatus and method of processing image
JP2018163365A (en) Image processing apparatus
JP2017143504A5 (en)
JP2017143504A (en) Imaging device
JP4681407B2 (en) In-focus area display image generation apparatus and in-focus area display image generation program
JP2012142729A (en) Camera
JP6349703B2 (en) Electronic camera and image processing program
US20160065941A1 (en) Three-dimensional image capturing apparatus and storage medium storing three-dimensional image capturing program
JP6448267B2 (en) Imaging apparatus, control method thereof, control program, system, and interchangeable lens unit
JP2014049895A (en) Image processing method
JP7113327B1 (en) Imaging device
JP6685550B2 (en) Autofocus device and autofocus program
JP2022181027A (en) Image processing apparatus, image processing method, imaging apparatus, and program
JP2012124712A (en) Image processing system, image processing method, and image processing program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20061227

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100803

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100907

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101102

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: 20110111

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110204

R150 Certificate of patent or registration of utility model

Ref document number: 4681407

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: 20140210

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

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