JP2023162912A - Image processing device, image processing method, and program - Google Patents

Image processing device, image processing method, and program Download PDF

Info

Publication number
JP2023162912A
JP2023162912A JP2022073624A JP2022073624A JP2023162912A JP 2023162912 A JP2023162912 A JP 2023162912A JP 2022073624 A JP2022073624 A JP 2022073624A JP 2022073624 A JP2022073624 A JP 2022073624A JP 2023162912 A JP2023162912 A JP 2023162912A
Authority
JP
Japan
Prior art keywords
correction term
image
captured image
ratio
image processing
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
JP2022073624A
Other languages
Japanese (ja)
Inventor
健 石塚
Takeshi Ishizuka
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 JP2022073624A priority Critical patent/JP2023162912A/en
Publication of JP2023162912A publication Critical patent/JP2023162912A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

To prevent motion blur caused by moving objects while preventing images from being captured in a state where an illuminator is turned off in an HDR image acquired by using a plurality of captured images with different exposure conditions.SOLUTION: An image processing device 100 acquires data of a first captured image and data of a second captured image captured with a shorter exposure time than the first captured image. Also, the image processing device 100 determines a synthesis ratio to be used when synthesizing pixel values of the first captured image and pixel values of the second captured image on the basis of spatial frequency components of the second captured image.SELECTED DRAWING: Figure 1

Description

本開示は、撮像装置の撮像画像からHDR(High Dynamic Range)画像を取得する技術に関する。 The present disclosure relates to a technique for acquiring an HDR (High Dynamic Range) image from an image captured by an imaging device.

互いに異なる露光条件により撮像された複数の撮像画像のデータ(以下、単に「撮像画像データ」ともいう。)を用いて、HDR画像のデータ(以下、単に「HDR画像データ」ともいう。)を取得する技術が知られている。LED(Light Emitting Diode)又は蛍光灯のように点灯と消灯とを高速に繰り返す光源(以下「フリッカ光源」という。)により構成された看板又は信号機等の照明器が撮像画像に写る場合、次のようなことが起こり得る。当該場合、自然人には照明器が点灯して見える状態であっても、フリッカ光源が消灯している期間のみの露光により撮像された撮像画像には、照明器が消灯した状態で写ってしまう。このような撮像画像のデータを用いてHDR画像データを取得した場合でもHDR画像に照明器が消灯した状態で写ることを抑制するためのLFM(LED Flicker Mitigation)技術がある。一方、撮像画像に自動車等の動きのあるオブジェクト(以下「動体オブジェクト」という。)が写る場合、長露光画像には動体オブジェクトが写る画像領域(以下「動体領域」という。)に動きブレが生じることがある。このような撮像画像のデータを用いてHDR画像データを取得した場合でもHDR画像における動体領域に動きブレが生じた状態で写ることを抑制する技術がある。 Acquire HDR image data (hereinafter also simply referred to as "HDR image data") using data of a plurality of captured images (hereinafter also simply referred to as "captured image data") captured under mutually different exposure conditions. There are known techniques to do this. When an illuminator such as a signboard or traffic light consisting of a light source that repeatedly turns on and off at high speed (hereinafter referred to as a "flicker light source") such as an LED (Light Emitting Diode) or a fluorescent lamp appears in the captured image, the following Something like this can happen. In this case, even if the illuminator appears to be lit to a natural person, the illuminator will appear unlit in a captured image captured by exposure only during the period when the flicker light source is off. Even when HDR image data is acquired using such captured image data, there is an LFM (LED Flicker Mitigation) technique for suppressing the appearance of an illuminator in an unlit state in an HDR image. On the other hand, when a moving object such as a car (hereinafter referred to as "moving object") is captured in the captured image, motion blur occurs in the image area where the moving object is captured (hereinafter referred to as "moving object area") in the long exposure image. Sometimes. Even when HDR image data is acquired using such captured image data, there is a technique for suppressing the appearance of a moving object area in an HDR image with motion blur.

特許文献1には、長露光画像のデータと短露光画像のデータとを用いてHDR画像データを取得する画像処理方法が開示されている。ここで、長露光画像とは、フリッカ光源の点滅周期以上の長い露光時間の撮像により得られた撮像画像であり、短露光画像とは、フリッカ光源の点滅周期より短い露光時間の撮像により得られた撮像画像である。具体的には、特許文献1に開示された方法(以下「従来方法」という。)では、まず、長露光画像と短露光画像とに対して露光時間の比に応じたゲイン調整を行う。次に、ゲイン調整後の長露光画像と短露光画像との画素値の差分の絶対値(以下「画素差分値」という。)が所定の閾値より大きい画素をフリッカ画素として特定する。次に、特定したフリッカ画素について、撮像画像の撮像条件に応じて、ゲイン調整後の長露光画像又は短露光画像の画素値を合成する割合を高めるようにして、HDR画像のデータを取得する。具体的には、従来方法では、撮像画像にフリッカ光源が写る撮像条件では、特定したフリッカ画素について、ゲイン調整後の長露光画像の画素値を合成する割合を高めるようにして、HDR画像のデータを取得する。一方、撮像画像に動体オブジェクトが写る撮像条件では、特定したフリッカ画素について、ゲイン調整後の短露光画像の画素値を合成する割合を高めるようにして、HDR画像のデータを取得する。 Patent Document 1 discloses an image processing method for acquiring HDR image data using long exposure image data and short exposure image data. Here, a long exposure image is an image obtained by imaging with an exposure time longer than the blinking cycle of the flickering light source, and a short exposure image is an image obtained by capturing an exposure time shorter than the blinking cycle of the flickering light source. This is a captured image. Specifically, in the method disclosed in Patent Document 1 (hereinafter referred to as the "conventional method"), gain adjustment is first performed on a long exposure image and a short exposure image according to the ratio of exposure times. Next, a pixel whose absolute value of the difference in pixel values between the long exposure image and the short exposure image after gain adjustment (hereinafter referred to as "pixel difference value") is larger than a predetermined threshold value is identified as a flicker pixel. Next, for the identified flicker pixels, HDR image data is acquired by increasing the ratio of pixel values of the long-exposure image or short-exposure image after gain adjustment, depending on the imaging conditions of the captured image. Specifically, in the conventional method, under imaging conditions where a flickering light source appears in the captured image, the ratio of compositing the pixel values of the long exposure image after gain adjustment is increased for the identified flickering pixels, and the data of the HDR image is get. On the other hand, under imaging conditions in which a moving object is captured in the captured image, HDR image data is acquired by increasing the ratio of pixel values of the short exposure image after gain adjustment for the identified flicker pixels.

このようにして、従来方法では、短露光画像におけるフリッカ画素がフリッカ光源の消灯状態で撮像されている場合でも、HDR画像においてフリッカ光源が消灯した状態で写ることを抑制している。また、長露光画像に動体オブジェクトによる動きブレが生じている場合でも、HDR画像における動体領域に動きブレが生じた状態で写ることを抑制している。 In this way, in the conventional method, even if flicker pixels in a short exposure image are captured with the flicker light source turned off, they are suppressed from appearing in the HDR image with the flicker light source turned off. Further, even if a long exposure image has motion blur caused by a moving object, the moving object region in the HDR image is suppressed from being captured with motion blur.

特表2019-517215号Special table number 2019-517215

しかしながら、従来方法では、撮像画像にフリッカ光源及び動体オブジェクトの両方が写るような撮像条件で得た撮像画像で、ゲイン調整後の長露光画像の画素値を合成する割合を高めると、HDR画像において動体オブジェクトによる動きブレが生じてしまう。逆に、ゲイン調整後の短露光画像の画素値を合成する割合を高めると、HDR画像において動体オブジェクトによる動きブレについては抑制できるが、フリッカ光源により構成された照明器が消灯された状態で写ってしまうことがある。 However, in the conventional method, if the ratio of compositing the pixel values of the long exposure image after gain adjustment is increased in a captured image obtained under imaging conditions such that both a flickering light source and a moving object are captured in the captured image, the HDR image Motion blur caused by moving objects. Conversely, increasing the ratio of compositing pixel values of short-exposure images after gain adjustment can suppress motion blur caused by moving objects in HDR images, but it can also suppress motion blur caused by moving objects in HDR images. Sometimes it happens.

本開示に係る画像処理装置は、第1の撮像画像のデータと、前記第1の撮像画像より短い露光時間で撮像された第2の撮像画像のデータとを取得する画像取得手段と、前記第2の撮像画像の空間周波数成分に基づいて、前記第1の撮像画像の画素値と前記第2の撮像画像の画素値とを合成する際に用いる合成比率を決定する比率決定手段と、を有する。 An image processing device according to the present disclosure includes an image acquisition unit that acquires data of a first captured image and data of a second captured image captured with a shorter exposure time than the first captured image; ratio determining means for determining a combination ratio to be used when combining pixel values of the first captured image and pixel values of the second captured image, based on spatial frequency components of the second captured image. .

本開示によれば、異なる露光条件により撮像された複数の撮像画像を用いて取得したHDR画像において、照明器が消灯した状態で写ることを抑制しつつ、動体オブジェクトによる動きブレを抑制することができる。 According to the present disclosure, in an HDR image acquired using a plurality of captured images captured under different exposure conditions, it is possible to suppress motion blur caused by a moving object while suppressing an image in which the illuminator is turned off. can.

実施形態1に係る画像処理装置の機能構成の一例を示すブロック図である。1 is a block diagram illustrating an example of a functional configuration of an image processing apparatus according to a first embodiment; FIG. 実施形態1に係る画像処理装置のハードウェア構成の一例を示すブロック図である。1 is a block diagram illustrating an example of a hardware configuration of an image processing apparatus according to a first embodiment. FIG. 実施形態1に係る長露光画像及び短露光画像の撮像方法の一例を説明するための説明図である。FIG. 2 is an explanatory diagram for explaining an example of a method of capturing a long exposure image and a short exposure image according to the first embodiment. 実施形態1に係るイメージセンサの入出力特性の一例を示すグラフである。3 is a graph showing an example of input/output characteristics of the image sensor according to the first embodiment. 実施形態1に係る第1合成比率の決定方法の一例を説明するための説明図である。FIG. 3 is an explanatory diagram for explaining an example of a method for determining a first combination ratio according to the first embodiment. 実施形態1に係る補正項決定部の機能構成の一例を示すブロック図である。FIG. 3 is a block diagram showing an example of a functional configuration of a correction term determining unit according to the first embodiment. 補正項とフリッカ評価値との関係の一例を示すグラフである。7 is a graph showing an example of the relationship between a correction term and a flicker evaluation value. 実施形態1に係る画像処理装置の処理フローの一例を示すフローチャートである。3 is a flowchart illustrating an example of a processing flow of the image processing apparatus according to the first embodiment. 実施形態2に係る第1仮補正項及び第2仮補正項の決定方法の一例を説明するための説明図である。FIG. 7 is an explanatory diagram for explaining an example of a method for determining a first provisional correction term and a second provisional correction term according to the second embodiment. 実施形態2に係る画像処理装置の処理フローの一例を示すフローチャートである。7 is a flowchart illustrating an example of a processing flow of an image processing apparatus according to a second embodiment.

以下、添付の図面を参照して、本開示の実施の形態について詳細に説明する。なお、以下の実施の形態に示す構成は一例に過ぎず、本開示の範囲をその構成のみに限定するものではない。 Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Note that the configurations shown in the embodiments below are merely examples, and the scope of the present disclosure is not limited to only those configurations.

[実施形態1]
図1乃至8を参照して、実施形態1に係る画像処理装置100について説明する。まず、図1及び2を参照して、画像処理装置100の構成について説明する。図1は、実施形態1に係る画像処理装置100の機能構成の一例を示すブロック図である。画像処理装置100は、例えば、画像処理システム1に適用される。画像処理システム1は、画像処理装置100及び撮像部110を備える。画像処理装置100と撮像部110とは、専用線又はLAN(Local Area Network)等のネットワークにより互いに通信可能に接続されている。
[Embodiment 1]
An image processing apparatus 100 according to a first embodiment will be described with reference to FIGS. 1 to 8. First, the configuration of the image processing apparatus 100 will be described with reference to FIGS. 1 and 2. FIG. 1 is a block diagram showing an example of the functional configuration of an image processing apparatus 100 according to the first embodiment. The image processing device 100 is applied to the image processing system 1, for example. The image processing system 1 includes an image processing device 100 and an imaging section 110. The image processing device 100 and the imaging unit 110 are communicably connected to each other via a dedicated line or a network such as a LAN (Local Area Network).

撮像部110は、デジタルスチルカメラ又はデジタルビデオカメラ等により構成された撮像装置等である。具体的には、例えば、撮像部110は、レンズ等により構成された光学系、並びに、CMOS(Complementary Metal-Oxide-Semiconductor)等により構成されたイメージセンサ及び画像処理ユニット等を備える。撮像部110は、撮像により得た撮像画像のデータ(以下「撮像画像データ」ともいう。)を出力する。具体的には、撮像部110は、撮像画像データとして、互いに露光時間が異なる長露光画像107のデータと短露光画像108のデータとを出力する。 The imaging unit 110 is an imaging device such as a digital still camera or a digital video camera. Specifically, for example, the imaging unit 110 includes an optical system including a lens and the like, an image sensor and an image processing unit including a CMOS (Complementary Metal-Oxide-Semiconductor), and the like. The imaging unit 110 outputs data of a captured image obtained by imaging (hereinafter also referred to as "captured image data"). Specifically, the imaging unit 110 outputs data of a long exposure image 107 and data of a short exposure image 108, which have different exposure times, as captured image data.

ここで、長露光画像107とは、撮像対象である、LED(Light Emitting Diode)又は蛍光灯のように点灯と消灯とを高速に繰り返す光源(以下「フリッカ光源」という。)における点滅周期の1周期以上の露光時間で撮像したときに得られる撮像画像である。また、短露光画像108とは、長露光画像107より短い露光時間で撮像された撮像画像であって、撮像対象のフリッカ光源における点滅周期の1周期未満の露光時間で撮像したときに得られる撮像画像である。 Here, the long exposure image 107 is one of the blinking cycles of a light source (hereinafter referred to as a "flicker light source") that repeats turning on and off at high speed, such as an LED (Light Emitting Diode) or a fluorescent lamp, which is the object to be imaged. This is a captured image obtained when the image is captured with an exposure time longer than the period. Further, the short exposure image 108 is a captured image captured with an exposure time shorter than that of the long exposure image 107, and is an image obtained when the image is captured with an exposure time of less than one cycle of the flickering cycle of the flickering light source of the imaging target. It is an image.

図3を参照して、長露光画像107及び短露光画像108の撮像方法について説明する。図3は、実施形態1に係る撮像部110における長露光画像107及び短露光画像108の撮像方法の一例を説明するための説明図である。長露光画像107及び短露光画像108の撮像は、例えば、撮像部110のイメージセンサの各画素を順次2回露光させることにより行なわれる。具体的には、例えば、まず、1回目の露光により長露光画像107を撮像し、当該露光の完了後にイメージセンサから出力信号値(以下「画素値」ともいう。)の読み出しを行う。次に、2回目の露光により短露光画像108を撮像し、当該露光の完了後にイメージセンサから出力信号値(画素値)の読み出しを行う。例えば、図3に一例として示すように、このような露光を、撮像する画像位置及び露光のタイミングを変更しながら行うことにより長露光画像107及び短露光画像108を取得する。 A method for capturing the long exposure image 107 and the short exposure image 108 will be described with reference to FIG. 3. FIG. 3 is an explanatory diagram for explaining an example of a method for capturing the long exposure image 107 and the short exposure image 108 in the imaging unit 110 according to the first embodiment. The long exposure image 107 and the short exposure image 108 are captured, for example, by sequentially exposing each pixel of the image sensor of the imaging unit 110 twice. Specifically, for example, first, a long exposure image 107 is captured by the first exposure, and after the exposure is completed, output signal values (hereinafter also referred to as "pixel values") are read out from the image sensor. Next, a short exposure image 108 is captured by a second exposure, and after the exposure is completed, output signal values (pixel values) are read from the image sensor. For example, as shown in FIG. 3 as an example, a long exposure image 107 and a short exposure image 108 are obtained by performing such exposure while changing the image position to be imaged and the exposure timing.

図4を参照して、長露光画像107を撮像する際の露光(以下「長露光」という。)と、短露光画像108を撮像する際の露光(以下「短露光」という。)とにおけるイメージセンサの光電素子の入出力特性について説明する。図4は、実施形態1に係るイメージセンサの光電素子の入出力特性の一例を示すグラフであって、イメージセンサの光電素子の長露光時及び短露光時における入力照度と出力信号値(画素値)との関係(入出力特性)の一例を示すグラフである。図4において、横軸は、イメージセンサの光電素子に入力される光の照度(入力照度)の大きさを示し、縦軸は、当該光電素子から読み出される出力信号値(出力画素値)の大きさを示す。以下、入力照度は、時間経過に依存することなく一定であるものとして説明する。 Referring to FIG. 4, images of the exposure when capturing the long exposure image 107 (hereinafter referred to as "long exposure") and the exposure when capturing the short exposure image 108 (hereinafter referred to as "short exposure") The input/output characteristics of the photoelectric element of the sensor will be explained. FIG. 4 is a graph showing an example of the input/output characteristics of the photoelectric element of the image sensor according to Embodiment 1, and shows input illuminance and output signal value (pixel value) of the photoelectric element of the image sensor during long exposure and short exposure. ) is a graph showing an example of the relationship (input/output characteristics). In FIG. 4, the horizontal axis represents the magnitude of the illuminance of light input to the photoelectric element of the image sensor (input illuminance), and the vertical axis represents the magnitude of the output signal value (output pixel value) read from the photoelectric element. Show that. Hereinafter, the input illuminance will be explained as being constant regardless of the passage of time.

図4において、実線により示される折れ線400は、長露光時におけるイメージセンサの光電素子の入出力特性の一例を表している。また、破線により示される折れ線401は、短露光時におけるイメージセンサの光電素子の入出力特性の一例を表している。長露光時において、出力信号値は、イメージセンサの光電素子が飽和するまでは入力照度の増加に伴って線形に増加し、入力照度が一定値以上では飽和出力信号値で一定となる。長露光時と同様に、短露光時において、出力信号値は、イメージセンサの光電素子が飽和するまでは入力照度の増加に伴って線形に増加し、入力照度が一定値以上では飽和出力信号値で一定となる。ただし、入力照度に対する短露光時における出力信号値の増加率は、長露光時におけるそれと比較して緩やかである。CMOS等のイメージセンサは、一般的に、入射光により各画素に対応するフォトダイオードに電荷が蓄積され、蓄積された電荷量に比例するデジタル信号値を出力信号値として出力する。そのため、長露光時に比べて短露光時の方がフォトダイオードに電荷が蓄積される時間が短いため、短露光時の方が同じ入力照度のときに蓄積される電荷量が小さくなる。結果として、図4に示すような入出力特性となる。 In FIG. 4, a solid line 400 represents an example of the input/output characteristics of the photoelectric element of the image sensor during long exposure. Furthermore, a broken line 401 represents an example of the input/output characteristics of the photoelectric element of the image sensor during short exposure. During long exposure, the output signal value increases linearly as the input illuminance increases until the photoelectric element of the image sensor is saturated, and becomes constant at the saturated output signal value when the input illuminance exceeds a certain value. As with long exposure, during short exposure, the output signal value increases linearly as the input illuminance increases until the photoelectric element of the image sensor is saturated, and when the input illuminance exceeds a certain value, the output signal value reaches the saturated output signal value. becomes constant. However, the rate of increase in the output signal value during short exposure with respect to input illuminance is slower than that during long exposure. Image sensors such as CMOS generally accumulate electric charge in photodiodes corresponding to each pixel due to incident light, and output a digital signal value proportional to the amount of accumulated electric charge as an output signal value. Therefore, the amount of charge accumulated in the photodiode is shorter during short exposure than during long exposure, so the amount of charge accumulated at the same input illuminance is smaller during short exposure. As a result, the input/output characteristics as shown in FIG. 4 are obtained.

画像処理装置100は、画像取得部101、第1比率決定部102、補正項決定部103、第2比率決定部104、及び画像合成部105を備える。なお、実施形態1では、画像処理装置100は、一例として、画像合成部105を備えるものとして説明するが、画像合成部105は、画像処理装置100の外部に備えられてもよい。この場合、例えば、画像合成部105は、画像処理システム1に備えられた図1には不図示のコンピュータ等により構成された情報処理装置の内部に備えられる。 The image processing device 100 includes an image acquisition section 101 , a first ratio determination section 102 , a correction term determination section 103 , a second ratio determination section 104 , and an image composition section 105 . Note that in the first embodiment, the image processing apparatus 100 is described as having the image composition section 105 as an example, but the image composition section 105 may be provided outside the image processing apparatus 100. In this case, for example, the image synthesis unit 105 is provided inside an information processing device configured by a computer or the like (not shown in FIG. 1) included in the image processing system 1.

画像処理装置100が備える各部の処理は、画像処理装置100に内蔵されたASIC(Application Specific Integrated Circuit)等のハードウェアによってなされる。当該処理は、FPGA(Field Programmable Gate Array)等のハードウェアによってなされるものであってもよい。撮像部110と画像撮像装置100とは、一体となっていても良い。この場合、例えば、画像処理装置100が備える各部の処理は、撮像部110を構成するCMOSと一体化された集積回路によりなされても良いし、CMOSに接続された他の集積回路によりなされても良い。また、当該処理は、RAM(Random Access Memory)等のメモリと、CPU(Central Processor Unit)等のプロセッサとを用いたソフトウエアによってなされるものであってもよい。 Processing of each part included in the image processing apparatus 100 is performed by hardware such as an ASIC (Application Specific Integrated Circuit) built into the image processing apparatus 100. The processing may be performed by hardware such as an FPGA (Field Programmable Gate Array). The imaging unit 110 and the image capturing device 100 may be integrated. In this case, for example, the processing of each part of the image processing device 100 may be performed by an integrated circuit integrated with the CMOS constituting the imaging unit 110, or by another integrated circuit connected to the CMOS. good. Further, the processing may be performed by software using a memory such as a RAM (Random Access Memory) and a processor such as a CPU (Central Processor Unit).

図2を参照して、実施形態1に係る画像処理装置100が備える各部がソフトウエアとして動作する場合の画像処理装置100のハードウェア構成について説明する。図2は、実施形態1に係る画像処理装置100のハードウェア構成の一例を示すブロック図である。画像処理装置100は、コンピュータにより構成されており、当該コンピュータは、図2に一例として示すようにCPU201、ROM202、RAM203、補助記憶装置204、表示部205、操作部206、通信部207、及びバス208を有している。 With reference to FIG. 2, the hardware configuration of the image processing apparatus 100 in the case where each unit included in the image processing apparatus 100 according to the first embodiment operates as software will be described. FIG. 2 is a block diagram showing an example of the hardware configuration of the image processing apparatus 100 according to the first embodiment. The image processing apparatus 100 is configured by a computer, and as shown in FIG. It has 208.

CPU201は、ROM202又はRAM203等に格納されているプログラム又はデータを用いて当該コンピュータを制御することにより、当該コンピュータを図1に示す画像処理装置100が備える各部として機能させるプロセッサである。なお、画像処理装置100は、CPU201とは異なる1又は複数の専用のハードウェアを有し、CPU201による処理の少なくとも一部を専用のハードウェアが実行してもよい。専用のハードウェアの例としては、ASIC、FPGA、及びDSP(デジタルシグナルプロセッサ)等がある。ROM202は、変更を必要としないプログラム等を格納するメモリである。RAM203は、補助記憶装置204から供給されるプログラム若しくはデータ、又は通信部207を介して外部から供給されるデータ等を一時記憶するメモリである。補助記憶装置204は、例えばハードディスクドライブにより構成され、プログラム、又は画像データ若しくは音声データ等の種々のデータを記憶する。 The CPU 201 is a processor that controls the computer using programs or data stored in the ROM 202 or the RAM 203, thereby causing the computer to function as each unit included in the image processing apparatus 100 shown in FIG. Note that the image processing apparatus 100 may include one or more dedicated hardware different from the CPU 201, and the dedicated hardware may execute at least part of the processing by the CPU 201. Examples of dedicated hardware include ASICs, FPGAs, and DSPs (digital signal processors). The ROM 202 is a memory that stores programs that do not require modification. The RAM 203 is a memory that temporarily stores programs or data supplied from the auxiliary storage device 204, or data supplied from the outside via the communication unit 207. The auxiliary storage device 204 is configured by, for example, a hard disk drive, and stores programs or various data such as image data or audio data.

表示部205は、例えば液晶ディスプレイ又はLED等により構成され、ユーザが画像処理装置100を操作、又は画像処理装置100における処理の状態を閲覧するためのGUI(Graphical User Interface)等を表示する。操作部206は、例えばキーボード、マウス、ジョイスティック、又はタッチパネル等により構成され、ユーザによる操作を受けて各種の指示をCPU201に入力する。CPU201は、表示部205を制御する表示制御部、及び操作部206を制御する操作制御部としても動作する。 The display unit 205 is configured with, for example, a liquid crystal display or an LED, and displays a GUI (Graphical User Interface) or the like for the user to operate the image processing apparatus 100 or view the processing status in the image processing apparatus 100. The operation unit 206 includes, for example, a keyboard, a mouse, a joystick, a touch panel, or the like, and inputs various instructions to the CPU 201 in response to user operations. The CPU 201 also operates as a display control unit that controls the display unit 205 and an operation control unit that controls the operation unit 206.

通信部207は、画像処理装置100の外部の装置との間のデータ等の送受信等の通信に用いられる。例えば、画像処理装置100が外部の装置と有線接続される場合には、通信用のケーブルが通信部207に接続される。画像処理装置100が外部の装置と無線通信する機能を有する場合には、通信部207はアンテナを備える。バス208は、画像処理装置100の備える各部をつないで情報を伝達する。実施形態1では、表示部205及び操作部206は、画像処理装置100の内部に存在するものとして説明するが、表示部205及び操作部206の少なくとも一方は、画像処理装置100の外部に別の装置として存在していてもよい。 The communication unit 207 is used for communication such as sending and receiving data, etc., to and from devices external to the image processing apparatus 100. For example, when the image processing apparatus 100 is connected to an external device by wire, a communication cable is connected to the communication unit 207. When the image processing apparatus 100 has a function of wirelessly communicating with an external device, the communication unit 207 includes an antenna. A bus 208 connects each unit of the image processing apparatus 100 and transmits information. In the first embodiment, the display section 205 and the operation section 206 will be described as being present inside the image processing apparatus 100. However, at least one of the display section 205 and the operation section 206 is located outside the image processing apparatus 100. It may exist as a device.

画像処理装置100が備える、図1に示す各部の処理について説明する。画像取得部101は、長露光画像107のデータと短露光画像108のデータとを取得する。具体的には、例えば、画像取得部101は、撮像部110が出力する長露光画像107のデータと短露光画像108のデータとを、ネットワークを介して取得する。画像取得部101は、予め長露光画像107のデータと短露光画像108のデータとが記憶された図1には不図示の記憶装置から長露光画像107のデータと短露光画像108のデータとを読み出すことより、当該データを取得してもよい。この場合、例えば、撮像部110は、長露光画像107のデータと短露光画像108のデータとを記憶装置に出力して、当該データを予め当該記憶装置に記憶させる。 The processing of each unit shown in FIG. 1 included in the image processing apparatus 100 will be described. The image acquisition unit 101 acquires data of a long exposure image 107 and data of a short exposure image 108. Specifically, for example, the image acquisition unit 101 acquires the data of the long exposure image 107 and the data of the short exposure image 108 output by the imaging unit 110 via the network. The image acquisition unit 101 retrieves the data of the long exposure image 107 and the data of the short exposure image 108 from a storage device (not shown in FIG. 1) in which the data of the long exposure image 107 and the data of the short exposure image 108 are stored in advance. The data may be acquired by reading it. In this case, for example, the imaging unit 110 outputs the data of the long exposure image 107 and the data of the short exposure image 108 to the storage device, and stores the data in the storage device in advance.

第1比率決定部102は、長露光画像107の画素値(以下「画素値L」と表記する。)に基づいて、画素値Lと短露光画像108の画素値(以下「画素値S」と表記する。)とを合成する際に用いる仮の合成比率(以下「第1合成比率」という。)を決定する。具体的には、第1比率決定部102は、長露光画像107の画素ごとに、長露光画像107の画素の値(画素値L)と当該画素に対応する短露光画像108の画素の値(画素値S)とを合成する際に用いる第1合成比率を決定する。 The first ratio determination unit 102 determines the pixel value L and the pixel value of the short exposure image 108 (hereinafter referred to as "pixel value S") based on the pixel value of the long exposure image 107 (hereinafter referred to as "pixel value L"). A provisional synthesis ratio (hereinafter referred to as "first synthesis ratio") to be used when synthesizing the ``first synthesis ratio'' is determined. Specifically, the first ratio determining unit 102 determines, for each pixel of the long exposure image 107, the value of the pixel of the long exposure image 107 (pixel value L) and the value of the pixel of the short exposure image 108 corresponding to the pixel ( A first combination ratio to be used when combining the pixel value S) is determined.

図5を参照して、第1合成比率の決定方法について説明する。図5は、実施形態1に係る第1合成比率(α)の決定方法の一例を説明するための説明図である。図5において、横軸は、画素値Lの大きさを示し、縦軸は、第1合成比率(α)の大きさを示す。また、図5において、実線により示される折れ線500は、画素値Lと、第1比率決定部102により決定される第1合成比率(α)との関係の一例を表している。図5に示すように、第1合成比率(α)は、画素値Lが予め定められた第1の閾値(以下「第1画素閾値」という。)であるTh1_L未満である場合、0又は0に近い値(以下「略0」という。)に決定される。これに対して、画素値Lが第1画素閾値以上の予め定められた第2の閾値(以下「第2画素閾値」という。)であるTh1_H以上である場合、1又は1に近い値(以下「略1」という。)に決定される。以下、1は略1を含み、0は略0を含むものとして説明する。また、画素値LがTh1_L以上であり、且つ、Th1_H未満である場合、画素値Lに対して例えば線形に増加させた0から1までのいずれかの値に決定される。具体的には、第1比率決定部102は、例えば、次の数式1を用いて第1合成比率(α)を決定する。 A method for determining the first combination ratio will be described with reference to FIG. 5. FIG. 5 is an explanatory diagram for explaining an example of a method for determining the first combination ratio (α) according to the first embodiment. In FIG. 5, the horizontal axis indicates the magnitude of the pixel value L, and the vertical axis indicates the magnitude of the first synthesis ratio (α). Further, in FIG. 5, a polygonal line 500 indicated by a solid line represents an example of the relationship between the pixel value L and the first combination ratio (α) determined by the first ratio determination unit 102. As shown in FIG. 5, the first synthesis ratio (α) is 0 or 0 when the pixel value L is less than Th1_L, which is a predetermined first threshold (hereinafter referred to as "first pixel threshold"). (hereinafter referred to as "approximately 0"). On the other hand, if the pixel value L is greater than or equal to Th1_H, which is a predetermined second threshold (hereinafter referred to as "second pixel threshold") that is greater than or equal to the first pixel threshold, then the pixel value L is 1 or a value close to 1 (hereinafter referred to as (referred to as "approximately 1"). Hereinafter, description will be made assuming that 1 includes approximately 1 and 0 includes approximately 0. Further, when the pixel value L is greater than or equal to Th1_L and less than Th1_H, the pixel value L is determined to be any value from 0 to 1 that increases linearly with respect to the pixel value L, for example. Specifically, the first ratio determination unit 102 determines the first composite ratio (α) using the following equation 1, for example.

Figure 2023162912000002
Figure 2023162912000002

ここで、αは、第1比率決定部102により決定される第1合成比率であり、画素値Lと画素値Sとを合成する際に実際に用いる第2合成比率において、後述する補正項を除いた基本の合成比率である。また、Lは、長露光画像107の画素の値(画素値L)である。なお、αは、画素値Sを合成する割合を示し、1からαを減じた値(1-α)は、画素値Lを合成する割合を示す。このように、第1比率決定部102は、画素値LがTh1_LからTh1_Hに向かって増加するにつれて徐々に画素値Sを合成する割合が高まるように第1合成比率(α)を決定する。なお、上述では、第1合成比率(α)の最小値は0であるものとして説明したが、第1合成比率(α)の最小値は0に限定されるものではなく、0近傍の正の実数であってもよい。また、上述では、第1合成比率(α)の最大値は1であるものとして説明したが、第1合成比率(α)の最大値は1に限定されるものではなく、1近傍且つ1未満の正の実数であってもよい。 Here, α is a first synthesis ratio determined by the first ratio determination unit 102, and in the second synthesis ratio actually used when combining the pixel value L and the pixel value S, This is the basic composite ratio excluding the above. Further, L is a pixel value (pixel value L) of the long exposure image 107. Note that α indicates the rate at which the pixel values S are combined, and the value (1−α) obtained by subtracting α from 1 indicates the rate at which the pixel values L are combined. In this way, the first ratio determination unit 102 determines the first combination ratio (α) so that as the pixel value L increases from Th1_L to Th1_H, the ratio of combining the pixel values S gradually increases. Although the above description assumes that the minimum value of the first synthesis ratio (α) is 0, the minimum value of the first synthesis ratio (α) is not limited to 0, and may be a positive value near 0. It may be a real number. Further, in the above description, the maximum value of the first synthesis ratio (α) is assumed to be 1, but the maximum value of the first synthesis ratio (α) is not limited to 1, but is close to 1 and less than 1. may be a positive real number.

このように構成することより、画素値Lと画素値Sとを合成することにより得られるHDR(High Dynamic Range)画像において、長露光画像107と短露光画像108とのつなぎ目に階調の段差が発生することを抑制することができる。また、得られたHDR画像が人工的に作成された画像(アーティファクト)として見えてしまうことを抑制することができる。なお、階調の段差は、長露光画像107と短露光画像108とのノイズ値の違い等に起因する。 With this configuration, in the HDR (High Dynamic Range) image obtained by combining the pixel value L and the pixel value S, there is a difference in gradation at the joint between the long exposure image 107 and the short exposure image 108. This can be prevented from occurring. Furthermore, it is possible to prevent the obtained HDR image from appearing as an artificially created image (artifact). Note that the difference in gradation is caused by a difference in noise value between the long exposure image 107 and the short exposure image 108, and the like.

補正項決定部103は、短露光画像108の空間周波数成分に基づいて、第1合成比率(α)を補正する補正項を決定する。具体的には、まず、補正項決定部103は、画素値Lと画素値Sとに基づいて、画素値Lと画素値Sとを合成する際に画素値Lを合成する比率が高まるように第1合成比率(α)を補正する仮の補正項(以下「仮補正項」という。)を取得する。次に、補正項決定部103は、取得した仮補正項を短露光画像108の空間周波数成分に基づいて変更することにより、第1合成比率(α)を補正するための補正項を決定する。図6を参照して、補正項決定部103の内部構成について説明する。図6は、実施形態1に係る補正項決定部103の機能構成の一例を示すブロック図である。補正項決定部103は、仮補正項取得部601、クリップ部602、第1フィルタ部603、第2フィルタ部604、及び変更部605を備える。 The correction term determining unit 103 determines a correction term for correcting the first synthesis ratio (α) based on the spatial frequency component of the short exposure image 108. Specifically, first, based on the pixel value L and the pixel value S, the correction term determination unit 103 sets the ratio of combining the pixel value L when combining the pixel value L and the pixel value S so that the ratio of combining the pixel value L is increased. A temporary correction term (hereinafter referred to as "temporary correction term") for correcting the first synthesis ratio (α) is obtained. Next, the correction term determination unit 103 determines a correction term for correcting the first synthesis ratio (α) by changing the acquired provisional correction term based on the spatial frequency component of the short exposure image 108. The internal configuration of correction term determining section 103 will be described with reference to FIG. 6. FIG. 6 is a block diagram illustrating an example of the functional configuration of the correction term determination unit 103 according to the first embodiment. The correction term determination unit 103 includes a temporary correction term acquisition unit 601 , a clip unit 602 , a first filter unit 603 , a second filter unit 604 , and a change unit 605 .

仮補正項取得部601は、長露光画像107の画素ごとに、長露光画像107の画素の値(画素値L)と当該画素に対応する短露光画像108の画素の値(画素値S)とを合成する際に用いる仮の補正項(仮補正項)を決定して取得する。より具体的には、仮補正項取得部601は、長露光画像107と短露光画像108との出力比と、画素値L及び画素値Sとに基づいて、画素ごとに仮補正項を決定する。仮補正項取得部601は、仮補正項を決定するために、まず、フリッカ評価値を算出する。フリッカ評価値は、長露光画像107の画素の値(画素値L)と、当該画素に対応する短露光画像108の画素の値(画素値S)に長露光画像107と短露光画像108との出力比を乗じたゲイン調整後の短露光画像108の画素値との差分値である。以下、ゲイン調整後の短露光画像108を「調整短露光画像」と称して説明する。具体的には、仮補正項取得部601は、例えば、次の数式2を用いてフリッカ評価値(f)を算出する。 The temporary correction term acquisition unit 601 obtains, for each pixel of the long exposure image 107, the value of the pixel of the long exposure image 107 (pixel value L) and the value of the pixel of the short exposure image 108 corresponding to the pixel (pixel value S). A temporary correction term (temporary correction term) to be used when synthesizing is determined and obtained. More specifically, the temporary correction term acquisition unit 601 determines a temporary correction term for each pixel based on the output ratio between the long exposure image 107 and the short exposure image 108, and the pixel value L and the pixel value S. . The temporary correction term acquisition unit 601 first calculates a flicker evaluation value in order to determine a temporary correction term. The flicker evaluation value is determined by combining the pixel value of the long exposure image 107 (pixel value L), the pixel value of the short exposure image 108 corresponding to the pixel (pixel value S), and the long exposure image 107 and the short exposure image 108. This is the difference value from the pixel value of the short exposure image 108 after gain adjustment multiplied by the output ratio. Hereinafter, the short exposure image 108 after gain adjustment will be referred to as an "adjusted short exposure image". Specifically, the provisional correction term acquisition unit 601 calculates the flicker evaluation value (f) using the following equation 2, for example.

Figure 2023162912000003
Figure 2023162912000003

ここで、fは、仮補正項取得部601により算出されるフリッカ評価値、Lは、長露光画像107の画素の値(画素値L)、Sは、短露光画像108の画素の値(画素値S)、Rは出力比である。出力比(R)は、長露光画像107を撮像する際の露光時間(以下「長露光時間」という。)と、短露光画像108を撮像する際の露光時間(以下「短露光時間」という。)の比の値であり、例えば、次の数式3により算出される。 Here, f is the flicker evaluation value calculated by the temporary correction term acquisition unit 601, L is the pixel value of the long exposure image 107 (pixel value L), and S is the pixel value of the short exposure image 108 (pixel value value S), R is the power ratio. The output ratio (R) is the exposure time when capturing the long exposure image 107 (hereinafter referred to as "long exposure time") and the exposure time when capturing the short exposure image 108 (hereinafter referred to as "short exposure time"). ), and is calculated using the following equation 3, for example.

Figure 2023162912000004
Figure 2023162912000004

ここで、E_Lは長露光時間であり、E_Sは短露光時間である。出力比(R)は、長露光時間(E_L)及び短露光時間(E_S)のみにより決定される値である。そのため、入力照度に時間変化のない、すなわちフリッカ光源による光ではない光が入射されるイメージセンサの光電素子に対応する画素の画素値Lと画素値Sとの比の値に相当する。ただし、当該画素に入射する入力照度が、画素値L及び画素値Sが飽和出力信号値に達するより小さい値となる場合である。そのため、画素値L及び画素値Sが飽和出力信号値より小さい値であることを前提として、フリッカ光源による光ではない光が入射されるイメージセンサの光電素子に対応する画素のフリッカ評価値(f)は、0又は0に近い値となる。一方、フリッカ光源による光が入射されるイメージセンサの光電素子に対応する画素のフリッカ評価値(f)は、相応に大きな値となる。 Here, E_L is the long exposure time and E_S is the short exposure time. The output ratio (R) is a value determined only by the long exposure time (E_L) and the short exposure time (E_S). Therefore, it corresponds to the value of the ratio between the pixel value L and the pixel value S of the pixel corresponding to the photoelectric element of the image sensor where the input illuminance does not change over time, that is, the light other than the light from the flicker light source is incident. However, this is a case where the input illuminance incident on the pixel is smaller than the value at which the pixel value L and the pixel value S reach the saturated output signal value. Therefore, on the premise that the pixel value L and the pixel value S are smaller than the saturated output signal value, the flicker evaluation value (f ) is 0 or a value close to 0. On the other hand, the flicker evaluation value (f) of a pixel corresponding to a photoelectric element of an image sensor into which light from a flicker light source is incident is a correspondingly large value.

図7を参照して、仮補正項取得部601により決定される仮補正項と、仮補正項取得部601により算出されたフリッカ評価値(f)との関係について説明する。図7は、仮補正項(b)とフリッカ評価値(f)との関係の一例を示すグラフである。図7において、横軸は、フリッカ評価値(f)の大きさを示し、縦軸は、仮補正項(b)の大きさを示している。図7において、実線により示される折れ線700は、フリッカ評価値(f)を入力としたときの仮補正項(b)の出力特性の一例を示している。また、図7において、Th2_Lは、フリッカ評価値の第1の閾値(以下「第1評価閾値」という。)を示し、Th2_Hは、フリッカ評価値の第2の閾値(以下「第2評価閾値」という。)を示している。第2評価閾値は、第1評価閾値以上の値である。仮補正項取得部601は、フリッカ評価値(f)が第1評価閾値(Th2_L)未満である場合には、対象の画素が、フリッカ光源による光が入射する画素(以下「フリッカ画素」という。)ではないものとして、仮補正項(b)を0に決定する。また、フリッカ評価値(f)が第1評価閾値(Th2_L)以上且つ第2評価閾値(Th2_H)未満である場合には、対象の画素がフリッカ画素であるものとする。そして、仮補正項(b)を、フリッカ評価値(f)に対して線形に増加させた0から1までのいずれかの値に決定する。また、フリッカ評価値(f)が第2評価閾値(Th2_H)以上である場合には、対象の画素がフリッカ画素(f)であるものとして、仮補正項(b)を1に決定する。ここで、フリッカ画素とは、フリッカ光源による光が入射されるイメージセンサの光電素子に対応する画素を意味する。具体的には、仮補正項取得部601は、例えば、次の数式4を用いて仮補正項(b)を決定する。 Referring to FIG. 7, the relationship between the temporary correction term determined by the temporary correction term acquisition unit 601 and the flicker evaluation value (f) calculated by the temporary correction term acquisition unit 601 will be described. FIG. 7 is a graph showing an example of the relationship between the temporary correction term (b) and the flicker evaluation value (f). In FIG. 7, the horizontal axis indicates the magnitude of the flicker evaluation value (f), and the vertical axis indicates the magnitude of the temporary correction term (b). In FIG. 7, a solid line 700 indicates an example of the output characteristic of the temporary correction term (b) when the flicker evaluation value (f) is input. Further, in FIG. 7, Th2_L indicates the first threshold of the flicker evaluation value (hereinafter referred to as "first evaluation threshold"), and Th2_H indicates the second threshold of the flicker evaluation value (hereinafter referred to as "second evaluation threshold"). ). The second evaluation threshold is a value greater than or equal to the first evaluation threshold. If the flicker evaluation value (f) is less than the first evaluation threshold (Th2_L), the temporary correction term acquisition unit 601 determines that the target pixel is a pixel on which light from a flicker light source enters (hereinafter referred to as a "flicker pixel"). ), the provisional correction term (b) is determined to be 0. Furthermore, if the flicker evaluation value (f) is greater than or equal to the first evaluation threshold (Th2_L) and less than the second evaluation threshold (Th2_H), the target pixel is determined to be a flicker pixel. Then, the temporary correction term (b) is determined to be any value between 0 and 1 that increases linearly with respect to the flicker evaluation value (f). Furthermore, if the flicker evaluation value (f) is equal to or greater than the second evaluation threshold (Th2_H), the target pixel is assumed to be a flicker pixel (f), and the temporary correction term (b) is determined to be 1. Here, the flicker pixel means a pixel corresponding to a photoelectric element of an image sensor into which light from a flicker light source is incident. Specifically, the provisional correction term acquisition unit 601 determines the provisional correction term (b) using the following equation 4, for example.

Figure 2023162912000005
Figure 2023162912000005

ここで、bは、仮補正項取得部601により算出される仮補正項の値である。なお、上述では、仮補正項(b)の最小値は0であるものとして説明したが、仮補正項(b)の最小値は0に限定されるものではなく、0近傍の正の実数であってもよい。また、上述では、仮補正項(b)の最大値は1であるものとして説明したが、仮補正項(b)の最大値は1に限定されるものではなく、1近傍且つ1未満の正の実数であってもよい。画素値L及び画素値Sは、ノイズの影響などによりフリッカ影響のない画素であっても画素値のゆらぎがあるため、フリッカ評価値(f)は、完全に0にはならないことがある。そのため、上述のように、仮補正項(b)を0又は0の近傍値とする区間を設けることが好適である。 Here, b is the value of the temporary correction term calculated by the temporary correction term acquisition unit 601. In addition, although the above explanation assumes that the minimum value of the provisional correction term (b) is 0, the minimum value of the provisional correction term (b) is not limited to 0, but may be a positive real number near 0. There may be. In addition, although the above description assumes that the maximum value of the provisional correction term (b) is 1, the maximum value of the provisional correction term (b) is not limited to 1; may be a real number. The pixel value L and the pixel value S have fluctuations in pixel value even if the pixel is not affected by flicker due to the influence of noise, so the flicker evaluation value (f) may not be completely zero. Therefore, as described above, it is preferable to provide an interval in which the temporary correction term (b) is 0 or a value close to 0.

クリップ部602は、入力された調整短露光画像の各画素値について、例えば、次の数式5により表される低輝度クリップ処理を行う。 The clipping unit 602 performs, for example, low-luminance clipping processing expressed by the following Equation 5 on each pixel value of the input adjusted short exposure image.

Figure 2023162912000006
Figure 2023162912000006

ここで、Mは、調整短露光画像の画素値であり、M´は、調整短露光画像の画素値(M)に対して低輝度クリップ処理を行った後の画素値である。また、th_clipは、低輝度クリップ処理における輝度閾値であり、調整短露光画像における各画素値(M)の階調範囲内における任意の値である。th_clipをイメージセンサの特性又は撮像時の露光時間等を考慮して設定することにより、低輝度クリップ処理後の調整短露光画像は、ノイズが発生しやすい低輝度階調がth_clipでクリップされた画像となる。以下、低輝度クリップ処理後の調整短露光画像を、クリップ短露光画像と称して説明する。 Here, M is a pixel value of the adjusted short exposure image, and M' is a pixel value after low brightness clipping processing is performed on the pixel value (M) of the adjusted short exposure image. Further, th_clip is a brightness threshold value in low brightness clip processing, and is an arbitrary value within the gradation range of each pixel value (M) in the adjusted short exposure image. By setting th_clip in consideration of the characteristics of the image sensor or the exposure time during image capture, the adjusted short exposure image after low-brightness clipping is an image in which the low-brightness gradation where noise is likely to occur is clipped by th_clip. becomes. Hereinafter, the adjusted short-exposure image after the low-luminance clipping process will be referred to as a clipped short-exposure image.

第1フィルタ部603は、クリップ短露光画像のうち、予め定められた第1の空間周波数成分のみを通過させるフィルタである。具体的には、例えば、第1フィルタ部603は、第1の空間周波数以上の高周波成分を低減し、第1の空間周波数未満の低周波成分のみを通過させる。この場合、例えば、第1フィルタ部603は、平均化フィルタ又はガウシアンフィルタ等のローパスフィルタにより構成される。また、第2フィルタ部604は、予め定められた第2の空間周波数成分のみを通過させるフィルタである。具体的には、例えば、第2フィルタ部604は、第1フィルタ部603を通過後の画像のうち、予め定められた第2の空間周波数以上の高周波成分を低減し、第2の空間周波数未満の低周波成分のみを通過させる。この場合、例えば、第2フィルタ部604は、平均化フィルタ又はガウシアンフィルタ等のローパスフィルタにより構成される。 The first filter section 603 is a filter that allows only a predetermined first spatial frequency component of the clip short exposure image to pass through. Specifically, for example, the first filter section 603 reduces high frequency components higher than the first spatial frequency and passes only low frequency components lower than the first spatial frequency. In this case, for example, the first filter section 603 is configured with a low-pass filter such as an averaging filter or a Gaussian filter. Further, the second filter section 604 is a filter that passes only a predetermined second spatial frequency component. Specifically, for example, the second filter unit 604 reduces high frequency components higher than a predetermined second spatial frequency and lowers high frequency components lower than the second spatial frequency in the image after passing through the first filter unit 603. Passes only low frequency components. In this case, for example, the second filter section 604 is configured with a low-pass filter such as an averaging filter or a Gaussian filter.

なお、第1フィルタ部603及び第2フィルタ部604の構成は、ローパスフィルタに限定されるものではなく、クリップ短露光画像のうちの予め定められた空間周波数成分を通過させることが可能な構成であればよい。そのため、第1フィルタ部603及び第2フィルタ部604は、例えば、ハイパスフィルタ又はバンドパスフィルタ等により構成されたものであってもよい。また、ローパスフィルタ、ハイパスフィルタ、又はバンドパスフィルタ等を組合せて構成されたものであってもよい。また、本実施形態では、第1フィルタ部603及び第2フィルタ部604による2つのフィルタ部により構成する態様を示したが、第1フィルタ部603と第2フィルタ部604とを統合して1つのフィルタ部により構成してもよい。また、第1フィルタ部603及び第2フィルタ部604を、第1フィルタ部603及び第2フィルタ部604を含む3つ以上のフィルタ部により構成してもよい。 Note that the configurations of the first filter section 603 and the second filter section 604 are not limited to low-pass filters, but are configurations that can pass predetermined spatial frequency components of the clip short exposure image. Good to have. Therefore, the first filter section 603 and the second filter section 604 may be configured by, for example, a high-pass filter or a band-pass filter. Further, it may be configured by combining a low-pass filter, a high-pass filter, a band-pass filter, or the like. In addition, in this embodiment, a mode is shown in which the first filter section 603 and the second filter section 604 are configured as two filter sections, but the first filter section 603 and the second filter section 604 are integrated to form one filter section. It may also be configured by a filter section. Further, the first filter section 603 and the second filter section 604 may be configured by three or more filter sections including the first filter section 603 and the second filter section 604.

変更部605は、第1フィルタ部603及び第2フィルタ部604のそれぞれを通過した画像を用いて、仮補正項取得部601により取得された仮補正項(b)を変更して、第1合成比率(α)を補正するための補正項を決定する。例えば、変更部605は、まず、第1フィルタ部603及び第2フィルタ部604のそれぞれを通過した画像を用いて、クリップ短露光画像のうちの高周波成分、中周波成分、又は低周波成分のみを含む画像を取得する。具体的には、例えば、変更部605は、図6には不図示の減算部を備え、減算部により第1フィルタ部603を通過後の画像から第2フィルタ部604を通過後の画像を減算して、減算後の画像を取得する。なお、減算部は、例えば、周知の減算回路により構成される。第1フィルタ部603及び第2フィルタ部604、並びに減算部の設定を変更することにより、クリップ短露光画像のうちの高周波成分、中周波成分、又は低周波成分のみを含む画像を取得することができる。以下、第1フィルタ部603及び第2フィルタ部604、並びに減算部を用いて、入力された画像のうちの予め定められた周波数成分のみを含む画像を取得する処理を、フィルタリング処理という。 The changing unit 605 uses the images that have passed through the first filter unit 603 and the second filter unit 604 to change the temporary correction term (b) acquired by the temporary correction term acquisition unit 601, and performs the first synthesis. A correction term for correcting the ratio (α) is determined. For example, the changing unit 605 first uses the images that have passed through the first filter unit 603 and the second filter unit 604 to change only the high frequency component, medium frequency component, or low frequency component of the clipped short exposure image. Get the image containing. Specifically, for example, the changing unit 605 includes a subtracting unit not shown in FIG. 6, and the subtracting unit subtracts the image after passing through the second filter unit 604 from the image after passing through the first filter unit 603. to obtain the image after subtraction. Note that the subtraction section is configured by, for example, a well-known subtraction circuit. By changing the settings of the first filter section 603, the second filter section 604, and the subtraction section, it is possible to obtain an image containing only high frequency components, medium frequency components, or low frequency components of the clipped short exposure image. can. Hereinafter, the process of using the first filter section 603, the second filter section 604, and the subtraction section to obtain an image containing only predetermined frequency components from the input image will be referred to as filtering processing.

例えば、高周波成分のみを含む画像を取得したい場合、第1フィルタ部603での処理を実施せずに、第2フィルタ部604では適当なフィルタサイズを設定して処理を実施する。更に、減算部にて第1フィルタ部603を通過した画像から第2フィルタ部604から通過した画像を減算する。このように、取得する画像の帯域幅は、フィルタサイズの設定の変更により変更でき、フィルタサイズの設定により、例えば、クリップ短露光画像において明るさの急激な変化のある部分、つまりクリップ短露光画像における輪郭情報のみ等を取得ことができる。 For example, when it is desired to obtain an image containing only high frequency components, the first filter section 603 does not perform the processing, and the second filter section 604 sets an appropriate filter size and performs the processing. Further, a subtraction unit subtracts the image passed through the second filter unit 604 from the image passed through the first filter unit 603. In this way, the bandwidth of the image to be acquired can be changed by changing the filter size settings. It is possible to obtain only contour information etc.

また、例えば、中周波成分のみを含む画像を取得したい場合は、第1フィルタ部603及び第2フィルタ部604のフィルタサイズを以下のように設定する。この場合、第1フィルタ部603については、111/111/111のフィルタ係数を持つ3x3タップの平均化フィルタで設定する。第2フィルタ部604については、11111/11111/11111/11111/11111のフィルタ係数を持つ5x5タップの平均化フィルタで設定する。第1フィルタ部603にて高周波成分がカットされ、第2フィルタ部604にて第1フィルタ部603でカットした高周波成分より低い周波数帯の高周波成分がカットされる。第1フィルタ部603を通過した画像から第2フィルタ部604を通過した画像を減算部にて減算することにより、中周波成分のみを含む画像を取得することができる。このように、取得する画像の帯域幅は、フィルタサイズの設定の変更により変更でき、フィルタサイズの設定により、例えば、クリップ短露光においてノイズを含む高周波帯域をカットした画像における輪郭情報等を取得ことができる。 Further, for example, if it is desired to obtain an image containing only medium frequency components, the filter sizes of the first filter section 603 and the second filter section 604 are set as follows. In this case, the first filter section 603 is set as a 3x3 tap averaging filter with filter coefficients of 111/111/111. The second filter section 604 is set as a 5x5 tap averaging filter having filter coefficients of 11111/11111/11111/11111/11111. The first filter section 603 cuts high frequency components, and the second filter section 604 cuts high frequency components in a frequency band lower than the high frequency components cut by the first filter section 603. By subtracting the image that has passed through the second filter section 604 from the image that has passed through the first filter section 603 in the subtraction section, it is possible to obtain an image that includes only medium frequency components. In this way, the bandwidth of the image to be acquired can be changed by changing the filter size settings, and by setting the filter size, for example, it is possible to obtain contour information, etc. in an image in which high frequency bands containing noise are cut in clip short exposure. I can do it.

また例えば、低周波成分のみを含む画像を取得したい場合は、例えば、第1フィルタ部603では適当なフィルタサイズを設定して処理を実施し、第2フィルタ部604及び減算部ではいずれも処理を実施しないようにする。このように構成することにより、ローパスフィルタにより構成された第1フィルタ部603を通過した画像は、低周波成分のみを含む。取得する画像の帯域幅は、フィルタサイズの設定の変更により変更でき、フィルタサイズの設定により、例えば、クリップ短露光において明るさの急激な変化がある部分については変化がなだらかなった画像等を取得ことができる。 For example, if you want to obtain an image containing only low frequency components, for example, the first filter section 603 sets an appropriate filter size and performs the processing, and the second filter section 604 and the subtraction section both perform the processing. Avoid implementing it. With this configuration, the image that has passed through the first filter section 603 configured with a low-pass filter includes only low frequency components. The bandwidth of the image to be acquired can be changed by changing the filter size settings.For example, by setting the filter size, you can obtain images with gradual changes in brightness for areas where there is a sudden change in brightness during clip short exposure. be able to.

変更部605は、仮補正項取得部601にて取得ローパスフィルタ311および312として、例えば、平均化フィルタやガウシアンフィルタが用いられる。ローパスフィルタ311は、短時間露光画像のうち、所定周波数未満の低周波数成分を通過させるものである。ローパスフィルタ311は、短時間露光画像のうち、所定周波数未満の低周波数成分を通過させるものである。される仮補正項(b)の値を変更して、補正項を決定する。具体的には、変更部605は、画素値Sを合成する比率が高まるように仮補正項(b)の値を変更する。具体的には、変更部605は、例えば、次の数式6を用いて補正項(b´)を決定する。 In the changing unit 605, for example, an averaging filter or a Gaussian filter is used as the acquisition low-pass filters 311 and 312 in the temporary correction term acquisition unit 601. The low-pass filter 311 passes low frequency components below a predetermined frequency in the short-time exposure image. The low-pass filter 311 passes low frequency components below a predetermined frequency in the short-time exposure image. The correction term is determined by changing the value of the provisional correction term (b). Specifically, the changing unit 605 changes the value of the temporary correction term (b) so that the ratio of combining the pixel values S increases. Specifically, the changing unit 605 determines the correction term (b') using Equation 6 below, for example.

Figure 2023162912000007
Figure 2023162912000007

ここで、Nは、フィルタリング処理により取得された、クリップ短露光画像のうちの予め定められた周波数帯の成分のみを含む画像(以下「フィルタリング処理後の画像」という。)の画素値(階調値)である。また、Val_modは、0から-1までの間において予め指定された任意の実数である。Th_modは、仮補正項の閾値であり、仮補正項(b)の範囲内、すなわち0から1までの間において予め指定された任意の実数である。 Here, N is the pixel value (tone value). Further, Val_mod is an arbitrary real number specified in advance between 0 and -1. Th_mod is a threshold value of the temporary correction term, and is an arbitrary real number specified in advance within the range of the temporary correction term (b), that is, between 0 and 1.

仮補正項(b)の値が1に近い画素は、フリッカ画素である可能性が高い。また、補正項(b´)の値が1に近づくほど画素値Lを合成する比率が高まり、補正項(b´)の値が0に近づくほど画素値Sを合成する比率が高まる。そのため、例えば、Th_modを1に近い値に設定してしまうと、フリッカ画素である可能性が高い画素について画素値Sを合成する比率が高まるように仮補正項(b)が変更されてしまうことになる。結果として、この場合、合成により生成させるHDR画像においてフリッカ光源が消灯した状態で写ってしまう可能性がある。これに対して、Th_modを0又は0に近い値に設定することにより、フリッカ画素である可能性が高い画素について、画素値Lを合成する比率が高まるように仮補正項(b)が変更されて補正項(b´)が決定される。結果として、この場合、合成により生成されるHDR画像においてフリッカ光源が消灯した状態で写ることを抑制することができる。 A pixel for which the value of the temporary correction term (b) is close to 1 is highly likely to be a flicker pixel. Further, as the value of the correction term (b') approaches 1, the ratio of combining pixel values L increases, and as the value of the correction term (b') approaches 0, the ratio of combining pixel values S increases. Therefore, for example, if Th_mod is set to a value close to 1, the temporary correction term (b) will be changed to increase the ratio of compositing pixel values S for pixels that are likely to be flicker pixels. become. As a result, in this case, there is a possibility that the HDR image generated by synthesis may appear with the flicker light source turned off. On the other hand, by setting Th_mod to 0 or a value close to 0, the temporary correction term (b) is changed so that the ratio of compositing the pixel value L for pixels that are likely to be flicker pixels is increased. The correction term (b') is determined. As a result, in this case, it is possible to suppress the flicker light source from appearing in a turned-off state in the HDR image generated by synthesis.

Th_filは、空間周波数の閾値であり、フィルタリング処理後の画像の階調範囲内において予め指定された任意の画素値(階調値)である。例えば、フィルタリング処理後の画像がクリップ短露光画像のうちの高周波帯域がカットされた画像であって、輪郭情報を含む画像である場合、補正項(b´)は以下のように決定される。この場合、クリップ短露光画像における輪郭部分に対応する画素の仮補正項(b)が画素値Sを合成する比率が高まるように変更されて、補正項(b´)が決定される。 Th_fil is a spatial frequency threshold, and is an arbitrary pixel value (gradation value) specified in advance within the gradation range of the image after filtering processing. For example, if the image after the filtering process is a clipped short exposure image in which the high frequency band has been cut and includes contour information, the correction term (b') is determined as follows. In this case, the temporary correction term (b) of the pixel corresponding to the contour portion in the clipped short exposure image is changed so that the ratio of combining the pixel values S is increased, and the correction term (b') is determined.

第2比率決定部104は、第1比率決定部102により決定された第1合成比率(α)と、補正項決定部103により決定された補正項(b´)とに基づいて、画素値Lと画素値Sとを実際に合成する際に用いる第2合成比率を画素ごとに決定する。例えば、第2比率決定部104は、第1合成比率(α)から補正項(b´)の値を減じた値を第2合成比率として決定する。第2合成比率(d)は、例えば、次の数式7を用いて表される。 The second ratio determination unit 104 determines the pixel value L based on the first synthesis ratio (α) determined by the first ratio determination unit 102 and the correction term (b′) determined by the correction term determination unit 103. A second combination ratio to be used when actually combining the pixel value S and the pixel value S is determined for each pixel. For example, the second ratio determination unit 104 determines a value obtained by subtracting the value of the correction term (b') from the first combination ratio (α) as the second combination ratio. The second combination ratio (d) is expressed using the following equation 7, for example.

Figure 2023162912000008
Figure 2023162912000008

ここで、max(x0,x1)はx0及びx1のうちの最大値を返す関数である。第2合成比率(d)は、画素値Lと画素値Sとを合成する際に用いられる最終的な合成比率を表し、画素ごとに決定される。画素値Lと画素値Sとを合成してHDR画像を生成する際の、画素値Sを合成する割合が第2合成比率(d)、画素値Lを合成する割合が1から第2合成比率(d)を減じた値(1-d)となる。変更部605にて仮補正項(b)の変更が行われていない画素の場合、補正項(b´)の値は仮補正項(b)の値と同値になるため、第1合成比率(α)と仮補正項(b)の値とを用いて第2合成比率(d)が算出される。一方、変更部605にて仮補正項(b)の変更が行われた画素の場合、補正項(b´)の値は、-1から0までの負の値となり、第2合成比率(d)の値は、第1合成比率(α)の値よりも大きくなる。したがって、画素値Lと画素値Sとの合成において、画素値Sを合成する比率が大きくなる。 Here, max(x0, x1) is a function that returns the maximum value of x0 and x1. The second combination ratio (d) represents the final combination ratio used when combining the pixel value L and the pixel value S, and is determined for each pixel. When pixel values L and pixel values S are combined to generate an HDR image, the ratio of combining pixel values S is the second combination ratio (d), and the ratio of combining pixel values L is from 1 to the second combination ratio The value obtained by subtracting (d) is (1-d). In the case of a pixel for which the temporary correction term (b) has not been changed by the changing unit 605, the value of the correction term (b') is the same as the value of the temporary correction term (b), so the first synthesis ratio ( The second combination ratio (d) is calculated using α) and the value of the temporary correction term (b). On the other hand, in the case of a pixel for which the temporary correction term (b) has been changed by the changing unit 605, the value of the correction term (b') is a negative value from -1 to 0, and the second synthesis ratio (d ) is larger than the value of the first synthesis ratio (α). Therefore, in combining pixel values L and pixel values S, the ratio of combining pixel values S increases.

フィルタリング処理の違いによる効果について説明する。まず、フィルタリング処理後の画像がクリップ短露光画像における高周波成分のみを取り出した画像である場合について説明する。この場合、クリップ短露光画像の輪郭部分に対応する画素の仮補正項(b)については、画素値Sを合成する比率が高まるように変更される。そのため、画素値Lと画素値Sとの合成により生成されるHDR画像の輪郭部分において、自動車等の動きのあるオブジェクト(以下「動体オブジェクト」という。)の撮像により生じる動きブレが軽減される。なお、画像の高周波成分には、ノイズ又は過度に細かいテクスチャが含まれることがある。そのため、単にクリップ短露光画像における高周波成分のみを取り出した画像を使用して仮補正項(b)を変更する場合、当該画像のほぼ全面に対応する各画素の仮補正項(b)について、画素値Sを合成する比率が高まるように変更されてしまう場合がある。 The effects of different filtering processes will be explained. First, a case will be described in which the image after filtering processing is an image obtained by extracting only high frequency components from a clipped short exposure image. In this case, the temporary correction term (b) of the pixel corresponding to the outline portion of the clipped short exposure image is changed so that the ratio of combining the pixel values S is increased. Therefore, in the outline portion of the HDR image generated by combining the pixel values L and the pixel values S, motion blur caused by imaging a moving object such as a car (hereinafter referred to as a "moving object") is reduced. Note that the high frequency components of the image may include noise or excessively fine texture. Therefore, when changing the temporary correction term (b) using an image that simply extracts only the high frequency components of the clipped short exposure image, the temporary correction term (b) for each pixel corresponding to almost the entire surface of the image is There are cases where the ratio of combining the values S is changed so as to increase.

次に、フィルタリング処理後の画像がクリップ短露光画像における中周波成分のみを取り出した画像である場合について説明する。この場合、フィルタリング処理後の画像は、クリップ短露光画像からノイズ又は過度に細かいテクスチャが除かれた画像となる。そのため、クリップ短露光画像の輪郭部分に対応する画素の仮補正項(b)について、画素値Sを合成する比率が高まるように変更される。したがって、画素値Lと画素値Sとの合成により生成されるHDR画像の輪郭部分において、動体オブジェクトの撮像により生じる動きブレが軽減される。 Next, a case will be described in which the image after the filtering process is an image obtained by extracting only the medium frequency components of the clipped short exposure image. In this case, the image after the filtering process is an image in which noise or excessively fine texture is removed from the clipped short exposure image. Therefore, the temporary correction term (b) of the pixel corresponding to the outline portion of the clipped short exposure image is changed so that the ratio of combining the pixel values S is increased. Therefore, in the contour portion of the HDR image generated by combining the pixel value L and the pixel value S, motion blur caused by imaging the moving object is reduced.

次に、フィルタリング処理後の画像がクリップ短露光画像における低周波成分のみを取り出した画像である場合について説明する。例えば、クリップ短露光画像の低周波成分を取り出す際に第1フィルタ部603のタップ数を大きく設定することにより、輝度の値が大きい画像領域と小さい画像領域とが分けられた画像をフィルタリング処理後の画像として取り出すことができる。そのため、クリップ短露光画像における輝度値の大きい、すなわち、明るい画像領域に対応する画素の仮補正項(b)については、画素値Sを合成する比率が高まるように変更される。したがって、画素値Lと画素値Sとの合成により生成されるHDR画像における輝度の値の大きい、すなわち、明るい部分において、動きブレが軽減される。 Next, a case will be described in which the image after the filtering process is an image obtained by extracting only the low frequency components of the clipped short exposure image. For example, by setting a large number of taps in the first filter unit 603 when extracting low frequency components of a clipped short exposure image, an image in which image areas with large brightness values and image areas with small brightness values are separated can be filtered. It can be extracted as an image. Therefore, the temporary correction term (b) for pixels corresponding to bright image areas with large luminance values in the clipped short exposure image is changed so that the ratio of combining pixel values S is increased. Therefore, motion blur is reduced in the HDR image generated by combining the pixel value L and the pixel value S, in which the luminance value is large, that is, in the bright portion.

画像合成部105は、第2合成比率(d)に基づいて、画素値Lと画素値Sとを合成する。具体的には、画像合成部105は、長露光画像107の画素の値(画素値L)と、当該画素に対応する短露光画像108の画素の値(画素値S)とを画素ごとに合成して、HDR画像を生成する。HDR画像の画素値(p)は、例えば、次の数式8を用いて表される。 The image synthesis unit 105 synthesizes the pixel value L and the pixel value S based on the second synthesis ratio (d). Specifically, the image synthesis unit 105 synthesizes the pixel value (pixel value L) of the long exposure image 107 and the pixel value (pixel value S) of the short exposure image 108 corresponding to the pixel for each pixel. Then, an HDR image is generated. The pixel value (p) of the HDR image is expressed using the following equation 8, for example.

Figure 2023162912000009
Figure 2023162912000009

数式8に示すとおり、画素値Lが1から第2合成比率(d)を減じた値(1-d)の割合で、調整短露光画像の画素値(R・S)が第2合成比率(d)の割合で足し合わされる。 As shown in Equation 8, the pixel value L is the ratio of the value (1-d) obtained by subtracting the second combination ratio (d) from 1, and the pixel value (R・S) of the adjusted short exposure image is the second combination ratio (1-d). d) are added up at the rate.

図8を参照して、画像処理装置100の動作について説明する。図8は、実施形態1に係る画像処理装置100の処理フローの一例を示すフローチャートである。なお、図8の説明において記号「S」はステップを意味する。まず、S801にて、画像取得部101は、長露光画像107及び短露光画像108のデータを取得する。次に、S802にて、第1比率決定部102は、画素ごとに第1合成比率(α)を決定する。次に、S803にて、補正項決定部103は、画素ごとに仮補正項(b)を取得する。次に、S804にて、補正項決定部103は、画素ごとに補正項(b´)を決定する。次に、S805にて、第2比率決定部104は、画素ごとに第2合成比率(d)を決定する。次に、S806にて、画像合成部105は、画素ごとに画素値Lと画素値Sとを合成してHDR画像を生成する。S806の後、画像処理装置100は、図8に示すフローチャートの処理を終了する。 The operation of the image processing device 100 will be described with reference to FIG. 8. FIG. 8 is a flowchart illustrating an example of a processing flow of the image processing apparatus 100 according to the first embodiment. Note that in the explanation of FIG. 8, the symbol "S" means a step. First, in S801, the image acquisition unit 101 acquires data of the long exposure image 107 and the short exposure image 108. Next, in S802, the first ratio determination unit 102 determines a first synthesis ratio (α) for each pixel. Next, in S803, the correction term determining unit 103 obtains a temporary correction term (b) for each pixel. Next, in S804, the correction term determining unit 103 determines a correction term (b') for each pixel. Next, in S805, the second ratio determination unit 104 determines a second combination ratio (d) for each pixel. Next, in S806, the image synthesis unit 105 synthesizes the pixel value L and the pixel value S for each pixel to generate an HDR image. After S806, the image processing apparatus 100 ends the process of the flowchart shown in FIG.

以上のように構成した画像処理装置100によれば、異なる露光条件により撮像された複数の撮像画像を用いて取得したHDR画像において、照明器が消灯した状態で写ることを抑制しつつ、動体オブジェクトによる動きブレを抑制することができる。 According to the image processing apparatus 100 configured as described above, in an HDR image acquired using a plurality of captured images captured under different exposure conditions, moving object It is possible to suppress motion blur due to

[実施形態2]
図1、9、及び10を参照して、実施形態2に係る画像処理装置100について説明する。実施形態1に係る画像処理装置100は、長露光画像107の画素の値(画素値L)と、調整短露光画像における、当該画素に対応する画素の値との差分値(フリッカ評価値(f))に基づいて、画素ごとの仮補正項(b)を取得するものであった。これに対して、実施形態2に係る画像処理装置100は、長露光画像107と短露光画像108との類似度に基づいて、仮補正項を取得するものである。なお、実施形態1に係る画像処理装置100では、仮補正項(b)の値が1に近いほどフリッカ画素である可能性が高いことを前提として処理していた。しかしながら、実施形態1に係る画像処理装置100は、単にフリッカ評価値(f)によりフリッカ画素であるか否を特定している。そのため、仮補正項(b)の値が1に近い場合でも、実際はフリッカ画素でないにも関わらずフリッカ画素として特定してしまうことがあった。更に、実際はフリッカ画素でないにも関わらずフリッカ画素として特定された画素が動きブレが生じている画素(以下「動きブレ画素」という。)であることがあった。
[Embodiment 2]
An image processing apparatus 100 according to a second embodiment will be described with reference to FIGS. 1, 9, and 10. The image processing device 100 according to the first embodiment calculates a difference value (flicker evaluation value (f )), the provisional correction term (b) for each pixel was obtained. In contrast, the image processing apparatus 100 according to the second embodiment acquires a temporary correction term based on the similarity between the long exposure image 107 and the short exposure image 108. Note that the image processing apparatus 100 according to the first embodiment performs processing on the premise that the closer the value of the temporary correction term (b) is to 1, the higher the possibility that the pixel is a flicker pixel. However, the image processing apparatus 100 according to the first embodiment simply identifies whether a pixel is a flicker pixel based on the flicker evaluation value (f). Therefore, even if the value of the temporary correction term (b) is close to 1, the pixel may be identified as a flickering pixel even though it is not actually a flickering pixel. Furthermore, there have been cases where a pixel specified as a flicker pixel is a pixel in which motion blur occurs (hereinafter referred to as a "motion blur pixel") even though it is not actually a flicker pixel.

実施形態2に係る画像処理装置100(以下、単に「画像処理装置100」という。)は、実施形態1に係る画像処理装置100と同様に、図1に一例として示す画像取得部101、第1比率決定部102、補正項決定部103、第2比率決定部104、及び画像合成部105を備える。画像処理装置100が備える各部の処理は、実施形態1に係る画像処理装置100と同様に、画像処理装置100に内蔵されたASIC若しくはFPGA等のハードウェアによってなされる。当該処理は、RAM等のメモリとCPU等のプロセッサとを用いたソフトウエアによってなされてもよい。また、画像処理装置100は、実施形態1に係る画像処理装置100と同様に、図1に一例として示す画像処理システム1に適用される。なお、実施形態2では、画像処理装置100は、一例として、画像合成部105を備えるものとして説明するが、画像合成部105は、画像処理装置100の外部に備えられてもよい。この場合、例えば、画像合成部105は、画像処理システム1に備えられた図1には不図示のコンピュータ等により構成された情報処理装置の内部に備えられる。 The image processing apparatus 100 according to the second embodiment (hereinafter simply referred to as "image processing apparatus 100"), like the image processing apparatus 100 according to the first embodiment, includes an image acquisition unit 101 and a first It includes a ratio determining section 102, a correction term determining section 103, a second ratio determining section 104, and an image combining section 105. Similar to the image processing apparatus 100 according to the first embodiment, the processing of each part included in the image processing apparatus 100 is performed by hardware such as ASIC or FPGA built into the image processing apparatus 100. The processing may be performed by software using a memory such as a RAM and a processor such as a CPU. Further, the image processing apparatus 100 is applied to the image processing system 1 shown as an example in FIG. 1, similarly to the image processing apparatus 100 according to the first embodiment. Note that in the second embodiment, the image processing apparatus 100 will be described as including the image composition section 105 as an example, but the image composition section 105 may be provided outside the image processing apparatus 100. In this case, for example, the image synthesis unit 105 is provided inside an information processing device configured by a computer or the like (not shown in FIG. 1) included in the image processing system 1.

図1を参照して、画像処理装置100が備える各部の処理について説明する。なお、実施形態2に係る画像取得部101、第1比率決定部102、及び画像合成部105は、実施形態1に係る対応する各部と同様であるため説明を省略する。以下、実施形態2に係る画像取得部101、第1比率決定部102、及び画像合成部105を、単に、画像取得部101、第1比率決定部102、及び画像合成部105と称して説明する。画像処理装置100は、実施形態2に係る補正項決定部103及び第2比率決定部104が実施形態1に係る対応する各部とはその処理が異なるものである。以下、実施形態2に係る補正項決定部103及び第2比率決定部104を、単に、補正項決定部103及び第2比率決定部104と称して説明する。 With reference to FIG. 1, the processing of each unit included in the image processing apparatus 100 will be described. Note that the image acquisition unit 101, the first ratio determination unit 102, and the image composition unit 105 according to the second embodiment are the same as the corresponding units according to the first embodiment, so a description thereof will be omitted. Hereinafter, the image acquisition section 101, first ratio determination section 102, and image composition section 105 according to the second embodiment will be simply referred to as the image acquisition section 101, first ratio determination section 102, and image composition section 105. . In the image processing apparatus 100, the correction term determining unit 103 and the second ratio determining unit 104 according to the second embodiment are different in processing from the corresponding units according to the first embodiment. Hereinafter, the correction term determination section 103 and the second ratio determination section 104 according to the second embodiment will be simply referred to as the correction term determination section 103 and the second ratio determination section 104.

補正項決定部103は、長露光画像107と調整短露光画像との類似度を取得し、取得した類似度に基づいて仮補正項を取得する。また、補正項決定部103は、取得した仮補正項を短露光画像108の空間周波数成分に基づいて変更することにより、第1合成比率(α)を補正するための補正項を画素ごとに決定する。補正項決定部103は、実施形態1に係る補正項決定部103と同様に、仮補正項取得部601、クリップ部602、第1フィルタ部603、第2フィルタ部604、及び変更部605を備える。図6を参照して、補正項決定部103の処理について説明する。なお、実施形態2に係るクリップ部602、第1フィルタ部603、及び第2フィルタ部604(以下、単に「クリップ部602、第1フィルタ部603、及び第2フィルタ部604」という。)は、実施形態1に係る対応する各部と同様であるため説明を省略する。補正項決定部103は、実施形態2に係る仮補正項取得部601及び変更部605(以下、単に「仮補正項取得部601及び変更部605」という。)が実施形態1に係る仮補正項取得部601及び変更部605とはその処理が異なるものである。 The correction term determining unit 103 obtains the similarity between the long exposure image 107 and the adjusted short exposure image, and obtains a temporary correction term based on the obtained similarity. In addition, the correction term determining unit 103 determines a correction term for correcting the first synthesis ratio (α) for each pixel by changing the acquired provisional correction term based on the spatial frequency component of the short exposure image 108. do. Similar to the correction term determining unit 103 according to the first embodiment, the correction term determining unit 103 includes a temporary correction term obtaining unit 601, a clip unit 602, a first filter unit 603, a second filter unit 604, and a changing unit 605. . The processing of the correction term determining unit 103 will be described with reference to FIG. 6. The clip section 602, the first filter section 603, and the second filter section 604 (hereinafter simply referred to as "the clip section 602, the first filter section 603, and the second filter section 604") according to the second embodiment are as follows. Since each part is the same as the corresponding part according to the first embodiment, a description thereof will be omitted. The correction term determining unit 103 allows the provisional correction term acquisition unit 601 and the change unit 605 (hereinafter simply referred to as "the provisional correction term acquisition unit 601 and the change unit 605") according to the second embodiment to obtain the provisional correction term according to the first embodiment. The acquisition unit 601 and the change unit 605 have different processes.

仮補正項取得部601は、まず、長露光画像107及び短露光画像108の画像領域を互いに対応する複数のブロックに分割する。次に、分割した複数のブロックにおける互いに対応する、長露光画像107のブロックと調整短露光画像のブロックとの類似度をブロックごとに算出する。具体的には、例えば、仮補正項取得部601は、まず、長露光画素107におけるブロック内の画素値Lと、調整短露光画像におけるブロック内の画素値との相関値を算出する。次に、算出した相関値に基づいて仮補正項を算出する。ブロック内の相関値の算出方法としては、SAD(Sum of Absolute Difference)、SSD(Sum of Squared Difference)、又はNCC(Normalized Cross-Correlation)等がある。SADはブロック内の各画素値の差分絶対値和を、SSDはブロック内の各画素値の差分の2乗和を、及びNCCはブロック内の正規化相関総和を、相関値として算出する演算手法である。以下、一例として、仮補正項取得部601は、NCCを用いて互いに対応するブロックの相関値を類似度として算出するものとして説明する。具体的には、仮補正項取得部601は、例えば、次の数式9を用いて類似度(P)を算出する。 The temporary correction term acquisition unit 601 first divides the image areas of the long exposure image 107 and the short exposure image 108 into a plurality of mutually corresponding blocks. Next, the degree of similarity between the blocks of the long exposure image 107 and the blocks of the adjusted short exposure image, which correspond to each other in the plurality of divided blocks, is calculated for each block. Specifically, for example, the temporary correction term acquisition unit 601 first calculates a correlation value between the pixel value L within the block of the long exposure pixel 107 and the pixel value within the block in the adjusted short exposure image. Next, a temporary correction term is calculated based on the calculated correlation value. Methods for calculating correlation values within a block include SAD (Sum of Absolute Difference), SSD (Sum of Squared Difference), and NCC (Normalized Cross-Correlation). SAD is a calculation method that calculates the sum of absolute differences of each pixel value in a block, SSD is the sum of squares of differences of each pixel value in a block, and NCC is a calculation method that calculates the normalized sum of correlations in a block as a correlation value. It is. Hereinafter, as an example, it will be explained that the temporary correction term acquisition unit 601 uses NCC to calculate the correlation value of mutually corresponding blocks as the degree of similarity. Specifically, the temporary correction term acquisition unit 601 calculates the degree of similarity (P) using the following equation 9, for example.

Figure 2023162912000010
Figure 2023162912000010

ここで、iは、水平方向の画素位置を示す例えば正の整数であり、jは、垂直方向の画素位置を示す例えば正の整数である。L(i,j)は、長露光画像107における、水平方向の位置がiであり、且つ、垂直方向の位置がjである画素の値(画素値L)である。また、S(i,j)は、短露光画像108における、水平方向の位置がiであり、且つ、垂直方向の位置がjである画素の値(画素値S)であり、Rは、出力比であり、数式3を用いて算出される値である。 Here, i is, for example, a positive integer indicating the pixel position in the horizontal direction, and j is, for example, a positive integer indicating the pixel position in the vertical direction. L(i,j) is the value of a pixel (pixel value L) in the long exposure image 107 whose horizontal position is i and whose vertical position is j. Further, S (i, j) is the value of the pixel (pixel value S) at the horizontal position i and the vertical position j in the short exposure image 108, and R is the output It is a ratio and is a value calculated using Formula 3.

画素値Lと画素値Sとがいずれも飽和出力信号値より小さい値であるという前提において、以下の2つの条件を同時に満たす場合に、類似度(P)は1に近づく。2つの条件のうちの一方は、ブロックに対応するイメージセンサの領域にフリッカ光源による光が入射していない(以下「ブロック内にフリッカが生じていない」という。)場合である。また、もう一方は、動体オブジェクトの撮像により、撮像画像、特に長露光画像107におけるブロック内に動きブレが生じていない場合である。 On the premise that both the pixel value L and the pixel value S are smaller than the saturated output signal value, when the following two conditions are simultaneously satisfied, the degree of similarity (P) approaches 1. One of the two conditions is a case where no light from a flicker light source is incident on the area of the image sensor corresponding to the block (hereinafter referred to as "no flicker occurs within the block"). The other case is a case where no motion blur occurs within the block in the captured image, particularly the long exposure image 107, due to the imaging of the moving object.

これに対して、ブロックに対応するイメージセンサの領域にフリッカ光源による光が入射する(以下「ブロック内にフリッカが生じている」という。)場合、ブロックの類似度(P)は、ブロック内にフリッカ又は動きブレが生じていない場合と比べて小さい値となる。また、同様に、動体オブジェクトの撮像により、撮像画像におけるブロック内に動きブレが生じている場合にも、ブロックの類似度(P)は、ブロック内にフリッカ又は動きブレが生じていない場合と比べて小さい値となる。 On the other hand, when light from a flickering light source is incident on the area of the image sensor corresponding to the block (hereinafter referred to as "flicker occurs within the block"), the block similarity (P) is This value is smaller than when flicker or motion blur does not occur. Similarly, even when motion blur occurs within a block in the captured image due to imaging of a moving object, the block similarity (P) is compared to when no flicker or motion blur occurs within the block. It becomes a small value.

ここで、極端に大きな動きブレが生じている場合を除き、ブロック内にフリッカが生じている場合では、ブロックの類似度(P)は、動体ブレが生じている場合と比べて小さくなる。この特性を利用して、補正項決定部103は、類似度(P)を評価することにより、ブロック内において、フリッカが生じているか、動きブレが生じているか、又は、フリッカ及び動きブレのいずれも生じていないかを判定することができる。 Here, unless extremely large motion blur occurs, when flicker occurs within a block, the block similarity (P) is smaller than when motion blur occurs. Utilizing this characteristic, the correction term determining unit 103 evaluates the degree of similarity (P) to determine whether flicker, motion blur, or both flicker and motion blur occur within the block. It can also be determined whether or not this has occurred.

仮補正項取得部601は、算出した各ブロックに対応する類似度(P)に基づいて、仮補正項をブロックごとに取得する。具体的には、仮補正項取得部601は、ブロックごとに算出した類似度(P)に基づいて、画素値Lを合成する比率が高まるように補正する仮補正項(以下「第1仮補正項」という)をブロックごとに取得する。また、仮補正項取得部601は、ブロックごとに算出した類似度(P)に基づいて、画素値Sを合成する比率が高まるように補正する仮補正項(以下「第2仮補正項」という)をブロックごとに取得する。具体的には、例えば、仮補正項取得部601は、ブロックの類似度(P)が、フリッカが生じているか否かを検出(以下「フリッカ検出」という。)するための判定閾値(以下「フリッカ閾値」という。)以下であるか否かを判定する。ブロックの類似度(P)がフリッカ閾値以下である場合には、第1仮補正項が第2仮補正項と比較して優位に作用するように第1仮補正項及び第2仮補正項を決定して取得する。また、仮補正項取得部601は、ブロックの類似度(P)がフリッカ閾値より大きく、且つ、当該類似度(P)が動きブレが生じているか否かの検出(以下「動きブレ検出」という。)の判定閾値(以下「動きブレ閾値」という。)以下であるか否かを判定する。ブロックの類似度(P)がフリッカ閾値より大きく、且つ動きブレ閾値以下である場合には、第2仮補正項が第1仮補正項と比較して優位に作用するように第1仮補正項及び第2仮補正項を決定する。 The temporary correction term acquisition unit 601 acquires a temporary correction term for each block based on the calculated similarity (P) corresponding to each block. Specifically, the provisional correction term acquisition unit 601 uses a provisional correction term (hereinafter referred to as “first provisional correction term)) for each block. The provisional correction term acquisition unit 601 also provides a provisional correction term (hereinafter referred to as "second provisional correction term") that is corrected to increase the ratio of combining pixel values S based on the similarity (P) calculated for each block. ) for each block. Specifically, for example, the temporary correction term acquisition unit 601 determines whether the similarity (P) of the blocks is a determination threshold value (hereinafter referred to as "flicker detection") for detecting whether or not flicker occurs (hereinafter referred to as "flicker detection"). (referred to as "flicker threshold value"). When the similarity (P) of blocks is less than or equal to the flicker threshold, the first provisional correction term and the second provisional correction term are set so that the first provisional correction term acts more favorably than the second provisional correction term. Decide and get. Further, the provisional correction term acquisition unit 601 detects whether the similarity (P) of the blocks is greater than the flicker threshold and the similarity (P) indicates whether motion blur has occurred (hereinafter referred to as "motion blur detection"). ) (hereinafter referred to as "motion blur threshold"). When the block similarity (P) is greater than the flicker threshold and less than or equal to the motion blur threshold, the first provisional correction term is set so that the second provisional correction term acts more dominantly than the first provisional correction term. and determine the second provisional correction term.

図9を参照して、ブロックの類似度(P)に基づく、当該ブロックにおける仮補正項の決定方法について説明する。図9は、実施形態2に係る仮補正項取得部601における第1仮補正項及び第2仮補正項の決定方法の一例を説明するための説明図である。まず、図9(a)を参照して、ブロックの類似度(P)に基づく、当該ブロックにおける第1仮補正項の決定方法について説明する。図9(a)は、第1仮補正項の決定方法を説明するための説明図である。図9(a)において、横軸は、ブロックの類似度(P)の大きさを示し、縦軸は、第1仮補正項(β)の大きさを示している。また、実線により示される折れ線900は、仮補正項取得部601がブロックの類似度(P)に基づいて第1仮補正項(β)を決定する際の、ブロックの類似度(P)と第1仮補正項(β)との対応関係を示している。 With reference to FIG. 9, a method for determining a temporary correction term for a block based on the similarity (P) of the block will be described. FIG. 9 is an explanatory diagram for explaining an example of a method for determining the first provisional correction term and the second provisional correction term in the provisional correction term acquisition unit 601 according to the second embodiment. First, with reference to FIG. 9(a), a method for determining the first provisional correction term for a block based on the similarity (P) of the block will be described. FIG. 9A is an explanatory diagram for explaining a method for determining the first provisional correction term. In FIG. 9A, the horizontal axis indicates the magnitude of block similarity (P), and the vertical axis indicates the magnitude of the first provisional correction term (β). In addition, a polygonal line 900 indicated by a solid line indicates the block similarity (P) and the The correspondence relationship with the first provisional correction term (β) is shown.

仮補正項取得部601は、ブロックの類似度(P)が下側のフリッカ閾値であるTh2_L未満である場合、第1仮補正項(β)を1に決定する。これに対して、ブロックの類似度(P)が上側のフリッカ閾値であるTh2_H以上の場合、第1仮補正項(β)を0に決定する。また、ブロックの類似度(P)がTh2_L以上であり、且つ、Th2_H未満である場合は、第1仮補正項(β)をブロックの類似度(P)が大きくなるに従って例えば線形に減少させた1から0までのいずれかの値に決定する。つまり、ブロックの類似度(P)がTH2_H以下である場合、仮補正項取得部601は、ブロック内にフリッカが生じていると判定する。ブロックの類似度(P)と第1仮補正項(β)との関係は、例えば、次の数式10により表される。 The temporary correction term acquisition unit 601 determines the first temporary correction term (β) to be 1 when the block similarity (P) is less than the lower flicker threshold Th2_L. On the other hand, if the block similarity (P) is greater than or equal to the upper flicker threshold Th2_H, the first provisional correction term (β) is determined to be zero. Furthermore, when the block similarity (P) is greater than or equal to Th2_L and less than Th2_H, the first provisional correction term (β) is decreased linearly, for example, as the block similarity (P) increases. Decide on a value between 1 and 0. That is, when the similarity (P) of the block is less than or equal to TH2_H, the temporary correction term acquisition unit 601 determines that flicker has occurred within the block. The relationship between the block similarity (P) and the first provisional correction term (β) is expressed, for example, by the following equation 10.

Figure 2023162912000011
Figure 2023162912000011

図9(b)は、第2仮補正項の決定方法を説明するための説明図である。図9(b)において、横軸は、ブロックの類似度(P)の大きさを示し、縦軸は、第2仮補正項(γ)の大きさを示している。また、実線により示される折れ線901は、仮補正項取得部601がブロックの類似度(P)に基づいて第2仮補正項(γ)を決定する際の、ブロックの類似度(P)と第2仮補正項(γ)との対応関係を示している。 FIG. 9(b) is an explanatory diagram for explaining the method for determining the second provisional correction term. In FIG. 9(b), the horizontal axis indicates the magnitude of block similarity (P), and the vertical axis indicates the magnitude of the second temporary correction term (γ). In addition, a polygonal line 901 indicated by a solid line indicates the block similarity (P) and the The correspondence relationship with the second provisional correction term (γ) is shown.

仮補正項取得部601は、ブロックの類似度(P)が、下側から1番目の動きブレ閾値であるTh3_L未満である場合、又は、上側から1番目の動きブレ閾値であるTh4_Hより大きい場合、第2仮補正項(γ)を0に決定する。これに対して、ブロックの類似度(P)が下側から2番目のTh3_H以上であり、且つ、上側から2番目の動きブレ閾値であるTh4_L未満である場合、第2仮補正項(γ)を1に決定する。また、ブロックの類似度(P)が、Th3_L以上であり、且つ、Th3_H未満である場合、第2仮補正項(γ)をブロックの類似度(P)が大きくなるに従って例えば線形に増加させた0から1までのいずれかの値に決定する。更に、ブロックの類似度(P)がTh4_L以上であり、且つ、Th4_H以下である場合は、第2仮補正項(γ)をブロックの類似度(P)が大きくなるに従って例えば線形に減少させた1から0までのいずれかの値に決定する。つまり、ブロックの類似度(P)が、TH3_L以上であり、且つ、Th4_H以下である場合、仮補正項取得部601は、ブロック内に動きブレが生じていると判定する。ブロックの類似度(P)と第2補正項(γ)との関係は、例えば、次の数式11で表される。 The temporary correction term acquisition unit 601 determines whether the block similarity (P) is less than Th3_L, which is the first motion blur threshold from the bottom, or greater than Th4_H, which is the first motion blur threshold from the top. , the second provisional correction term (γ) is determined to be zero. On the other hand, if the block similarity (P) is greater than or equal to Th3_H, which is the second from the bottom, and less than Th4_L, which is the second motion blur threshold from the top, the second temporary correction term (γ) is determined to be 1. Furthermore, when the block similarity (P) is greater than or equal to Th3_L and less than Th3_H, the second provisional correction term (γ) is increased linearly, for example, as the block similarity (P) increases. Decide on a value between 0 and 1. Furthermore, when the block similarity (P) is greater than or equal to Th4_L and less than Th4_H, the second provisional correction term (γ) is decreased linearly, for example, as the block similarity (P) increases. Decide on a value between 1 and 0. That is, when the similarity (P) of the block is greater than or equal to TH3_L and less than or equal to Th4_H, the temporary correction term acquisition unit 601 determines that motion blur has occurred within the block. The relationship between the block similarity (P) and the second correction term (γ) is expressed, for example, by the following Equation 11.

Figure 2023162912000012
Figure 2023162912000012

ただし、図9で示す各閾値の関係は、Th2_L<Th2_H<Th3_L<Th3_H<Th4_L<Th4_Hの関係を満たすものとする。つまり、処理対象のブロックでは、フリッカが生じているか、又は、動きブレが生じているかのどちらか一方のみが検出され、フリッカと動きブレとが同時に生じている状態が検出されることはない。数式4と数式5とを用いて第1仮補正項(β)と第2仮補正項(γ)とを決定することにより、ブロック内にフリッカが生じている場合は、第2仮補正項(γ)と比較して第1仮補正項(β)が優位に作用するようになる。また、ブロック内に動きブレが生じている場合は、第1仮補正項(β)と比較して第2仮補正項(γ)が優位に作用するようになる。また、ブロック内にフリッカ及び動きブレのいずれも生じていない場合は、第1仮補正項(β)及び第2仮補正項(γ)がいずれも0となるため、第1合成比率(α)の補正は行われない。 However, it is assumed that the relationship between the threshold values shown in FIG. 9 satisfies the relationship Th2_L<Th2_H<Th3_L<Th3_H<Th4_L<Th4_H. That is, in the block to be processed, either flicker or motion blur is detected, and a state where flicker and motion blur occur simultaneously is not detected. By determining the first provisional correction term (β) and the second provisional correction term (γ) using Equations 4 and 5, if flicker occurs within the block, the second provisional correction term ( The first provisional correction term (β) comes to have a predominant effect compared to γ). Furthermore, when motion blur occurs within a block, the second provisional correction term (γ) acts more dominantly than the first provisional correction term (β). Furthermore, if neither flicker nor motion blur occurs in the block, the first provisional correction term (β) and the second provisional correction term (γ) are both 0, so the first synthesis ratio (α) No corrections will be made.

変更部605は、第1フィルタ部603及び第2フィルタ部604のそれぞれを通過したフィルタリング処理後の画像を用いて、仮補正項取得部601により取得された第2仮補正項(γ)を変更する。この変更により、変更部605は、第1合成比率(α)を補正するための補正項を画素ごとに取得する。変更部605による変更後の第2仮補正項(γ´)は、例えば、次の数式12で表される。 The changing unit 605 changes the second temporary correction term (γ) acquired by the temporary correction term acquisition unit 601 using the filtered images that have passed through the first filter unit 603 and the second filter unit 604. do. With this change, the changing unit 605 obtains a correction term for correcting the first synthesis ratio (α) for each pixel. The second provisional correction term (γ') after modification by the modification unit 605 is expressed, for example, by the following Equation 12.

Figure 2023162912000013
Figure 2023162912000013

ここで、Nは、フィルタリング処理後の画像の画素値(階調値)である。Val_modは、変更後の第2仮補正項の値であり、0から1までの間の任意の設定値である。Th_filは、空間周波数の閾値であり、フィルタリング処理後の画像(N)の階調範囲内において予め指定された任意の画素値(階調値)である。第1仮補正項(β)が0である画素は、フリッカ画素ではなく、動きブレ画素、又は、フリッカ画素及び動きブレ画素のいずれもでもない画素(以下「静止画素」という。)である可能性が高い画素である。したがって、第1仮補正項(β)が0の場合、変更部605は、第2仮補正項(γ)を変更する。なお、変更部605では、第1仮補正項(β)は変更されないため、変更部605により取得される補正項、すなわち、補正項決定部103により決定される補正項は、第1仮補正項(β)から変更後の第2仮補正項(γ´)を減じた値(β-γ´)となる。 Here, N is a pixel value (gradation value) of the image after filtering processing. Val_mod is the value of the second provisional correction term after the change, and is an arbitrary set value between 0 and 1. Th_fil is a spatial frequency threshold, and is an arbitrary pixel value (gradation value) specified in advance within the gradation range of the image (N) after the filtering process. A pixel for which the first provisional correction term (β) is 0 may be not a flicker pixel but a motion blur pixel, or a pixel that is neither a flicker pixel nor a motion blur pixel (hereinafter referred to as a "still pixel"). It is a pixel with high quality. Therefore, when the first temporary correction term (β) is 0, the changing unit 605 changes the second temporary correction term (γ). Note that since the first temporary correction term (β) is not changed by the changing unit 605, the correction term acquired by the changing unit 605, that is, the correction term determined by the correction term determining unit 103 is the first temporary correction term. The value (β-γ') is obtained by subtracting the changed second provisional correction term (γ') from (β).

これにより、フィルタリング処理後の画像がクリップ短露光画像の輪郭情報を含む画像である場合、動きブレが発生しているクリップ短露光画像の輪郭部分に対応する画素の第2仮補正項(γ)は、画素値Sを合成する比率が高まるように変更される。ここで、フィルタリング処理後の画像がクリップ短露光画像の輪郭情報を含む画像とは、実施形態1で説明したように、例えば、フィルタリング処理により、クリップ短露光画像における高周波成分又は中周波成分等を取り出した画像である。 As a result, if the image after the filtering process is an image that includes contour information of the clip short exposure image, the second temporary correction term (γ) of the pixel corresponding to the contour part of the clip short exposure image where motion blur occurs is changed so that the ratio of combining pixel values S is increased. Here, an image in which the image after the filtering process includes outline information of the clipped short exposure image means, for example, as explained in the first embodiment, the high frequency component or the medium frequency component, etc. in the clipped short exposure image is removed by the filtering process. This is the extracted image.

第2比率決定部104は、第1比率決定部102により決定された第1合成比率(α)と、補正項決定部103により決定された補正項(β-γ´)とに基づいて、画素値Lと画素値Sとを実際に合成する際に用いる第2合成比率を画素ごとに決定する。例えば、第2比率決定部104は、第1合成比率(α)から補正項(β-γ´)を減じた値を第2合成比率として決定する。第2合成比率(d)は、例えば、次の数式13を用いて表される。 The second ratio determination unit 104 determines whether the pixel A second combination ratio to be used when actually combining the value L and the pixel value S is determined for each pixel. For example, the second ratio determination unit 104 determines a value obtained by subtracting the correction term (β-γ') from the first combination ratio (α) as the second combination ratio. The second combination ratio (d) is expressed using the following equation 13, for example.

Figure 2023162912000014
Figure 2023162912000014

ここで、min(x0,x1)はx0及びx1のうちの最小値を返す関数であり、max(x0,x1)はx0及びx1のうちの最大値を返す関数である。第2合成比率(d)は、画素値Lと画素値Sとを合成する際に用いられる最終的な合成比率を表し、画素ごとに決定される。画素値Lと画素値Sとを合成してHDR画像を生成する際の、画素値Sを合成する比率が第2合成比率(d)となり、画素値Lを合成する比率が1から第2合成比率(d)を減じた値(1-d)となる。第1仮補正項(β)と変更後の第2仮補正項(γ´)との値がいずれも0である場合、第2合成比率(d)の値は、第1合成比率(α)の値と同値となり、第1合成比率(α)がそのまま第2合成比率(d)となる。第1仮補正項(β)の値が大きくなるほど第2合成比率(d)の値は小さくなり、画素値Lと画素値Sとの合成により得られるHDR画像の画素において、画素値Lが合成される比率が増加する。一方、変更後の第2仮補正項(γ´)が大きくなるほど第2合成比率(d)の値は大きくなり、画素値Lと画素値Sとの合成により得られるHDR画像の画素において、画素値Sが合成される比率が増加する。 Here, min (x0, x1) is a function that returns the minimum value of x0 and x1, and max (x0, x1) is a function that returns the maximum value of x0 and x1. The second combination ratio (d) represents the final combination ratio used when combining the pixel value L and the pixel value S, and is determined for each pixel. When pixel values L and pixel values S are combined to generate an HDR image, the ratio at which pixel values S are combined is the second combination ratio (d), and the ratio at which pixel values L are combined is from 1 to the second combination. The value obtained by subtracting the ratio (d) is (1-d). If the values of the first provisional correction term (β) and the changed second provisional correction term (γ') are both 0, the value of the second combination ratio (d) is equal to the first combination ratio (α). The first synthesis ratio (α) becomes the second synthesis ratio (d) as it is. The larger the value of the first provisional correction term (β), the smaller the value of the second synthesis ratio (d). The ratio of On the other hand, the larger the second provisional correction term (γ') after the change, the larger the value of the second synthesis ratio (d) becomes. The rate at which the values S are combined increases.

数式13に示す第2合成比率(d)の算出式はあくまで一例である。第2合成比率(d)の算出式は、以下のようなものであればよい。第1仮補正項(β)から変更後の第2仮補正項(γ´)を減じた値の大きさが大きくなるにつれて画素値Lを合成する比率を高めるように第2合成比率(d)を決定する。また、第1仮補正項(β)から変更後の第2仮補正項(γ´)を減じた値の大きさが小さくなるにつれて画素値Sを合成する比率を高めるように第2合成比率(d)を決定する。更に、第2比率決定部104は、第1仮補正項(β)と変更後の第2仮補正項(γ´)とが互いに0である場合に、第1合成比率(α)の値が第2合成比率(d)の値となるように第2合成比率(d)を決定する。 The formula for calculating the second composite ratio (d) shown in Formula 13 is just an example. The formula for calculating the second combination ratio (d) may be as follows. The second synthesis ratio (d) is set such that as the magnitude of the value obtained by subtracting the changed second temporary correction term (γ') from the first temporary correction term (β) increases, the proportion at which pixel values L are synthesized increases. Determine. In addition, the second synthesis ratio ( d). Furthermore, the second ratio determination unit 104 determines that the value of the first composite ratio (α) is The second combination ratio (d) is determined so as to have the value of the second combination ratio (d).

図10を参照して、画像処理装置100の動作について説明する。図10は、実施形態2に係る画像処理装置100の処理フローの一例を示すフローチャートである。なお、図10の説明において記号「S」はステップを意味する。まず、S1001にて、画像取得部101は、長露光画像107及び短露光画像108のデータを取得する。次に、S1002にて、第1比率決定部102は、長露光画像107の画素ごとに第1合成比率(α)を決定する。次に、S1003にて、補正項決定部103は、ブロックごとに類似度(P)を算出する。具体的には、補正項決定部103は、まず、長露光画像107及び短露光画像108の画像領域を互いに対応する複数のブロックに分割する。次に、分割した複数のブロックにおける互いに対応する長露光画像107のブロックと、調整短露光画像のブロックとの類似度(P)をブロックごとに算出する。 The operation of the image processing apparatus 100 will be described with reference to FIG. 10. FIG. 10 is a flowchart illustrating an example of a processing flow of the image processing apparatus 100 according to the second embodiment. Note that in the explanation of FIG. 10, the symbol "S" means a step. First, in S1001, the image acquisition unit 101 acquires data of the long exposure image 107 and the short exposure image 108. Next, in S1002, the first ratio determination unit 102 determines a first combination ratio (α) for each pixel of the long exposure image 107. Next, in S1003, the correction term determining unit 103 calculates the degree of similarity (P) for each block. Specifically, the correction term determining unit 103 first divides the image areas of the long exposure image 107 and the short exposure image 108 into a plurality of mutually corresponding blocks. Next, the degree of similarity (P) between the blocks of the long exposure image 107 and the blocks of the adjusted short exposure image that correspond to each other in the plurality of divided blocks is calculated for each block.

次に、S1004にて、補正項決定部103は、ブロックごとに算出した類似度(P)に基づいて、第1仮補正項(β)及び第2仮補正項(γ)をブロックごとに取得する。次に、S1005にて、補正項決定部103は、画素ごとに第2仮補正項(γ)を変更して、補正項(β-γ´)を画素ごとに決定する。次に、S1006にて、第2比率決定部104は、画素ごとに第2合成比率(d)を決定する。次に、S1007にて、画像合成部105は、画素ごとに画素値Lと画素値Sとを合成してHDR画像を生成する。S1007の後、画像処理装置100は、図10に示すフローチャートの処理を終了する。 Next, in S1004, the correction term determining unit 103 obtains a first provisional correction term (β) and a second provisional correction term (γ) for each block based on the similarity (P) calculated for each block. do. Next, in S1005, the correction term determining unit 103 changes the second provisional correction term (γ) for each pixel and determines the correction term (β−γ') for each pixel. Next, in S1006, the second ratio determination unit 104 determines a second synthesis ratio (d) for each pixel. Next, in S1007, the image synthesis unit 105 synthesizes the pixel value L and the pixel value S for each pixel to generate an HDR image. After S1007, the image processing apparatus 100 ends the process of the flowchart shown in FIG.

以上のように構成した画像処理装置100によれば、異なる露光条件により撮像された複数の撮像画像を用いて取得したHDR画像において、照明器が消灯した状態で写ることを抑制しつつ、動体オブジェクトによる動きブレを抑制することができる。更に、以上のように構成した画像処理装置100によれば、実施形態1に係る画像処理装置100では、実際には動きブレ画素であるにも関わらずフリッカ画素であると特定されてしまう画素について、動きブレ画素であると特定することができる。結果として、以上のように構成した画像処理装置100によれば、実施形態1に係る画像処理装置100よりも、精度の高いHDR画像を取得することができる。 According to the image processing apparatus 100 configured as described above, in an HDR image acquired using a plurality of captured images captured under different exposure conditions, moving object It is possible to suppress motion blur due to Furthermore, according to the image processing apparatus 100 configured as described above, the image processing apparatus 100 according to the first embodiment has problems with regard to pixels that are identified as flicker pixels even though they are actually motion blur pixels. , can be identified as a motion blur pixel. As a result, the image processing apparatus 100 configured as described above can obtain a more accurate HDR image than the image processing apparatus 100 according to the first embodiment.

[その他の実施形態]
本開示は、上述の実施形態の1つ以上の機能を実現するプログラムをネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1つ以上の機能を実現するASIC等の回路によっても実現可能である。
[Other embodiments]
The present disclosure provides a system or device with a program that implements one or more functions of the embodiments described above via a network or a storage medium, and one or more processors in a computer of the system or device reads and executes the program. This can also be achieved by processing. It can also be realized by a circuit such as an ASIC that realizes one or more functions.

なお、本開示は、その開示の範囲内において、各実施形態の自由な組み合わせ、各実施形態の任意の構成要素の変形、又は、各実施形態において任意の構成要素の省略が可能である。 Note that within the scope of the present disclosure, the embodiments of the present disclosure can be freely combined, any constituent elements of the embodiments may be modified, or any constituent elements of the embodiments may be omitted.

[本開示の構成]
<構成1>
第1の撮像画像のデータと、前記第1の撮像画像より短い露光時間で撮像された第2の撮像画像のデータとを取得する画像取得手段と、
前記第2の撮像画像の空間周波数成分に基づいて、前記第1の撮像画像の画素値と前記第2の撮像画像の画素値とを合成する際に用いる合成比率を決定する比率決定手段と、
を有すること
を特徴とする画像処理装置。
[Configuration of this disclosure]
<Configuration 1>
image acquisition means for acquiring data of a first captured image and data of a second captured image captured with a shorter exposure time than the first captured image;
Ratio determining means for determining a synthesis ratio to be used when synthesizing pixel values of the first captured image and pixel values of the second captured image, based on a spatial frequency component of the second captured image;
An image processing device comprising:

<構成2>
前記比率決定手段は、前記第1の撮像画像の画素値に基づいて仮の合成比率を決定し、前記第2の撮像画像の空間周波数成分に基づいて前記仮の合成比率を補正する補正項を決定し、前記仮の合成比率と前記補正項とに基づいて前記合成比率を決定すること
を特徴とする構成1に記載の画像処理装置。
<Configuration 2>
The ratio determining means determines a temporary combination ratio based on pixel values of the first captured image, and includes a correction term for correcting the temporary combination ratio based on a spatial frequency component of the second captured image. The image processing device according to configuration 1, further comprising determining the combining ratio based on the temporary combining ratio and the correction term.

<構成3>
前記比率決定手段は、前記第1の撮像画像の画素値を合成する比率が高まるように前記仮の合成比率を補正する仮の補正項を、前記空間周波数成分に基づいて変更することにより、前記補正項を決定すること
を特徴とする構成2に記載の画像処理装置。
<Configuration 3>
The ratio determining means changes, based on the spatial frequency component, a provisional correction term for correcting the provisional combination ratio so that the ratio of combining pixel values of the first captured image increases. The image processing device according to configuration 2, further comprising determining a correction term.

<構成4>
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更する際に、前記第2の撮像画像における予め定められた範囲の前記空間周波数成分の画像の画素値を合成する比率が高まるように前記仮の補正項を変更すること
を特徴とする構成3に記載の画像処理装置。
<Configuration 4>
The ratio determining means determines a ratio for synthesizing pixel values of images of the spatial frequency component in a predetermined range in the second captured image when changing the temporary correction term based on the spatial frequency component. The image processing apparatus according to configuration 3, characterized in that the temporary correction term is changed so that .

<構成5>
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更する際に、前記空間周波数成分における高周波成分に基づいて前記仮の補正項を変更すること
を特徴とする構成3又は4に記載の画像処理装置。
<Configuration 5>
Configuration 3, characterized in that, when changing the temporary correction term based on the spatial frequency component, the ratio determining means changes the temporary correction term based on a high frequency component in the spatial frequency component. 4. The image processing device according to 4.

<構成6>
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更する際に、前記空間周波数成分における低周波成分に基づいて前記仮の補正項を変更すること
を特徴とする構成3乃至5のいずれか1つに記載の画像処理装置。
<Configuration 6>
Configuration 3 characterized in that, when changing the temporary correction term based on the spatial frequency component, the ratio determining means changes the temporary correction term based on a low frequency component in the spatial frequency component. 6. The image processing device according to any one of 5 to 5.

<構成7>
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更する際に、前記空間周波数成分における高周波成分と低周波成分とを除いた中周波成分に基づいて前記仮の補正項を変更すること
を特徴とする構成3乃至6のいずれか1つに記載の画像処理装置。
<Configuration 7>
When changing the temporary correction term based on the spatial frequency component, the ratio determining means changes the temporary correction term based on a medium frequency component excluding a high frequency component and a low frequency component in the spatial frequency component. The image processing device according to any one of configurations 3 to 6, characterized in that: .

<構成8>
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更するか否かを判定し、前記仮の補正項を変更すると判定した場合に、前記空間周波数成分に基づいて前記仮の補正項を変更すること
を特徴とする構成3乃至7のいずれか1つに記載の画像処理装置。
<Configuration 8>
The ratio determining means determines whether or not to change the temporary correction term based on the spatial frequency component, and when it is determined to change the temporary correction term, changes the temporary correction term based on the spatial frequency component. The image processing device according to any one of configurations 3 to 7, characterized in that the correction term is changed.

<構成9>
前記比率決定手段は、前記第2の撮像画像の画素値に基づいて前記仮の補正項を変更するか否かを判定し、前記仮の補正項を変更すると判定した場合に、前記空間周波数成分に基づいて前記仮の補正項を変更すること
を特徴とする構成3乃至8のいずれか1つに記載の画像処理装置。
<Configuration 9>
The ratio determining means determines whether or not to change the temporary correction term based on the pixel value of the second captured image, and when it is determined that the temporary correction term is to be changed, the ratio determination unit The image processing device according to any one of configurations 3 to 8, wherein the temporary correction term is changed based on.

<構成10>
前記比率決定手段は、前記第1の撮像画像の画素値と、前記第1の撮像画像及び前記第2の撮像画像の画像領域を分割した複数のブロックにおける、前記第1の撮像画像及び前記第2の撮像画像における互いに対応する前記ブロックの類似度とに基づいて、前記仮の補正項を前記ブロックごとに取得すること
を特徴とする構成3乃至9のいずれか1つに記載の画像処理装置。
<Configuration 10>
The ratio determining means is configured to determine the pixel value of the first captured image and the first captured image and the second captured image in a plurality of blocks obtained by dividing the image area of the first captured image and the second captured image. The image processing device according to any one of configurations 3 to 9, wherein the temporary correction term is acquired for each block based on the degree of similarity of the blocks corresponding to each other in the captured image of No. 2. .

<構成11>
前記比率決定手段は、前記第1の撮像画像の画素値と、前記第2の撮像画像の画素値を前記第1の撮像画像と前記第2の撮像画像との出力比に基づいて調整した値とを用いて、前記第1の撮像画像及び前記第2の撮像画像における互いに対応する前記ブロックの前記類似度を算出すること
を特徴とする構成10に記載の画像処理装置。
<Configuration 11>
The ratio determining means adjusts a pixel value of the first captured image and a pixel value of the second captured image based on an output ratio between the first captured image and the second captured image. The image processing device according to configuration 10, wherein the degree of similarity of the mutually corresponding blocks in the first captured image and the second captured image is calculated using the following.

<構成12>
前記比率決定手段は、前記ブロックの類似度に基づいて前記ブロックごとの前記仮の補正項を決定する際に、前記第1の撮像画像の合成比率が高まるように補正する前記仮の補正項である第1仮補正項と、前記第2の撮像画像の合成比率が高まるように補正する前記仮の補正項である第2仮補正項とを取得し、
前記ブロックの類似度がフリッカ検出の判定閾値であるフリッカ閾値以下である場合には、前記第1仮補正項が前記第2仮補正項と比較して優位に作用する前記第1仮補正項及び前記第2仮補正項を取得し、前記ブロックの前記類似度が前記フリッカ閾値より大きく、且つ、当該類似度が動きブレ検出の判定閾値である動きブレ閾値以下である場合には、前記第2仮補正項が前記第1仮補正項と比較して優位に作用する前記第1仮補正項及び前記第2仮補正項を取得し、
前記空間周波数成分に基づいて前記第2仮補正項を変更することにより、前記仮の補正項を変更すること
を特徴とする構成10又は11に記載の画像処理装置。
<Configuration 12>
The ratio determining means, when determining the provisional correction term for each block based on the similarity of the blocks, corrects the provisional correction term such that the combination ratio of the first captured image is increased. obtaining a certain first provisional correction term and a second provisional correction term that is the provisional correction term that is corrected so that the combination ratio of the second captured image is increased;
When the degree of similarity of the blocks is less than or equal to a flicker threshold that is a determination threshold for flicker detection, the first provisional correction term acts more favorably than the second provisional correction term; The second provisional correction term is obtained, and if the similarity of the block is greater than the flicker threshold and the similarity is less than or equal to a motion blur threshold that is a determination threshold for motion blur detection, the second obtaining the first provisional correction term and the second provisional correction term in which the provisional correction term acts more dominantly than the first provisional correction term;
The image processing device according to configuration 10 or 11, wherein the temporary correction term is changed by changing the second temporary correction term based on the spatial frequency component.

<構成13>
前記合成比率に基づいて、前記第1の撮像画像の画素値と前記第2の撮像画像の画素値とを合成する画像合成手段、
を有すること
を特徴とする構成1乃至12のいずれか1つに記載の画像処理装置。
<Configuration 13>
image synthesis means for synthesizing pixel values of the first captured image and pixel values of the second captured image based on the synthesis ratio;
The image processing device according to any one of configurations 1 to 12, characterized in that the image processing device has:

<構成14>
第1の撮像画像のデータと、前記第1の撮像画像より短い露光時間で撮像された第2の撮像画像のデータとを取得する画像取得工程と、
前記第2の撮像画像の空間周波数成分に基づいて、前記第1の撮像画像の画素値と前記第2の撮像画像の画素値とを合成する際に用いる合成比率を決定する比率決定工程と、
を有すること
を特徴とする画像処理方法。
<Configuration 14>
an image acquisition step of acquiring data of a first captured image and data of a second captured image captured with a shorter exposure time than the first captured image;
a ratio determining step of determining a synthesis ratio to be used when combining pixel values of the first captured image and pixel values of the second captured image, based on a spatial frequency component of the second captured image;
An image processing method characterized by having the following.

<構成15>
コンピュータを、構成1乃至13のいずれか1つに記載の画像処理装置として動作させるためのプログラム。
<Configuration 15>
A program for causing a computer to operate as the image processing device according to any one of Configurations 1 to 13.

100 画像処理装置
101 画像取得部
102 第1比率決定部
103 補正項決定部
104 第2比率決定部
100 Image processing device 101 Image acquisition unit 102 First ratio determination unit 103 Correction term determination unit 104 Second ratio determination unit

Claims (15)

第1の撮像画像のデータと、前記第1の撮像画像より短い露光時間で撮像された第2の撮像画像のデータとを取得する画像取得手段と、
前記第2の撮像画像の空間周波数成分に基づいて、前記第1の撮像画像の画素値と前記第2の撮像画像の画素値とを合成する際に用いる合成比率を決定する比率決定手段と、
を有すること
を特徴とする画像処理装置。
image acquisition means for acquiring data of a first captured image and data of a second captured image captured with a shorter exposure time than the first captured image;
Ratio determining means for determining a synthesis ratio to be used when synthesizing pixel values of the first captured image and pixel values of the second captured image, based on a spatial frequency component of the second captured image;
An image processing device comprising:
前記比率決定手段は、前記第1の撮像画像の画素値に基づいて仮の合成比率を決定し、前記第2の撮像画像の空間周波数成分に基づいて前記仮の合成比率を補正する補正項を決定し、前記仮の合成比率と前記補正項とに基づいて前記合成比率を決定すること
を特徴とする請求項1に記載の画像処理装置。
The ratio determining means determines a temporary combination ratio based on pixel values of the first captured image, and includes a correction term for correcting the temporary combination ratio based on a spatial frequency component of the second captured image. The image processing apparatus according to claim 1, further comprising determining the combining ratio based on the temporary combining ratio and the correction term.
前記比率決定手段は、前記第1の撮像画像の画素値を合成する比率が高まるように前記仮の合成比率を補正する仮の補正項を、前記空間周波数成分に基づいて変更することにより、前記補正項を決定すること
を特徴とする請求項2に記載の画像処理装置。
The ratio determining means changes, based on the spatial frequency component, a provisional correction term for correcting the provisional combination ratio so that the ratio of combining pixel values of the first captured image increases. The image processing device according to claim 2, further comprising determining a correction term.
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更する際に、前記第2の撮像画像における予め定められた範囲の前記空間周波数成分の画像の画素値を合成する比率が高まるように前記仮の補正項を変更すること
を特徴とする請求項3に記載の画像処理装置。
The ratio determining means determines a ratio for synthesizing pixel values of images of the spatial frequency component in a predetermined range in the second captured image when changing the temporary correction term based on the spatial frequency component. The image processing apparatus according to claim 3, characterized in that the temporary correction term is changed so that .
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更する際に、前記空間周波数成分における高周波成分に基づいて前記仮の補正項を変更すること
を特徴とする請求項3に記載の画像処理装置。
3. The ratio determining means, when changing the temporary correction term based on the spatial frequency component, changes the temporary correction term based on a high frequency component in the spatial frequency component. The image processing device described in .
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更する際に、前記空間周波数成分における低周波成分に基づいて前記仮の補正項を変更すること
を特徴とする請求項3に記載の画像処理装置。
Claim characterized in that, when changing the temporary correction term based on the spatial frequency component, the ratio determining means changes the temporary correction term based on a low frequency component in the spatial frequency component. 3. The image processing device according to 3.
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更する際に、前記空間周波数成分における高周波成分と低周波成分とを除いた中周波成分に基づいて前記仮の補正項を変更すること
を特徴とする請求項3に記載の画像処理装置。
When changing the temporary correction term based on the spatial frequency component, the ratio determining means changes the temporary correction term based on a medium frequency component excluding a high frequency component and a low frequency component in the spatial frequency component. The image processing apparatus according to claim 3, characterized in that the image processing apparatus changes: .
前記比率決定手段は、前記空間周波数成分に基づいて前記仮の補正項を変更するか否かを判定し、前記仮の補正項を変更すると判定した場合に、前記空間周波数成分に基づいて前記仮の補正項を変更すること
を特徴とする請求項3に記載の画像処理装置。
The ratio determining means determines whether or not to change the temporary correction term based on the spatial frequency component, and when it is determined to change the temporary correction term, changes the temporary correction term based on the spatial frequency component. The image processing device according to claim 3, characterized in that the correction term is changed.
前記比率決定手段は、前記第2の撮像画像の画素値に基づいて前記仮の補正項を変更するか否かを判定し、前記仮の補正項を変更すると判定した場合に、前記空間周波数成分に基づいて前記仮の補正項を変更すること
を特徴とする請求項3に記載の画像処理装置。
The ratio determining means determines whether or not to change the temporary correction term based on the pixel value of the second captured image, and when it is determined that the temporary correction term is to be changed, the ratio determination unit The image processing apparatus according to claim 3, wherein the temporary correction term is changed based on.
前記比率決定手段は、前記第1の撮像画像の画素値と、前記第1の撮像画像及び前記第2の撮像画像の画像領域を分割した複数のブロックにおける、前記第1の撮像画像及び前記第2の撮像画像における互いに対応する前記ブロックの類似度とに基づいて、前記仮の補正項を前記ブロックごとに取得すること
を特徴とする請求項3に記載の画像処理装置。
The ratio determining means is configured to determine the pixel value of the first captured image and the first captured image and the second captured image in a plurality of blocks obtained by dividing the image area of the first captured image and the second captured image. The image processing apparatus according to claim 3, wherein the temporary correction term is acquired for each block based on the degree of similarity between the blocks corresponding to each other in the second captured image.
前記比率決定手段は、前記第1の撮像画像の画素値と、前記第2の撮像画像の画素値を前記第1の撮像画像と前記第2の撮像画像との出力比に基づいて調整した値とを用いて、前記第1の撮像画像及び前記第2の撮像画像における互いに対応する前記ブロックの前記類似度を算出すること
を特徴とする請求項10に記載の画像処理装置。
The ratio determining means adjusts a pixel value of the first captured image and a pixel value of the second captured image based on an output ratio between the first captured image and the second captured image. The image processing apparatus according to claim 10, wherein the degree of similarity of the mutually corresponding blocks in the first captured image and the second captured image is calculated using the following.
前記比率決定手段は、前記ブロックの類似度に基づいて前記ブロックごとの前記仮の補正項を決定する際に、前記第1の撮像画像の合成比率が高まるように補正する前記仮の補正項である第1仮補正項と、前記第2の撮像画像の合成比率が高まるように補正する前記仮の補正項である第2仮補正項とを取得し、
前記ブロックの類似度がフリッカ検出の判定閾値であるフリッカ閾値以下である場合には、前記第1仮補正項が前記第2仮補正項と比較して優位に作用する前記第1仮補正項及び前記第2仮補正項を取得し、前記ブロックの前記類似度が前記フリッカ閾値より大きく、且つ、当該類似度が動きブレ検出の判定閾値である動きブレ閾値以下である場合には、前記第2仮補正項が前記第1仮補正項と比較して優位に作用する前記第1仮補正項及び前記第2仮補正項を取得し、
前記空間周波数成分に基づいて前記第2仮補正項を変更することにより、前記仮の補正項を変更すること
を特徴とする請求項10に記載の画像処理装置。
The ratio determining means, when determining the provisional correction term for each block based on the similarity of the blocks, corrects the provisional correction term such that the combination ratio of the first captured image is increased. obtaining a certain first provisional correction term and a second provisional correction term that is the provisional correction term that is corrected so that the combination ratio of the second captured image is increased;
When the degree of similarity of the blocks is less than or equal to a flicker threshold that is a determination threshold for flicker detection, the first provisional correction term acts more favorably than the second provisional correction term; The second provisional correction term is obtained, and if the similarity of the block is greater than the flicker threshold and the similarity is less than or equal to a motion blur threshold that is a determination threshold for motion blur detection, the second obtaining the first provisional correction term and the second provisional correction term in which the provisional correction term acts more dominantly than the first provisional correction term;
The image processing apparatus according to claim 10, wherein the temporary correction term is changed by changing the second temporary correction term based on the spatial frequency component.
前記合成比率に基づいて、前記第1の撮像画像の画素値と前記第2の撮像画像の画素値とを合成する画像合成手段、
を有すること
を特徴とする請求項1に記載の画像処理装置。
image synthesis means for synthesizing pixel values of the first captured image and pixel values of the second captured image based on the synthesis ratio;
The image processing device according to claim 1, characterized in that it has:
第1の撮像画像のデータと、前記第1の撮像画像より短い露光時間で撮像された第2の撮像画像のデータとを取得する画像取得工程と、
前記第2の撮像画像の空間周波数成分に基づいて、前記第1の撮像画像の画素値と前記第2の撮像画像の画素値とを合成する際に用いる合成比率を決定する比率決定工程と、
を有すること
を特徴とする画像処理方法。
an image acquisition step of acquiring data of a first captured image and data of a second captured image captured with a shorter exposure time than the first captured image;
a ratio determining step of determining a synthesis ratio to be used when combining pixel values of the first captured image and pixel values of the second captured image, based on a spatial frequency component of the second captured image;
An image processing method characterized by having the following.
コンピュータを、請求項1乃至13のいずれか1項に記載の画像処理装置として動作させるためのプログラム。 A program for causing a computer to operate as the image processing apparatus according to any one of claims 1 to 13.
JP2022073624A 2022-04-27 2022-04-27 Image processing device, image processing method, and program Pending JP2023162912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022073624A JP2023162912A (en) 2022-04-27 2022-04-27 Image processing device, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022073624A JP2023162912A (en) 2022-04-27 2022-04-27 Image processing device, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2023162912A true JP2023162912A (en) 2023-11-09

Family

ID=88651022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022073624A Pending JP2023162912A (en) 2022-04-27 2022-04-27 Image processing device, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2023162912A (en)

Similar Documents

Publication Publication Date Title
US8724921B2 (en) Method of capturing high dynamic range images with objects in the scene
US9462194B2 (en) Apparatus and method for calculating flicker-evaluation value
US7589771B2 (en) Image processing apparatus, image processing method, image pickup apparatus, computer program and recording medium
JP5102374B2 (en) Method and apparatus for moving blur and ghost prevention in an imaging system
KR101661215B1 (en) Image processing method and image processing apparatus
JP4985394B2 (en) Image processing apparatus and method, program, and recording medium
CN110766621B (en) Image processing method, image processing device, storage medium and electronic equipment
KR101663227B1 (en) Method and apparatus for processing image
JP5948073B2 (en) Image signal processing apparatus and image signal processing method
JP5887303B2 (en) Image signal processing apparatus, imaging apparatus, and image processing program
JP2011530880A (en) System and method for generating depth data using edge detection
JP2015156600A (en) Image signal processor, image signal processing method, and imaging apparatus
TWI536319B (en) De-noising method and image system
US20170094242A1 (en) Image processing apparatus, image processing method, and storage medium
KR101964228B1 (en) Image processing apparatus and image processing method
WO2020090176A1 (en) Image processing device and image processing method
JP6227935B2 (en) Image processing apparatus and image processing method
KR20190072027A (en) Method for improving low illumination image
JP2003234950A (en) Image processing device, image processing program, and image processing method
JP6543787B2 (en) Image processing apparatus and image processing method
JP2023162912A (en) Image processing device, image processing method, and program
WO2018023065A1 (en) Adaptive xdr via reset and mean signal values
JP6514504B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND PROGRAM
JP6376339B2 (en) Image processing apparatus and image processing method
JP6324235B2 (en) Image processing apparatus and image processing method