JP2016091376A - Image processor and control method thereof, program and recording medium - Google Patents

Image processor and control method thereof, program and recording medium Download PDF

Info

Publication number
JP2016091376A
JP2016091376A JP2014226405A JP2014226405A JP2016091376A JP 2016091376 A JP2016091376 A JP 2016091376A JP 2014226405 A JP2014226405 A JP 2014226405A JP 2014226405 A JP2014226405 A JP 2014226405A JP 2016091376 A JP2016091376 A JP 2016091376A
Authority
JP
Japan
Prior art keywords
region
image processing
processing apparatus
image
light source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014226405A
Other languages
Japanese (ja)
Inventor
宏史 鈴木
Hiroshi Suzuki
宏史 鈴木
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2014226405A priority Critical patent/JP2016091376A/en
Publication of JP2016091376A publication Critical patent/JP2016091376A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processor capable of generating an image added with a suitable light beam.SOLUTION: According to this invention, the image processor includes acquisition means for acquiring an image, estimation means for estimating the position of a light source when picking up an image from the image, detection means for detecting an area having a luminance value higher than a prescribed luminance value from the image as a high luminance area, and setting means for setting an area to which light beams from the light source are added in accordance with the position of the light source estimated by the estimation means and the position of the high luminance area detected by the detection means.SELECTED DRAWING: Figure 3

Description

本発明は、画像処理装置およびその制御方法、プログラムならびに記録媒体に関し、特に画像に所定のエフェクトを付加する技術に関する。   The present invention relates to an image processing apparatus, a control method thereof, a program, and a recording medium, and more particularly to a technique for adding a predetermined effect to an image.

従来、デジタルカメラ等で撮影する際に物理的なフィルタを撮影光学系の前面に装着すれば、例えば特定の色彩を強調したり画像の特定の部分に流れの効果を出すなど通常の撮影では得られないエフェクトを付加した画像を得ることができる。しかし、フィルタの付け替えが必要であり、フィルタを使用した状態では通常の撮影は行えないという制約がある。このような課題に対して、特許文献1は、画像処理によってエフェクトを付加する技術を開示している。   Conventionally, if a physical filter is attached to the front of the photographic optical system when shooting with a digital camera or the like, it can be obtained in normal shooting, for example, by emphasizing a specific color or producing a flow effect on a specific part of an image. It is possible to obtain an image with an effect that cannot be obtained. However, it is necessary to replace the filter, and there is a restriction that normal photographing cannot be performed in a state where the filter is used. For such a problem, Patent Document 1 discloses a technique for adding an effect by image processing.

特開2012−9995号公報JP 2012-999 A

上述の従来技術によれば、輝点から光線を伸ばした効果が得られるクロスフィルタと呼ばれる物理的なフィルタを使用せずに、画像処理によって当該フィルタを使用して撮影した場合と同様のエフェクトを付加した画像を生成することができる。   According to the above-described conventional technology, the same effect as that obtained by using the filter by image processing is used without using a physical filter called a cross filter that can obtain the effect of extending light rays from a bright spot. An added image can be generated.

しかしながら、当該従来技術は十字や放射状などの予め用意されたパターンのエフェクトを、検出した輝点に付加する技術であるため、付加されるエフェクトによって得られる光線の位置や伸びる方向は固定的なものになる。このため、従来の画像処理によりエフェクトを付加する技術では、雲の隙間から差し込む薄明光線や窓から差し込む光のように、被写体および画角に依存して光線の位置や伸びる方向が一定とならないエフェクトを付加する場合、光の差し込む方向が不自然になる場合がある。   However, since the related art is a technique for adding an effect of a pattern prepared in advance, such as a cross or a radial pattern, to the detected bright spot, the position of the light beam obtained by the added effect and the extending direction are fixed. become. For this reason, with conventional technology that adds effects through image processing, the effect of the position and direction of light rays not depending on the subject and the angle of view, such as twilight rays inserted through the gaps between clouds and light inserted through windows, is not constant. In some cases, the light insertion direction may become unnatural.

本発明は、上述の従来技術の問題点に鑑みてなされたものであり、適切な光線を付加した画像を生成することが可能な画像処理装置およびその制御方法、プログラムならびに記録媒体を提供することを目的とする。   The present invention has been made in view of the above-described problems of the prior art, and provides an image processing apparatus capable of generating an image to which appropriate light is added, a control method thereof, a program, and a recording medium. With the goal.

この課題を解決するため、例えば本発明の画像処理装置は以下の構成を備える。すなわち、画像を取得する取得手段と、画像から画像を撮像した際の光源の位置を推定する推定手段と、画像から所定の輝度値より高い輝度値を有する領域を高輝度領域として検出する検出手段と、推定手段により推定された光源の位置と検出手段により検出された高輝度領域の位置に応じて、光源の光線を付加する領域を設定する設定手段とを有することを特徴とする。   In order to solve this problem, for example, an image processing apparatus of the present invention has the following configuration. That is, an acquisition unit that acquires an image, an estimation unit that estimates a position of a light source when an image is captured from an image, and a detection unit that detects an area having a luminance value higher than a predetermined luminance value from the image as a high luminance area And a setting means for setting a region to which the light beam of the light source is added according to the position of the light source estimated by the estimating means and the position of the high luminance region detected by the detecting means.

本発明によれば、適切な光線を付加した画像を生成することが可能になる。   According to the present invention, it is possible to generate an image with appropriate light rays added thereto.

本発明の実施形態に係る撮像装置の一例としてのデジタルカメラの機能構成例を示すブロック図1 is a block diagram illustrating an example of a functional configuration of a digital camera as an example of an imaging apparatus according to an embodiment of the present invention. 実施形態1に係る画像処理部105の構成を示すブロック図1 is a block diagram illustrating a configuration of an image processing unit 105 according to the first embodiment. 実施形態1に係る光線付加処理の一連の動作を示すフローチャート7 is a flowchart showing a series of operations of light beam addition processing according to the first embodiment. 実施形態1に係る(a)推定した光源位置と検出した高輝度領域を示す図、(b)高輝度領域間が光線を付加する対象であるか判定する処理を説明する図、(c)光線を付加する領域を説明する図(A) The figure which shows the estimated light source position and the detected high-intensity area | region which concern on Embodiment 1, (b) The figure explaining the process which determines whether it is the object which adds a light ray between high-intensity areas, (c) A light ray Diagram explaining the area to add 実施形態2および実施形態3に係る画像処理部501の構成を示すブロック図FIG. 3 is a block diagram illustrating a configuration of an image processing unit 501 according to the second and third embodiments. 実施形態2に係る光線付加処理の一連の動作を示すフローチャート7 is a flowchart showing a series of operations of light beam addition processing according to the second embodiment. 実施形態3における光線付加処理の一連の動作を示すフローチャート7 is a flowchart showing a series of operations of light beam addition processing in the third embodiment.

(実施形態1)
以下、本発明の例示的な実施形態について、図面を参照して詳細に説明する。なお、以下では画像処理装置の一例として、撮像した画像にエフェクト(光の効果)を付加することが可能なデジタルカメラに本発明を適用した例を説明する。しかし、本発明でいう画像処理装置は、デジタルカメラに限らず、撮影を行わずに、取得した画像に対してエフェクトを付加することが可能な任意の電子機器にも適用可能である。これらの電子機器には、例えば携帯電話機、ゲーム機、タブレット端末、パーソナルコンピュータ、時計型や眼鏡型の情報端末などが含まれてよい。
(Embodiment 1)
Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. In the following, an example in which the present invention is applied to a digital camera capable of adding an effect (light effect) to a captured image will be described as an example of an image processing apparatus. However, the image processing apparatus referred to in the present invention is not limited to a digital camera, and can be applied to any electronic device that can add an effect to an acquired image without shooting. These electronic devices may include, for example, a mobile phone, a game machine, a tablet terminal, a personal computer, a clock-type or glasses-type information terminal.

(デジタルカメラ100の構成)
図1は、本実施形態の画像処理装置の一例としてデジタルカメラ100の機能構成例を示すブロック図である。なお、図1に示す機能ブロックの1つ以上は、ASICやプログラマブルロジックアレイ(PLA)などのハードウェアによって実現されてもよいし、CPUやMPU等のプログラマブルプロセッサがソフトウェアを実行することによって実現されてもよい。また、ソフトウェアとハードウェアの組み合わせによって実現されてもよい。従って、以下の説明において、異なる機能ブロックが動作主体として記載されている場合であっても、同じハードウェアが主体として実現されうる。
(Configuration of digital camera 100)
FIG. 1 is a block diagram illustrating a functional configuration example of a digital camera 100 as an example of an image processing apparatus according to the present embodiment. One or more of the functional blocks shown in FIG. 1 may be realized by hardware such as an ASIC or a programmable logic array (PLA), or may be realized by a programmable processor such as a CPU or MPU executing software. May be. Further, it may be realized by a combination of software and hardware. Therefore, in the following description, even when different functional blocks are described as the operation subject, the same hardware can be realized as the subject.

撮影光学系101は、ズームレンズ、フォーカスレンズを含むレンズ群を含み、被写体の光学像を形成する。制御部50は、ズームおよびフォーカスの各状態を取得し制御することができる。シャッター102は絞り機能を備え、制御部50の指示に応じた絞りおよび時間により、撮像部103の不図示の撮像素子を露光する。   The photographing optical system 101 includes a lens group including a zoom lens and a focus lens, and forms an optical image of a subject. The control unit 50 can acquire and control the zoom and focus states. The shutter 102 has an aperture function, and exposes an imaging element (not shown) of the imaging unit 103 with an aperture and time according to an instruction from the control unit 50.

撮像部103は、光電変換素子を有する画素が複数、2次元的に配列された構成を有する撮像素子を含む。撮像素子は、撮影光学系101およびシャッター102を介して結像された被写体光学像を各画素で光電変換してアナログ信号を出力する。撮像素子は、CCD(Charge-Coupled Device)イメージセンサやCMOS(Complementary Metal Oxide Semiconductor)イメージセンサなどの撮像素子であってよい。撮像素子は例えば原色ベイヤー配列のカラーフィルタを有し、各画素には、R(赤)、G(緑)、B(青)の何れかのカラーフィルタが設けられている。   The imaging unit 103 includes an imaging element having a configuration in which a plurality of pixels each having a photoelectric conversion element are two-dimensionally arranged. The image sensor photoelectrically converts the subject optical image formed through the photographing optical system 101 and the shutter 102 at each pixel and outputs an analog signal. The imaging device may be an imaging device such as a CCD (Charge-Coupled Device) image sensor or a CMOS (Complementary Metal Oxide Semiconductor) image sensor. The image sensor has, for example, a primary color Bayer color filter, and each pixel is provided with one of R (red), G (green), and B (blue) color filters.

A/D変換部104は、撮像部から入力したアナログ信号をA/D変換回路によってアナログ・デジタル変換して、画素単位のデジタル信号(画像データ)を画像処理部105に出力する。   The A / D conversion unit 104 performs analog / digital conversion on the analog signal input from the imaging unit by an A / D conversion circuit, and outputs a digital signal (image data) in units of pixels to the image processing unit 105.

画像処理部105は、A/D変換部104あるいはメモリ制御部107から画像データを取得する。そして、当該画像データに対し、ホワイトバランスなどの色変換処理、γ処理など各種画像処理を行い、ベイヤーRGBデータあるいは輝度・色差信号(Y、R−Y、B−Y)の画像データを出力する。画像処理部105から出力された画像データは、メモリ制御部107を介して画像メモリ106に書き込まれる。また、画像処理部105は、取得した画像データに対して所定の演算処理を行って演算結果を制御部50に出力する。制御部50は入力した演算結果に基づいて露光制御、測距制御を行い、TTL(スルー・ザ・レンズ)方式のAF(オートフォーカス)処理やAE(自動露出)処理などが実現される。画像処理部105は、さらに取得した画像データを解析して光源を推定し、推定した光源に基づきAWB(オートホワイトバランス)処理を行う。さらに、後述する光線付加処理を行って、画像内の光をより印象的にするための光線のエフェクトを付加する(単に光線を付加するともいう)。   The image processing unit 105 acquires image data from the A / D conversion unit 104 or the memory control unit 107. The image data is subjected to various image processing such as white balance color conversion processing and γ processing, and image data of Bayer RGB data or luminance / color difference signals (Y, RY, BY) is output. . The image data output from the image processing unit 105 is written into the image memory 106 via the memory control unit 107. Further, the image processing unit 105 performs predetermined calculation processing on the acquired image data and outputs the calculation result to the control unit 50. The control unit 50 performs exposure control and distance measurement control based on the input calculation result, thereby realizing TTL (through-the-lens) AF (autofocus) processing, AE (automatic exposure) processing, and the like. The image processing unit 105 further analyzes the acquired image data to estimate a light source, and performs AWB (auto white balance) processing based on the estimated light source. Further, a light beam adding process described later is performed to add a light effect for making the light in the image more impressive (also simply referred to as adding a light beam).

画像メモリ106は、半導体メモリ等から構成される記憶媒体であり、撮像部103から出力された画像データや、表示部109に表示するための画像データを格納する。メモリ制御部107は画像メモリ106を制御して画像データの書き込みおよび読み出しを制御する。   The image memory 106 is a storage medium constituted by a semiconductor memory or the like, and stores image data output from the imaging unit 103 and image data to be displayed on the display unit 109. A memory control unit 107 controls the image memory 106 to control writing and reading of image data.

D/A変換部108は、画像メモリ106に格納されている画像表示用のデジタルデータをアナログ信号に変換して表示部109に供給する。表示部109は、例えばLCD等の表示装置に、D/A変換部108から入力した表示用のアナログ信号を表示する。   The D / A conversion unit 108 converts the digital data for image display stored in the image memory 106 into an analog signal and supplies the analog signal to the display unit 109. The display unit 109 displays the display analog signal input from the D / A conversion unit 108 on a display device such as an LCD.

コーデック部110は、画像メモリ106に記録された画像データをMPEGなどの規格に準拠した圧縮形式で圧縮符号化処理を行う。   The codec unit 110 performs compression encoding processing on the image data recorded in the image memory 106 in a compression format conforming to a standard such as MPEG.

記録媒体112はメモリカードやハードディスク等で構成される脱着可能な記録媒体である。記録I/F111は、記録媒体112とのインタフェースであり記録媒体112における画像データの書き込みや読み出しを制御する。   The recording medium 112 is a detachable recording medium composed of a memory card, a hard disk, or the like. The recording I / F 111 is an interface with the recording medium 112 and controls writing and reading of image data on the recording medium 112.

操作部120は、デジタルカメラ100を操作するためのボタン、ダイヤルあるいはタッチパネル等であり、ユーザによる各種の操作指示を検出すると制御部50に検出した操作あるいは操作内容を出力する。制御部50は、操作部120から入力した操作等に応じてデジタルカメラ100の各部を制御する。   The operation unit 120 is a button, dial, touch panel, or the like for operating the digital camera 100, and outputs the detected operation or operation content to the control unit 50 when detecting various operation instructions by the user. The control unit 50 controls each unit of the digital camera 100 according to the operation input from the operation unit 120.

電源スイッチ121は、デジタルカメラ100の電源の入切りを制御するためのスイッチである。電源部123は、デジタルカメラ100に電力を供給する電源装置であり、バッテリーあるいは電池を含む。電源制御部122は、電源部123における電池等の装着の有無、装着された電池等の種類および電池等の残量の検出を行ってその検出結果を制御部50に出力する。   The power switch 121 is a switch for controlling on / off of the power of the digital camera 100. The power supply unit 123 is a power supply device that supplies power to the digital camera 100 and includes a battery or a battery. The power supply control unit 122 detects whether or not a battery is mounted in the power supply unit 123, the type of the mounted battery and the remaining amount of the battery, and outputs the detection result to the control unit 50.

不揮発性メモリ124は、例えばEEPROM等を含む電気的に消去・記録が可能な記録媒体であり、撮影された画像データやデジタルカメラ100の撮影に用いられる各種設定に関する情報等、電源を切った後も保持する必要のある情報を記憶する。システムタイマ125は各種制御に用いる時間や内蔵された時計の時間を計測する。   The non-volatile memory 124 is an electrically erasable / recordable recording medium including, for example, an EEPROM, etc., and after the power is turned off, such as captured image data and information on various settings used for shooting by the digital camera 100. Also stores information that needs to be retained. The system timer 125 measures the time used for various controls and the time of a built-in clock.

制御部50は、例えばCPUあるいはMPUであり、不揮発性メモリ124に格納されたプログラムをシステムメモリ126の作業エリアに展開し、実行することにより、デジタルカメラ100のシステム全体を制御する。システムメモリ126は、制御部50のデータを一時記憶する揮発性の記憶媒体であり、不揮発性メモリ124から読み出されたプログラムのほか、制御部50の動作用の定数、変数等が展開される。   The control unit 50 is, for example, a CPU or an MPU, and controls the entire system of the digital camera 100 by expanding and executing a program stored in the nonvolatile memory 124 in the work area of the system memory 126. The system memory 126 is a volatile storage medium that temporarily stores the data of the control unit 50. In addition to the program read from the nonvolatile memory 124, constants and variables for operation of the control unit 50 are expanded. .

(画像処理部105の構成)
次に、図2を参照して、画像処理部105の構成を説明する。画像処理部105は、光源位置推定部201、高輝度領域検出部202、光線付加領域設定部203および光線付加部204を有し、各部による動作を順に行って後述する光線付加処理の一連の動作を実現する。例えば、窓から差し込む光に対して光線を付加する場合、明るい窓の領域と室内の床上の明るい領域との間が窓から差し込む光の方向であり、この明るい2つの領域間に光線が現れるように光線を付加することが望ましい。このため、画像処理部105では、まず、光源位置推定部201により取得した画像データにおける光源位置を推定するとともに、高輝度領域検出部202により画像内の高輝度領域を算出する。これらの算出結果を用いて光線付加領域設定部203により光線を付加する位置(領域ともいう)を設定し、光線付加部204により設定した位置に対して光線を付加する。
(Configuration of the image processing unit 105)
Next, the configuration of the image processing unit 105 will be described with reference to FIG. The image processing unit 105 includes a light source position estimation unit 201, a high brightness region detection unit 202, a light beam addition region setting unit 203, and a light beam addition unit 204. Is realized. For example, when a light beam is added to light entering from a window, the direction of light entering from the window is between the bright window area and the bright area on the floor of the room, and the light beam appears between the two bright areas. It is desirable to add a light beam. For this reason, the image processing unit 105 first estimates the light source position in the image data acquired by the light source position estimating unit 201 and calculates the high luminance region in the image by the high luminance region detecting unit 202. Using these calculation results, a position (also referred to as an area) where a light beam is added is set by the light beam addition area setting unit 203, and a light beam is added to the position set by the light beam addition unit 204.

(実施形態1に係る光線付加処理に係る一連の動作)
さらに、図3を参照して、光線付加処理に係る一連の動作をより詳細に説明する。また、光線を付加する領域を決定する方法を説明するために図4を適宜参照する。
(A series of operations related to light beam addition processing according to the first embodiment)
Furthermore, with reference to FIG. 3, a series of operations related to the light beam addition processing will be described in more detail. In addition, FIG. 4 will be referred to as appropriate in order to explain a method for determining a region to which a light beam is added.

なお、本処理は、例えば操作部120の不図示のレリーズボタンを押下することによって撮影が行われて撮像部103から出力された画像データを画像処理部105が取得した時点から開始される。   Note that this processing is started from the time when the image processing unit 105 acquires image data that is captured by pressing a release button (not shown) of the operation unit 120 and output from the imaging unit 103, for example.

S301において光源位置推定部201は、取得した画像データに基づいて光源位置を推定する。光源位置を推定する方法は、公知の技術を用いることができるため詳細な説明は省略するが、例えば物体の陰影情報に基づいて光源位置を推定することができる。   In S301, the light source position estimation unit 201 estimates the light source position based on the acquired image data. The method for estimating the light source position can use a known technique, and thus a detailed description thereof is omitted. For example, the light source position can be estimated based on the shadow information of the object.

S302において高輝度領域検出部202は、取得した画像データから高輝度領域を検出する。例えば、高輝度領域検出部202は、画像データに含まれる各画素の輝度値が、所定の閾値T1以上であるかを判定することにより高輝度領域を検出する。閾値T1は、例えば画像全体の平均輝度値と画像内の画素の最大輝度値との中間値を用いるものとするが、他の方法により算出した閾値であってもよい。高輝度領域検出部202は、各画素のうち輝度値がT1以上である画素を抽出する。抽出した各画素が隣接する場合は、隣接する画素を同一の領域として扱うことによって高輝度領域を形成させ、画像内で2つ以上の高輝度領域を検出する。図4(a)には、例えば3つの高輝度領域が検出された場合の高輝度領域を示している。図4(a)において、401は推定した光源位置を示しており、402〜404はそれぞれ3つの異なる高輝度領域を示している。   In S302, the high brightness area detection unit 202 detects a high brightness area from the acquired image data. For example, the high luminance region detection unit 202 detects the high luminance region by determining whether the luminance value of each pixel included in the image data is equal to or greater than a predetermined threshold T1. The threshold value T1 is, for example, an intermediate value between the average luminance value of the entire image and the maximum luminance value of the pixels in the image, but may be a threshold value calculated by another method. The high brightness area detection unit 202 extracts a pixel having a brightness value equal to or higher than T1 from each pixel. When the extracted pixels are adjacent to each other, a high brightness area is formed by treating the adjacent pixels as the same area, and two or more high brightness areas are detected in the image. FIG. 4A shows a high brightness area when, for example, three high brightness areas are detected. In FIG. 4A, 401 indicates the estimated light source position, and 402 to 404 indicate three different high-luminance regions, respectively.

S303において光線付加領域設定部203は、S302で検出された各高輝度領域に対して、それぞれの重心座標を算出する。図4(b)において重心座標405〜重心座標407は、S302において検出されたそれぞれの高輝度領域に対応する重心座標を示している。   In S303, the light ray addition area setting unit 203 calculates the respective barycentric coordinates for each high luminance area detected in S302. In FIG. 4B, barycentric coordinates 405 to barycentric coordinates 407 indicate barycentric coordinates corresponding to the respective high-luminance areas detected in S302.

S304において光線付加領域設定部203は、S302において検出された各高輝度領域のうちの2つの高輝度領域間が、光線を付加する対象であるかを判定する。具体的には、光線付加領域設定部203は、S303で算出した高輝度領域の重心座標の中から2つを選び、選んだ2つの重心座標とS301で推定した光源位置とが直線上に並ぶ場合に、その2つの高輝度領域間は光線を付加する対象であるとして判定する。即ち、光線を付加する対象となる領域は2つの高輝度領域の間の領域であり、その2つの高輝度領域が撮影した画像の画角内に含まれる場合に光線を付加する対象とする。   In S304, the light beam addition region setting unit 203 determines whether or not a region between two high luminance regions among the high luminance regions detected in S302 is a target to which a light beam is to be added. Specifically, the light ray addition area setting unit 203 selects two of the center coordinates of the high brightness area calculated in S303, and the selected two center coordinates and the light source position estimated in S301 are arranged on a straight line. In this case, it is determined that a light beam is to be added between the two high luminance areas. That is, the region to which light rays are to be added is a region between two high-brightness regions, and when the two high-brightness regions are included within the angle of view of the captured image, the light ray is to be added.

より詳細には、まず、光線付加領域設定部203は、選択した2つの高輝度領域の重心座標と推定した光源位置とが直線上に並ぶか否かを判定する。薄明光線などの光線は、光源から放射される光の散乱によって生じるため、光線を付加する対象となる領域は光源からの光の放射方向に沿った方向に存在し得る。このため、2つの高輝度領域の重心座標と光源位置とが直線上に並んでいない場合に、当該2つの高輝度領域間に光線を付加してしまうと、光源からの光の放射方向とは異なる方向に光線を付加してしまうこととなり、違和感のある画像が生成されてしまう。そこで、光線付加領域設定部203は、2つの高輝度領域の重心座標と光源位置とが直線上に並んでいないと判定した場合は、当該2つの高輝度領域間は光線を付加する対象でないと判定する。   More specifically, first, the light beam addition region setting unit 203 determines whether or not the barycentric coordinates of the two selected high luminance regions and the estimated light source position are aligned on a straight line. Since light rays such as twilight rays are generated by scattering of light emitted from the light source, the region to which the light rays are added may exist in a direction along the emission direction of the light from the light source. For this reason, if the barycentric coordinates and the light source positions of the two high-luminance areas are not aligned on a straight line, if a light beam is added between the two high-luminance areas, the radiation direction of the light from the light source is Light rays are added in different directions, and an uncomfortable image is generated. Therefore, if the light ray addition region setting unit 203 determines that the barycentric coordinates and the light source positions of the two high luminance regions are not aligned on a straight line, the light addition region setting unit 203 is not a target to add light between the two high luminance regions. judge.

但し、2つの高輝度領域の重心座標と光源位置とが一直線に並ばないが、直線上から多少のずれを持って位置する場合には、光線付加領域設定部203は、2つの高輝度領域間を光線を付加する対象と判定する。例えば、図4(b)に示すように、光線付加領域設定部203は、高輝度領域402および高輝度領域403の重心座標405および重心座標406を通る直線Lと、光源位置401との距離dを算出する。そして、この距離dが所定の閾値T2以下であれば直線上に並んでいると判定して、2つの高輝度領域間を光線を付加する対象領域とする。なお、2つの高輝度領域の重心座標と光源位置とが直線上に並んでいても、2つの重心座標の間に光源位置がある場合には、その2つの高輝度領域間は光線を付加する対象領域としない。   However, when the barycentric coordinates and the light source positions of the two high-brightness areas are not aligned with each other, but the light-added area setting unit 203 is positioned between the two high-brightness areas, the position is slightly deviated from the straight line. Is determined as a target to which light is added. For example, as illustrated in FIG. 4B, the light beam addition region setting unit 203 includes a distance d between the light source position 401 and the straight line L passing through the barycentric coordinates 405 and the barycentric coordinates 406 of the high luminance region 402 and the high luminance region 403. Is calculated. If the distance d is equal to or smaller than the predetermined threshold value T2, it is determined that the lines are aligned on a straight line, and a region between two high-luminance regions is set as a target region to which light is added. In addition, even if the barycentric coordinates and light source positions of two high-brightness areas are aligned on a straight line, if there is a light source position between the two barycentric coordinates, a light beam is added between the two high-brightness areas. It is not set as the target area.

光線付加領域設定部203は、2つの高輝度領域間が光線を付加する対象であるか否かの判定を全ての2つの高輝度領域の組に対して行う。光線付加領域設定部203は、光線を付加する対象となる高輝度領域があると判定したときは処理をS305に進め、光線を付加する対象となる高輝度領域がない場合は光線を付加する処理を行わない。   The light ray addition region setting unit 203 determines whether or not a region between two high luminance regions is a target to which a light ray is to be added, for all two high luminance region sets. If the light ray addition area setting unit 203 determines that there is a high-luminance area to which light rays are to be added, the process proceeds to S305. If there is no high-luminance area to which light rays are to be added, the light ray addition area setting unit 203 adds light rays. Do not do.

S305において光線付加領域設定部203は、各高輝度領域を始点領域または終点領域のいずれかに分類する。光線付加領域設定部203は、S304で光線を付加する対象と判定した2つの高輝度領域について、光源位置に近い重心座標を含む高輝度領域を光線を付加する始点領域、光源位置から遠い重心座標を含む高輝度領域を光線を付加する終点領域とする。   In S305, the light ray addition area setting unit 203 classifies each high-luminance area as either a start point area or an end point area. The light ray addition area setting unit 203 adds the high luminance area including the barycentric coordinates close to the light source position to the two high luminance areas determined as the objects to which the light ray is added in S304, and the barycentric coordinates far from the light source position. A high-luminance region that includes a point is an end point region to which light is added.

S306において光線付加領域設定部203は、S305の処理において定めた始点領域と終点領域の間を光線を付加する領域として設定する。即ち、始点領域と終点領域の重心座標を通る直線上の一部を含むような領域を、光線を付加する領域として設定する。より具体的には、光線付加領域設定部203は、図4(c)に示すように、始点領域と終点領域にそれぞれ外接する2つの接線408および接線409を算出する。そして、始点領域、終点領域およびこれらの領域に外接する2つの接線で囲まれる領域を光線を付加する領域として設定する。   In S306, the light ray addition region setting unit 203 sets the region between the start point region and the end point region determined in the process of S305 as a light ray addition region. That is, an area including a part on a straight line passing through the barycentric coordinates of the start point area and the end point area is set as an area to which light rays are added. More specifically, as shown in FIG. 4C, the light beam addition region setting unit 203 calculates two tangent lines 408 and tangent lines 409 that circumscribe the start point region and the end point region, respectively. Then, a start point region, an end point region, and a region surrounded by two tangents circumscribing these regions are set as regions to which light rays are added.

S307において光線付加部204は、S306において設定した領域に光線を付加する。例えば、光線を付加する領域の各画素のRGB値を(Rin,Gin,Bin)、付加する光線成分のRGB値を(Reff、Geff、Beff)とすると、光線を付加した後の各画素のRGB値(Rout、Gout、Bout)は下記のように各RGB値を加算したもので表される。
Rout = Rin + Reff
Gout = Gin + Geff
Bout = Bin + Beff
このとき、付加する光線成分のRGB比率は、公知の光源色推定方法によって算出した光源色のRGB比率を用いることができるため詳細な算出方法は省略するが、例えば画像内の輝度の高い画素およびその近傍の画素の画素値の差から鏡面反射成分を構成するRGBの比率を算出し、当該比率を光源色として算出すればよい。
In S307, the light beam adding unit 204 adds a light beam to the area set in S306. For example, if the RGB value of each pixel in the region to which light is added is (Rin, Gin, Bin) and the RGB value of the light component to be added is (Reff, Geff, Beff), the RGB of each pixel after the light is added The values (Rout, Gout, Bout) are expressed by adding the RGB values as follows.
Rout = Rin + Reff
Gout = Gin + Geff
Bout = Bin + Beff
At this time, as the RGB ratio of the added light component, the RGB ratio of the light source color calculated by a known light source color estimation method can be used, and a detailed calculation method is omitted. The ratio of RGB constituting the specular reflection component may be calculated from the difference between the pixel values of neighboring pixels, and the ratio may be calculated as the light source color.

また、付加する光線成分の強度(光線成分のRGB値)は適宜設定することができる。例えば、終点領域とその周辺領域とに着目すると、終点領域と周辺領域とは同じ被写体であるものの、光源からの光が当たっているか否かによって輝度などの画素値に差分が生じている場合が想定できる。そこで、終点領域と周辺領域との輝度の差分を光線成分の強度と捉えて当該強度を設定しても良い。   Further, the intensity of the added light component (RGB value of the light component) can be set as appropriate. For example, when focusing on the end point region and its peripheral region, the end point region and the peripheral region are the same subject, but there may be a difference in pixel values such as luminance depending on whether or not the light from the light source is hit. Can be assumed. Therefore, the intensity may be set by regarding the difference in luminance between the end point area and the peripheral area as the intensity of the light component.

なお、本実施形態では、S305で定めた始点領域と終点領域の組の間の領域に光線を付加する場合について説明したが、複数の終点領域を1つの終点領域として光線を付加しても良い。例えば、S305の処理により、始点領域と終点領域の組が複数定められている場合であって、これらの組の始点領域が同一の高輝度領域である場合には、これらの複数の終点領域を1つの終点領域として扱ったうえで光線を付加しても良い。   In the present embodiment, the case where a light beam is added to the region between the set of the start point region and the end point region determined in S305 has been described, but a plurality of end point regions may be added as one end point region. . For example, when a plurality of sets of start point areas and end point areas are determined by the processing of S305 and the start point areas of these sets are the same high-luminance area, the plurality of end point areas are A light beam may be added after being treated as one end point region.

画像処理部105は、S307の処理を終えると光線付加処理に係る一連の動作を終了する。   When finishing the processing of S307, the image processing unit 105 ends a series of operations related to the light beam addition processing.

なお、本実施形態では、S307で光線を付加する際に、始点領域から終点領域に向かって強度が一定の光線を付加する例について説明した。しかし、付加する光線の強度についてはこの例に限定されず、例えば、始点領域および終点領域に輝度の差分がある場合には、始点領域から終点領域への輝度の変化量に応じた光線の強度を設定してもよい。このようにすれば組となる高輝度領域間に輝度差がある場合により自然な光線を付加することができる。   In the present embodiment, an example in which a light beam having a constant intensity is added from the start point region to the end point region when the light beam is added in S307 has been described. However, the intensity of the added light beam is not limited to this example. For example, when there is a difference in luminance between the start point region and the end point region, the intensity of the light beam according to the amount of change in luminance from the start point region to the end point region. May be set. In this way, a more natural light beam can be added when there is a luminance difference between the pair of high luminance regions.

以上説明したように本実施形態では、推定した光源の位置と画像中の高輝度領域の位置に応じて光線を付加する領域を設定するようにした。より具体的には、光源の位置と異なる2つの高輝度領域が所定の関係、即ち2つの高輝度領域の重心座標と光源位置とが略直線上に並ぶ関係にある場合に光線を付加するようにした。このようにすることで、雲の隙間から差し込む薄明光線や窓から差し込む光のように、被写体および画角に依存して光線の位置や伸びる方向が一定とならない光線を適切に付加することができる。従って、適切な光線を付加した画像を生成することが可能になる。   As described above, in this embodiment, an area to which light is added is set according to the estimated position of the light source and the position of the high luminance area in the image. More specifically, a light beam is added when two high-intensity areas different from the position of the light source have a predetermined relationship, that is, when the barycentric coordinates of the two high-intensity areas and the light source position are aligned in a substantially straight line. I made it. This makes it possible to appropriately add a light beam whose position and extending direction are not constant depending on the subject and the angle of view, such as a light beam inserted through a gap between clouds or light inserted from a window. . Therefore, it is possible to generate an image with appropriate light rays added.

(実施形態2)
次に実施形態2について説明する。実施形態1では、2次元空間上で光線を付加する位置を決定する処理について説明したが、実施形態2では、3次元空間上で光線を付加する位置を決定する点が異なる。本実施形態の画像処理部501は、実施形態1と異なり距離情報(奥行情報)を算出および利用可能な構成であり、その他の構成は実施形態1と同一である。このため、同一の構成およびステップについては同一の符号を付して重複する説明は省略し、相違点について重点的に説明する。
(Embodiment 2)
Next, Embodiment 2 will be described. In the first embodiment, the processing for determining the position to add a light beam in the two-dimensional space has been described. However, the second embodiment is different in that the position to add a light beam in the three-dimensional space is determined. Unlike the first embodiment, the image processing unit 501 of the present embodiment has a configuration capable of calculating and using distance information (depth information), and the other configurations are the same as those of the first embodiment. For this reason, the same configurations and steps will be denoted by the same reference numerals, and redundant description will be omitted, and differences will be mainly described.

(画像処理部501の構成)
図5を参照して、本実施形態に係る画像処理部501の構成について説明する。画像処理部501は、実施形態1に係る画像処理部105の構成に加えて、距離情報取得部502および本実施形態に係る光線付加領域設定部503を有する。
(Configuration of Image Processing Unit 501)
With reference to FIG. 5, the configuration of the image processing unit 501 according to the present embodiment will be described. In addition to the configuration of the image processing unit 105 according to the first embodiment, the image processing unit 501 includes a distance information acquisition unit 502 and a light beam addition region setting unit 503 according to the present embodiment.

距離情報取得部502は、取得した画像に対応する距離情報を例えば公知の測距センサから取得し取得した距離情報を画像データとともに出力する。光線付加領域設定部503は、高輝度領域検出部202により検出された高輝度領域のうち光線を付加する対象となる高輝度領域を判定し、光線を付加する領域を設定する。このとき、光線付加領域設定部503は、距離情報取得部502により取得された距離情報を用いて光線を付加する領域を設定する。   The distance information acquisition unit 502 acquires distance information corresponding to the acquired image from, for example, a known distance measuring sensor, and outputs the acquired distance information together with the image data. The light beam addition region setting unit 503 determines a high luminance region to which a light beam is to be added among the high luminance regions detected by the high luminance region detection unit 202, and sets a region to which a light beam is added. At this time, the light beam addition region setting unit 503 sets a region to which a light beam is added using the distance information acquired by the distance information acquisition unit 502.

(実施形態2に係る光線付加処理に係る一連の動作)
次に、本実施形態に係る光線付加処理の一連の動作について図6を参照して説明する。
(A series of operations related to light beam addition processing according to the second embodiment)
Next, a series of operations of the light beam addition processing according to the present embodiment will be described with reference to FIG.

まず、光源位置推定部201は、実施形態1におけるS301と同様に取得した画像に対して光源位置の推定を行う。   First, the light source position estimation unit 201 performs light source position estimation on the acquired image in the same manner as in S301 in the first embodiment.

S601において距離情報取得部502は、取得した画像の距離情報を取得する。距離情報は、例えば測距センサから出力されるデジタルカメラ100からの距離情報であって、撮影画像の画素単位で取得することができる。そして、高輝度領域検出部202は、実施形態1におけるS302と同様に、取得した画像の中から高輝度領域を検出し、S303およびS304において光線付加領域設定部503は、高輝度領域の重心座標を算出する。光線付加領域設定部503は、光線を付加する対象となる高輝度領域があると判定したときはS602に処理を進め、光線を付加する対象となる高輝度領域がないと判定した場合は一連の処理を終了する。   In step S601, the distance information acquisition unit 502 acquires distance information of the acquired image. The distance information is, for example, distance information from the digital camera 100 output from the distance measuring sensor, and can be acquired in units of pixels of the captured image. The high-intensity area detection unit 202 detects a high-intensity area from the acquired image in the same manner as S302 in the first embodiment. In S303 and S304, the light beam addition area setting unit 503 determines the barycentric coordinates of the high-intensity area. Is calculated. If the light ray addition area setting unit 503 determines that there is a high-luminance area to which light rays are to be added, the process proceeds to S602. If it is determined that there is no high-luminance area to which light rays are to be added, a series of steps are performed. End the process.

S602において光線付加領域設定部503は、2つの高輝度領域の間を遮る被写体が存在するかを判定する。光線付加領域設定部503は、まず2つの高輝度領域の各重心座標を結ぶ直線を算出する。そして、算出した直線とS601で取得した距離情報とを用いて、求めた直線とデジタルカメラ100との間に被写体が存在するか否かを判定する。光線付加領域設定部503は、算出した直線とデジタルカメラ100との間に被写体が存在しない場合には、2つの高輝度領域の間を光線を付加する対象領域とする。しかし、求めた直線とデジタルカメラ100との間に被写体が存在すると判定した場合、2つの高輝度領域の間は光線を付加する対象領域ではないものとして光線を付加する処理を行わない。   In step S602, the light beam addition region setting unit 503 determines whether there is a subject that blocks between the two high-luminance regions. The light beam addition region setting unit 503 first calculates a straight line connecting the barycentric coordinates of the two high luminance regions. Then, using the calculated straight line and the distance information acquired in S <b> 601, it is determined whether or not a subject exists between the obtained straight line and the digital camera 100. When there is no subject between the calculated straight line and the digital camera 100, the light ray addition region setting unit 503 sets a region between two high luminance regions as a target region to which light is added. However, when it is determined that an object exists between the obtained straight line and the digital camera 100, the process of adding the light beam is not performed between the two high-brightness regions, as the target region to which the light beam is not added.

さらに、光線付加領域設定部503および光線付加部204は、さらに実施形態1に示したS305〜S307に示した処理を行って光線付加処理に係る一連の動作を終了する。   Furthermore, the light beam addition region setting unit 503 and the light beam addition unit 204 further perform the processes shown in S305 to S307 shown in the first embodiment, and complete a series of operations related to the light beam addition process.

なお、本実施形態では、S304において光線付加領域設定部503が実施形態1と同様に2つの高輝度領域間と光源位置とが直線上に並ぶか否かを2次元空間上で判定しているが、距離情報を用いて3次元空間において直線上に並ぶか否かを判定しても良い。   In this embodiment, the light beam addition area setting unit 503 determines whether or not the two high-luminance areas and the light source position are aligned on a straight line in S304 as in the first embodiment. However, it may be determined whether or not they are arranged on a straight line in the three-dimensional space using the distance information.

以上説明したように本実施形態では、取得した画像に対応する距離情報を取得して当該距離情報を用いて高輝度領域間に付加する光線を遮る被写体の存在を判定し、光線を遮る被写体が存在する場合には光線を付加しないようにした。このようにすることで、光線を付加する領域より手前に被写体が存在する場合に、当該被写体上に光線を付加するような不自然な光線の付加を防ぎ、より自然な光線の付加を実現することができる。   As described above, in the present embodiment, the distance information corresponding to the acquired image is acquired, the presence of the subject that blocks the light beam added between the high luminance regions is determined using the distance information, and the subject that blocks the light beam is determined. When present, no light was added. In this way, when a subject is present in front of a region to which a light beam is to be added, an unnatural light beam that adds a light beam on the subject is prevented, and a more natural light beam can be added. be able to.

(実施形態3)
さらに実施形態3について説明する。実施形態1および実施形態2では、光線を付加する始点領域と終点領域が取得した画像の画角内に含まれている場合の処理について説明した。これに対して、本実施形態では、取得した画像の画角内に光線を付加する始点領域のみ存在する場合に光線を付加する処理について説明する。本実施形態の光線付加処理は、上述した実施形態と光線を付加する領域の設定方法が異なるが、その他の処理およびデジタルカメラ100の構成は実施形態2と同一である。このため、同一の構成およびステップについては同一の符号を付して重複する説明は省略し、相違点について重点的に説明する。
(Embodiment 3)
Further, Embodiment 3 will be described. In the first embodiment and the second embodiment, the processing in the case where the start point region and the end point region to which light rays are added is included within the angle of view of the acquired image has been described. On the other hand, in the present embodiment, a process for adding a light beam when only the start point region to which the light beam is added exists within the angle of view of the acquired image will be described. The light beam addition processing of the present embodiment is different from the above-described embodiment in the method of setting a region to which light is added, but the other processing and the configuration of the digital camera 100 are the same as those of the second embodiment. For this reason, the same configurations and steps will be denoted by the same reference numerals, and redundant description will be omitted, and differences will be mainly described.

本実施形態に係る光線付加処理の一連の動作について、図7を参照して説明する。   A series of operations of the light beam addition processing according to the present embodiment will be described with reference to FIG.

まず、画像処理部501を構成する光源位置推定部201、距離情報取得部502、高輝度領域検出部202は、実施形態2において説明したS301〜S303の各処理を行う。但し、本実施形態におけるS302の処理では、検出する高輝度領域は1つ以上でよい。   First, the light source position estimation unit 201, the distance information acquisition unit 502, and the high-luminance area detection unit 202 that configure the image processing unit 501 perform each process of S301 to S303 described in the second embodiment. However, in the process of S302 in the present embodiment, one or more high-luminance areas may be detected.

次に、S701において光線付加領域設定部503は、各高輝度領域が光線を付加する始点領域であるか否かを判定する。具体的には、光線付加領域設定部503はS601で取得した距離情報に基づいて、S302で算出した各高輝度領域が光線を付加する始点領域であるか否かを判定する。光線付加領域設定部503は、まず、撮影した画角内に光線を付加する始点領域のみ存在する状況を抽出するために、S303で算出した高輝度領域の重心座標と推定した光源位置とを結んだ直線を算出する。そして、当該直線上に他の高輝度領域の重心座標が存在しないような高輝度領域を選択する。次に、光線付加領域設定部503は、算出した直線上の延長上にあり、かつ、高輝度領域の重心座標から、光源位置と反対方向に画像の端まで伸びる直線を算出する。さらに、光線付加領域設定部503は、S601で取得した距離情報に基づいて、算出した直線とデジタルカメラ100との間に被写体が存在するか否かを判定する。光線付加領域設定部503は、被写体が存在しないと判定した場合、判定の対象である高輝度領域を光線を付加する始点領域として決定する。一方、被写体が存在すると判定した場合、当該高輝度領域を光線を付加する対象としない。   In step S <b> 701, the light ray addition area setting unit 503 determines whether each high brightness area is a start point area to which light rays are added. Specifically, the light ray addition area setting unit 503 determines whether each high brightness area calculated in S302 is a start point area to which light is added based on the distance information acquired in S601. First, the light ray addition area setting unit 503 connects the barycentric coordinates of the high-brightness area calculated in S303 and the estimated light source position in order to extract the situation where only the start point area where the light ray is added is within the captured angle of view. Calculate the straight line. Then, a high luminance area is selected such that the barycentric coordinates of other high luminance areas do not exist on the straight line. Next, the light ray addition area setting unit 503 calculates a straight line that extends on the calculated straight line and extends from the barycentric coordinates of the high luminance area to the edge of the image in the direction opposite to the light source position. Further, the light ray addition region setting unit 503 determines whether or not a subject exists between the calculated straight line and the digital camera 100 based on the distance information acquired in S601. When it is determined that the subject does not exist, the light ray addition area setting unit 503 determines the high luminance area that is the object of determination as the start point area to which light is added. On the other hand, when it is determined that a subject exists, the high brightness area is not set as a target to which light is added.

S702において光線付加領域設定部503は、S701で判定された始点領域から光源位置の方向とは反対の方向に光線を付加する領域を設定する。より具体的には、光線付加領域設定部503は、始点領域から光源位置とは反対方向の画像端までの間に光線を付加する領域を設定する。例えば、光源位置から始点領域に外接する2本の直線を算出し、求めた2本の直線・始点領域・画像の端で囲まれる領域を、光線を付加する領域として設定する。このとき、視点領域に外接する2本の直線の角度は光線の位置等に基づいて適宜設定してよい。光線を付加する領域は例示であり、始点領域の重心を通る直線上の一部を含む領域であって、始点領域から光源位置の方向と反対の方向の領域に光源を付加するものであればよい。   In S702, the light ray addition area setting unit 503 sets an area in which a light ray is added in a direction opposite to the direction of the light source position from the start point area determined in S701. More specifically, the light ray addition region setting unit 503 sets a region to which light rays are added between the start point region and the image end in the direction opposite to the light source position. For example, two straight lines circumscribing the start point area from the light source position are calculated, and an area surrounded by the obtained two straight lines, the start point area, and the edge of the image is set as an area to which light rays are added. At this time, the angle between the two straight lines circumscribing the viewpoint region may be set as appropriate based on the position of the light beam. The region to which the light beam is added is an example, and if the light source is added to the region in the direction opposite to the direction of the light source position from the start point region, the region includes a part on the straight line passing through the center of gravity of the start point region. Good.

さらにS307において光線付加部204は、S702において設定された光線を付加する領域に対して、実施形態1と同様の方法により光線を付加する。   In S307, the light beam adding unit 204 adds a light beam to the region to which the light beam set in S702 is added by the same method as in the first embodiment.

なお、本実施形態では、始点領域のみを有する高輝度領域に対する処理を説明したが、実施形態2において説明した組となる高輝度領域間の領域に光線を付加する処理と併用してもよい。このようにすれば組となる高輝度領域および始点領域のいずれをも用いて光線を付加することができる。   In the present embodiment, the processing for the high luminance region having only the start point region has been described. However, the processing may be used in combination with the processing for adding a light ray to the region between the high luminance regions which is the set described in the second embodiment. In this way, it is possible to add a light beam using both the high luminance region and the starting point region that form a pair.

以上説明したように本実施形態では、光源と1つの高輝度領域のみが直線上に並ぶ場合に、当該高輝度領域を始点領域として始点領域から画像端まで差し込む光線を付加するようにした。このようにすることで、組となる高輝度領域(即ち終点領域)が画角内に含まれていない場合であっても光線を付加することができ、適切な光線を付加した画像を生成することが可能になる。   As described above, in the present embodiment, when only the light source and one high-luminance area are arranged on a straight line, a light beam inserted from the start point area to the image end is added with the high-luminance area as the start point area. In this way, even when the pair of high-luminance areas (that is, end point areas) are not included in the angle of view, a light beam can be added, and an image with an appropriate light beam added is generated. It becomes possible.

(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

105…画像処理部、201…光源位置推定部、202…高輝度領域検出部、203…光線付加領域設定部、204…光線付加部 DESCRIPTION OF SYMBOLS 105 ... Image processing part, 201 ... Light source position estimation part, 202 ... High-intensity area | region detection part, 203 ... Light beam addition area | region setting part, 204 ... Light beam addition part

Claims (16)

画像を取得する取得手段と、
前記画像から前記画像を撮像した際の光源の位置を推定する推定手段と、
前記画像から所定の輝度値より高い輝度値を有する領域を高輝度領域として検出する検出手段と、
前記推定手段により推定された前記光源の位置と前記検出手段により検出された前記高輝度領域の位置に応じて、前記光源からの光線を付加する領域を設定する設定手段と、
を有することを特徴とする画像処理装置。
An acquisition means for acquiring an image;
Estimating means for estimating a position of a light source when the image is captured from the image;
Detecting means for detecting a region having a luminance value higher than a predetermined luminance value from the image as a high luminance region;
Setting means for setting a region to which light from the light source is added according to the position of the light source estimated by the estimating unit and the position of the high-intensity region detected by the detecting unit;
An image processing apparatus comprising:
前記検出手段は、互いに異なる第1の高輝度領域と第2の高輝度領域とを検出し、
前記設定手段は、前記光源の位置、前記第1の高輝度領域の位置および前記第2の高輝度領域の位置が略直線上に存在する場合に、前記第1の高輝度領域および前記第2の高輝度領域に対応した前記光線を付加する領域を設定し、前記光源の位置、前記第1の高輝度領域の位置および前記第2の高輝度領域の位置が略直線上に存在しない場合は、前記光線を付加する領域を設定しない、
ことを特徴とする請求項1に記載の画像処理装置。
The detection means detects a first high-brightness region and a second high-brightness region that are different from each other,
When the position of the light source, the position of the first high-brightness region, and the position of the second high-brightness region exist on a substantially straight line, the setting means includes the first high-brightness region and the second high-brightness region. A region to which the light beam corresponding to the high luminance region is set, and the position of the light source, the position of the first high luminance region, and the position of the second high luminance region do not exist on a substantially straight line , Do not set the area to add the light beam,
The image processing apparatus according to claim 1.
前記設定手段は、前記略直線上の一部を含む領域を、前記光線を付加する領域として設定する、
ことを特徴とする請求項2に記載の画像処理装置。
The setting means sets a region including a part on the substantially straight line as a region to which the light beam is added.
The image processing apparatus according to claim 2.
前記設定手段は、前記第1の高輝度領域および前記第2の高輝度領域のそれぞれと外接する互いに異なる2つの接線と、前記第1の高輝度領域および前記第2の高輝度領域とに囲まれる領域を、前記光線を付加する領域として設定する、
ことを特徴とする請求項2または3に記載の画像処理装置。
The setting means is surrounded by two different tangents circumscribing each of the first high luminance region and the second high luminance region, and the first high luminance region and the second high luminance region. Set the region to be added as the region to which the light beam is added,
The image processing apparatus according to claim 2, wherein the image processing apparatus is an image processing apparatus.
前記検出手段は、第1の高輝度領域を含む1つ以上の高輝度領域を検出し、
前記設定手段は、前記光源の位置と前記第1の高輝度領域の位置に基づいて定められる略直線上に他の高輝度領域が存在しない場合に、前記第1の高輝度領域に対応した前記光線を付加する領域を設定し、前記光源の位置と前記第1の高輝度領域の位置に基づいて定められる略直線上に他の高輝度領域が存在する場合は前記光線を付加する領域を設定しない、
ことを特徴とする請求項1に記載の画像処理装置。
The detecting means detects one or more high-intensity regions including a first high-intensity region;
The setting means corresponds to the first high luminance region when there is no other high luminance region on a substantially straight line determined based on the position of the light source and the position of the first high luminance region. A region to which a light beam is added is set, and if another high-brightness region exists on a substantially straight line determined based on the position of the light source and the position of the first high-brightness region, the region to which the light beam is added is set. do not do,
The image processing apparatus according to claim 1.
前記設定手段は、前記略直線上の一部を含む領域であって、前記第1の高輝度領域の位置から前記光源の位置と反対方向の領域を、前記光線を付加する領域として設定する、
ことを特徴とする請求項5に記載の画像処理装置。
The setting means is an area including a part on the substantially straight line, and sets an area in a direction opposite to the position of the light source from the position of the first high-luminance area as an area to which the light beam is added.
The image processing apparatus according to claim 5.
前記設定手段は、前記第1の高輝度領域の位置から前記光源の位置と反対方向に伸ばした、前記第1の高輝度領域に外接する互いに異なる2つの接線と、前記第1の高輝度領域および前記画像の端とに囲まれる領域を前記光線を付加する領域として設定する、
ことを特徴とする請求項5または6に記載の画像処理装置。
The setting means includes two different tangent lines circumscribing the first high-luminance region, extending from the position of the first high-luminance region in a direction opposite to the position of the light source, and the first high-luminance region. And an area surrounded by the edge of the image is set as an area to which the light ray is added.
The image processing apparatus according to claim 5, wherein the image processing apparatus is an image processing apparatus.
前記画像に対応する、撮像装置からの距離情報を取得する距離情報取得手段をさらに有し、
前記設定手段は、前記光源の位置および前記高輝度領域の位置により前記光線を付加する領域を設定できる場合であっても、前記距離情報取得手段により取得された前記距離情報を用いることにより、前記画像に含まれる被写体の位置と前記略直線上の一部の位置とに応じて、前記光線を付加する領域を設定しない、
ことを特徴とする請求項2から7のいずれか1項に記載の画像処理装置。
Further comprising distance information acquisition means for acquiring distance information from the imaging device corresponding to the image;
Even if the setting unit can set the region to which the light beam is added according to the position of the light source and the position of the high luminance region, by using the distance information acquired by the distance information acquiring unit, According to the position of the subject included in the image and a part of the position on the substantially straight line, do not set the region to which the light beam is added
The image processing apparatus according to claim 2, wherein the image processing apparatus is an image processing apparatus.
前記設定手段は、前記距離情報取得手段により取得された前記距離情報を用いて、3次元空間上で光線を付加する位置を設定する、
ことを特徴とする請求項8に記載の画像処理装置。
The setting means sets a position to add a light beam in a three-dimensional space using the distance information acquired by the distance information acquisition means.
The image processing apparatus according to claim 8.
前記設定手段により設定された前記領域に、前記光線を付加する付加手段をさらに有し、
前記付加手段は、前記領域における画素値に所定の画素値を前記光線として加算する、
ことを特徴とする請求項1から9のいずれか1項に記載の画像処理装置。
And further comprising an adding means for adding the light beam to the region set by the setting means,
The adding means adds a predetermined pixel value to the pixel value in the region as the light ray,
The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
前記付加手段は、前記画像から前記光源の光源色を算出して、前記光源色を用いて得られる前記所定の画素値を前記光線として加算する、
ことを特徴とする請求項10に記載の画像処理装置。
The adding means calculates a light source color of the light source from the image, and adds the predetermined pixel value obtained by using the light source color as the light beam,
The image processing apparatus according to claim 10.
前記付加手段は、前記設定手段により設定された前記領域において、前記光源の位置からの距離に応じて前記所定の画素値を変化させる、
ことを特徴とする請求項10または11に記載の画像処理装置。
The adding means changes the predetermined pixel value in the region set by the setting means according to a distance from a position of the light source.
The image processing apparatus according to claim 10, wherein the image processing apparatus is an image processing apparatus.
前記画像を撮像する撮像手段と、
請求項1から12のいずれか1項に記載の画像処理装置と、
を有することを特徴とする撮像装置。
Imaging means for capturing the image;
The image processing apparatus according to any one of claims 1 to 12,
An imaging device comprising:
取得手段が、画像を取得する取得工程と、
推定手段が、前記画像から前記画像を撮像した際の光源の位置を推定する推定工程と、
検出手段が、前記画像から所定の輝度値より高い輝度値を有する領域を高輝度領域として検出する検出工程と、
設定手段が、前記推定手段により推定された前記光源の位置と前記検出手段により検出された前記高輝度領域の位置に応じて、前記光源からの光線を付加する領域を設定する設定工程と、
を有することを特徴とする画像処理装置の制御方法。
An acquisition step in which the acquisition means acquires an image;
An estimating step for estimating a position of a light source when the image is captured from the image;
A detecting step for detecting, as a high luminance region, a region having a luminance value higher than a predetermined luminance value from the image;
A setting step for setting a region to which light from the light source is added according to the position of the light source estimated by the estimating unit and the position of the high-luminance region detected by the detecting unit;
A control method for an image processing apparatus, comprising:
コンピュータを、請求項1から12のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus of any one of Claim 1 to 12. コンピュータを請求項1から12のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラムを記録した、コンピュータで読み取り可能な記録媒体。   A computer-readable recording medium on which a program for causing a computer to function as each unit of the image processing apparatus according to any one of claims 1 to 12 is recorded.
JP2014226405A 2014-11-06 2014-11-06 Image processor and control method thereof, program and recording medium Pending JP2016091376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014226405A JP2016091376A (en) 2014-11-06 2014-11-06 Image processor and control method thereof, program and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014226405A JP2016091376A (en) 2014-11-06 2014-11-06 Image processor and control method thereof, program and recording medium

Publications (1)

Publication Number Publication Date
JP2016091376A true JP2016091376A (en) 2016-05-23

Family

ID=56019660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014226405A Pending JP2016091376A (en) 2014-11-06 2014-11-06 Image processor and control method thereof, program and recording medium

Country Status (1)

Country Link
JP (1) JP2016091376A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020153630A1 (en) * 2019-01-24 2020-07-30 삼성전자 주식회사 Image processing method and electronic device for supporting same
WO2022114789A1 (en) * 2020-11-25 2022-06-02 삼성전자 주식회사 Electronic device and method for obtaining light quantity

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005092724A (en) * 2003-09-19 2005-04-07 Noritsu Koki Co Ltd Bright line rendering method and program
JP2011053737A (en) * 2009-08-31 2011-03-17 Namco Bandai Games Inc Program, information storage medium and image generation device
WO2013179931A1 (en) * 2012-05-28 2013-12-05 ソニー株式会社 Image processing device, image processing method, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005092724A (en) * 2003-09-19 2005-04-07 Noritsu Koki Co Ltd Bright line rendering method and program
JP2011053737A (en) * 2009-08-31 2011-03-17 Namco Bandai Games Inc Program, information storage medium and image generation device
WO2013179931A1 (en) * 2012-05-28 2013-12-05 ソニー株式会社 Image processing device, image processing method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020153630A1 (en) * 2019-01-24 2020-07-30 삼성전자 주식회사 Image processing method and electronic device for supporting same
WO2022114789A1 (en) * 2020-11-25 2022-06-02 삼성전자 주식회사 Electronic device and method for obtaining light quantity

Similar Documents

Publication Publication Date Title
US10397486B2 (en) Image capture apparatus and method executed by image capture apparatus
US8139136B2 (en) Image pickup apparatus, control method of image pickup apparatus and image pickup apparatus having function to detect specific subject
WO2016047072A1 (en) Image processing apparatus and control method thereof
JP6641181B2 (en) Image processing apparatus and imaging apparatus, control method thereof, and program
JP6412386B2 (en) Image processing apparatus, control method therefor, program, and recording medium
JP7292905B2 (en) Image processing device, image processing method, and imaging device
JP2016086246A (en) Image processing apparatus and method, and imaging device
CN110324529B (en) Image processing apparatus and control method thereof
JP6718253B2 (en) Image processing apparatus and image processing method
JP2017138927A (en) Image processing device, imaging apparatus, control method and program thereof
JP2017147568A (en) Image processing apparatus, imaging apparatus, control method, and program
JP5956844B2 (en) Image processing apparatus and control method thereof
JP2016091376A (en) Image processor and control method thereof, program and recording medium
JP6808482B2 (en) Image processing equipment, image processing methods, and programs
CN116266877A (en) Image processing apparatus and method, image capturing apparatus, and computer readable medium
JP5359930B2 (en) Imaging apparatus, display method, and program
JP6541416B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, PROGRAM, AND STORAGE MEDIUM
CN108111831B (en) Photographing method, imaging apparatus, computer-readable storage medium, and computer device
JP2020010168A (en) Image processing apparatus
JP6666735B2 (en) Image processing apparatus, imaging apparatus, control method for image processing apparatus, and program
JP6433177B2 (en) Image processing apparatus and image processing method
JP6616674B2 (en) Image processing apparatus and method, and imaging apparatus
JP6675461B2 (en) Image processing apparatus, control method therefor, and program
JP7446080B2 (en) Image processing device, imaging device, control method, program and imaging system
JP6701299B2 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171030

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181130

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20190524