JP6284604B2 - Image processing apparatus, image processing method, and program - Google Patents

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

Info

Publication number
JP6284604B2
JP6284604B2 JP2016211773A JP2016211773A JP6284604B2 JP 6284604 B2 JP6284604 B2 JP 6284604B2 JP 2016211773 A JP2016211773 A JP 2016211773A JP 2016211773 A JP2016211773 A JP 2016211773A JP 6284604 B2 JP6284604 B2 JP 6284604B2
Authority
JP
Japan
Prior art keywords
image data
pixel data
difference
data
dark
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016211773A
Other languages
Japanese (ja)
Other versions
JP2017034718A (en
Inventor
宏明 岩崎
宏明 岩崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Corp filed Critical Olympus Corp
Priority to JP2016211773A priority Critical patent/JP6284604B2/en
Publication of JP2017034718A publication Critical patent/JP2017034718A/en
Application granted granted Critical
Publication of JP6284604B2 publication Critical patent/JP6284604B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、デジタルスチルカメラ等の画像処理装置において、特に、比較明合成によりバルブ撮影画像を生成することが可能で、かつ露光時間が任意に調整可能な画像処理装置、画像処理方法、およびプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program capable of generating a bulb-captured image by comparatively bright synthesis and having an arbitrarily adjustable exposure time in an image processing apparatus such as a digital still camera. About.

従来、一眼レフレックス式の撮像装置においては、被写体像の観察は光学ファインダにより行っていた。しかし、最近では光学ファインダをなくし、イメージセンサから読み出した画像を、背面液晶モニタ等によって表示するライブビュー表示によって、被写体像を観察する撮像装置が市販されている。また、光学ファインダの代わりに、ライブビュー表示による画像を、背面液晶モニタ等とは別に、電子ビューファインダを用いて表示し、上述の背面液晶モニタによる表示と電子ビューファインダによる表示を切替可能とした撮像装置も市販されている。   Conventionally, in a single-lens reflex imaging apparatus, observation of a subject image has been performed using an optical viewfinder. However, recently, an imaging device that observes a subject image by a live view display in which an optical viewfinder is eliminated and an image read from an image sensor is displayed on a rear liquid crystal monitor or the like is commercially available. Also, instead of the optical viewfinder, the live view display image is displayed using the electronic viewfinder separately from the rear LCD monitor, etc., and the display using the rear LCD monitor and the electronic viewfinder can be switched. Imaging devices are also commercially available.

従来、光学ファインダであっても電子ビューファインダであっても、バルブ撮影のような長時間撮影時には、露出中にイメージセンサから画像データを読み出すことができないために、被写体の状態や露出状態を確認することができず、撮影が終了してから画像を確認していた。このため、撮影者にとって、絞りやISO感度等の露出設定や露出開始と終了のタイミング決定は、被写体の明るさなどから撮影者自身が推定して決めなければならず、露出不足または露出過多による撮影失敗することなく、所望の撮影画像を得ることは容易ではなかった。   Conventionally, regardless of whether it is an optical viewfinder or an electronic viewfinder, the image data cannot be read from the image sensor during exposure for long periods such as bulb photography. I couldn't do it, and I checked the image after shooting. For this reason, for the photographer, the exposure setting such as the aperture and ISO sensitivity and the timing for starting and ending the exposure must be determined by the photographer himself / herself based on the brightness of the subject, which is due to underexposure or excessive exposure. It was not easy to obtain a desired shot image without shooting failure.

そこで、このような不具合を解決するために、特許文献1に開示の撮像装置は、所定の時間間隔でイメージセンサから画像データを読み出し、この画像データをイメージセンサから読み出す毎に単純に画像データの累積加算を行い、これによって得られた画像を液晶モニタ等に表示し、露出経過を表示できるようにしている。   Therefore, in order to solve such a problem, the imaging apparatus disclosed in Patent Document 1 reads image data from the image sensor at predetermined time intervals, and simply reads the image data each time the image data is read from the image sensor. Cumulative addition is performed, and an image obtained thereby is displayed on a liquid crystal monitor or the like, so that the progress of exposure can be displayed.

また、特許文献2に開示の撮像装置は、連続的にイメージセンサから画像データを読み出し、比較明合成により、バルブ撮影画像データを生成している。この比較明合成は、画像データの画素毎の輝度レベルを比較し、大きい方を選択し、合成後の輝度レベルとする画像合成である。   Further, the imaging device disclosed in Patent Document 2 continuously reads out image data from an image sensor and generates bulb photographed image data by comparatively bright combination. This comparatively bright combination is an image combination in which the luminance level of each pixel of the image data is compared, the larger one is selected, and the combined luminance level is obtained.

特開2005−117395号公報JP 2005-117395 A 特許第4148586号公報Japanese Patent No. 4148586

特許文献1に開示の撮像装置では、バルブ撮影中に、現在の露光情報を撮影者に経過情報として告知することができ、露出不足や露出過多等の失敗を軽減することが可能である。しかし、バルブ撮影の対象として、一般的である夜空に打ち上げられた花火の光跡や、星の光跡を撮影する場合、露光時間が長い程、光跡の長さが延びていくと共に背景(これらの場合には夜空)の明るさが変化する場合がある。このような場合には、背景の明るさが露光過多または露光不足にならないような露光時間で撮影を終了する必要があり、光跡の長さが、撮影者の意図とは無関係に背景の明るさによって決まってしまう。   In the imaging apparatus disclosed in Patent Document 1, the current exposure information can be notified to the photographer as progress information during bulb photography, and failures such as underexposure and overexposure can be reduced. However, as a subject of bulb photography, when photographing light trails of fireworks launched in the night sky, which are common, and star light trails, the longer the exposure time, the longer the light trail length and the background ( In these cases, the brightness of the night sky) may change. In such a case, it is necessary to finish the shooting with an exposure time that does not cause the background brightness to be overexposed or underexposed, and the length of the light trail is not related to the photographer's intention. It will be decided by that.

これに対して、特許文献2に開示の撮像装置では、連続的に撮像素子から読み出した画像データを、画像データの画素毎の輝度レベルを比較し、明るい方の画素を選択し、合成後の輝度レベルとする比較明合成により撮像画像データを生成している。このため、露光時間に無関係に背景の明るさは合成前の一枚の画像の明るさに維持され、撮影者の作意意図に合うように露光時間を設定して、光跡を写し込むことができる。   On the other hand, in the imaging device disclosed in Patent Literature 2, image data continuously read from the imaging device is compared with the luminance level for each pixel of the image data, and the brighter pixel is selected. Captured image data is generated by comparatively bright combination with a luminance level. For this reason, the brightness of the background is maintained at the brightness of the single image before composition regardless of the exposure time, and the exposure time is set to match the intention of the photographer to capture the light trace. Can do.

しかし、特許文献1、2に開示の撮像装置はいずれも、撮影者が背景の明るさと光跡の長さ・明るさのそれぞれを意図通りに撮影するには、被写体の明るさに合わせて、絞り、ISO感度、および合成前の一枚の画像を撮影する露光時間を調整する必要がある。この調整は、長年の撮影経験や試写による明るさ確認等が必要であり、高度な撮影技術を要する。   However, in any of the imaging devices disclosed in Patent Documents 1 and 2, in order for the photographer to capture the brightness of the background and the length and brightness of the light trail as intended, according to the brightness of the subject, It is necessary to adjust the aperture, ISO sensitivity, and exposure time for capturing a single image before synthesis. This adjustment requires years of shooting experience and brightness confirmation by preview, and requires advanced shooting techniques.

また、星や花火などは暗い環境下で撮影を行うため、撮影後、昼間や部屋など明るい環境下で画像を確認すると、撮影画像は撮影時とは異なった明るさに見えるため、撮影意図にそぐわない明るさで撮影してしまうことが多々ある。   Also, since stars and fireworks are shot in a dark environment, if you check the image in a bright environment such as daytime or a room after shooting, the shot image will appear to have a different brightness from the time of shooting. I often shoot with inadequate brightness.

本発明は、このような事情を鑑みてなされたものであり、難易度の高いバルブ撮影の露出失敗を防止し、撮影者の意図に沿った写真の撮影を可能とする画像処理装置、画像処理方法、およびプログラムを提供することを目的とする。   The present invention has been made in view of such circumstances, an image processing apparatus and an image processing device that prevent exposure failure of bulb photography, which is difficult, and enable photography of a photograph according to the photographer's intention. It is an object to provide a method and a program.

上記目的を達成するため第1の発明に係る画像処理装置は、順次入力される複数の画像データを記憶する記憶部と、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか大きい方の画素データを新たな画素データとして、比較明合成画像データを構成する比較明合成処理を行う比較明合成処理部と、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか小さい方の画素データを新たな画素データとして、比較暗合成画像データを構成する比較暗合成処理を行う比較暗合成処理部と、上記比較明合成画像データと上記比較暗合成画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データの差を演算して新たな差分画像データを生成する差分画像合成部と、上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する画像合成部と、を備える。 In order to achieve the above object, an image processing apparatus according to a first aspect of the present invention includes a storage unit that stores a plurality of image data that are sequentially input, and each of the two frames of image data that are read from the storage unit. A comparatively bright combination processing unit that compares the pixel data corresponding to each of a plurality of pixels and uses the larger pixel data as new pixel data to perform comparatively bright combination processing that forms comparatively bright combined image data, and the storage Comparing the corresponding pixel data of each of the plurality of pixels constituting the two-frame image data read from the image unit, and constructing comparative dark composite image data using the smaller pixel data as new pixel data A comparative dark composition processing unit for performing comparative dark composition processing, and each of the plurality of pixels constituting the comparative bright composite image data and the comparative dark composite image data A difference image synthesizing unit for generating a new shelf difference image data by calculating the difference in pixel data response, and a dark image data multiplied by multiplying the arbitrary gain value to the relatively dark composite image data, to the difference image data An image synthesis unit that synthesizes multiplication difference image data multiplied by an arbitrary gain value and generates a synthesized image .

第2の発明に係る画像処理装置は、上記第の発明において、上記比較明合成処理部は、上記記憶部から読み出された画像データを基に最初に生成された第1画像データを累積比較明合成画像データとして上記記憶部に記憶し、上記記憶部から読み出された画像データを基に生成された第2画像データを構成する複数の画素データと上記累積比較明合成画像データを構成する複数の画素データのそれぞれ対応する画素データとを比較し、いずれか大きい方の画素データを新たな画素データとして、上記累積比較明合成画像データを構成する比較明合成処理を行い、上記比較暗合成処理部、上記記憶部から読み出された画像データを基に最初に生成された第1画像データを累積比較暗合成画像データとして上記記憶部に記憶し、上記記憶部から読み出された画像データを基に生成された第2画像データを構成する複数の画素データと上記累積比較暗合成画像データを構成する複数の画素データのそれぞれ対応する画素データとを比較し、いずれか小さい方の画素データを新たな画素データとして、上記累積比較暗合成画像データを構成する比較暗合成処理を行い、上記差分画像合成部は、上記累積比較明合成画像データと上記累積比較暗合成画像データのそれぞれ対応する画素データの差を演算して新たな差分画像データを生成し、上記画像合成部は、上記累積比較暗合成画像データに任意のゲイン値を乗算した累積乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する。 In the image processing apparatus according to a second aspect based on the first aspect , the comparatively bright combination processing unit accumulates first image data generated first based on the image data read from the storage unit. A plurality of pixel data constituting the second image data generated based on the image data read out from the storage unit and stored as the comparatively bright composite image data and the cumulative comparative bright composite image data The pixel data corresponding to each of the plurality of pixel data is compared, and the larger pixel data is used as new pixel data, and the comparatively bright composite processing for forming the cumulative comparative bright composite image data is performed. synthesis processing unit stores in the storage unit the first image data that has been initially generated based on image data read out from the storage unit as a cumulative relatively dark composite image data, or the storage unit A plurality of pixel data composing the second image data generated based on the read image data is compared with corresponding pixel data of the plurality of pixel data composing the cumulative comparative dark composite image data. The smaller pixel data is used as new pixel data, and a comparative dark composition process is performed to form the cumulative comparative dark composite image data. The difference image composition unit is configured to perform the cumulative comparative light composite image data and the cumulative comparative dark composition. The difference between the pixel data corresponding to each of the image data is calculated to generate new difference image data, and the image composition unit includes cumulative multiplication dark image data obtained by multiplying the cumulative comparison dark composite image data by an arbitrary gain value, Then, the difference image data obtained by multiplying the difference image data by an arbitrary gain value is synthesized to generate a synthesized image.

の発明に係る画像処理装置は、順次入力される複数の画像データを記憶する記憶部と、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データとの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか大きい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、上記2コマの画像データを構成するそれぞれの複数の画素データの平均値を新たな画素データとして比較明合成処理を行い、比較明合成画像データを生成する比較明合成処理部と、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか小さい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、画像合成処理を行い、比較暗合成画像データを生成する比較暗合成処理部と、上記比較明合成画像データと比較暗合成画像データを構成する複数の画素のそれぞれに対応する画素データの差を演算して新たな差分画像データを生成する差分画像合成部と、上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する画像合成部と、を備える。
の発明に係る画像処理装置は、上記第の発明において、上記比較明合成処理部は、上記記憶部から読み出された画像データを基に最初に生成された第1画像データを累積比較明合成画像データとして上記記憶部に記憶し、上記記憶部から読み出された画像データを基に生成された第2画像データを構成する複数の画素データと上記累積比較明合成画像データを構成する複数の画素データのそれぞれ対応する画素データの差を所定値と比較し、上記差が上記所定値以上のときは、上記2コマの画像データをそれぞれ構成する複数の画素データのそれぞれ対応する画素データを比較していずれか大きい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、上記累積比較明合成画像データを生成する比較明合成処理を行い、上記比較暗合成処理部は、上記記憶部から読み出された画像データを基に最初に生成された第1画像データを累積比較暗合成画像データとして上記記憶部に記憶し、上記記憶部から読み出された画像データを基に生成された第2画像データを構成する複数の画素データと上記累積比較暗合成画像データを構成する複数の画素データのそれぞれ対応する画素データとの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか小さい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、上記累積比較暗合成画像データを生成する比較暗合成処理を行い、上記差分画像合成部は、上記累積比較明合成画像データと上記累積比較暗合成画像データのそれぞれ対応する画素データの差を演算して新たな差分画像データを生成し、上記画像合成部は、上記累積比較暗合成画像データに任意のゲイン値を乗算した累積乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する。
According to a third aspect of the present invention, there is provided an image processing apparatus for storing a plurality of sequentially input image data and a plurality of pixels constituting the two frames of image data read from the storage unit. The difference with the corresponding pixel data is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, the pixel data corresponding to each of the plurality of pixels constituting the image data of the two frames is compared. The larger pixel data is set as new pixel data. On the other hand, when the difference is smaller than the predetermined value, the average value of the plurality of pixel data constituting the image data of the two frames is set as new pixel data. The comparatively bright composite processing unit that performs comparatively bright composite processing and generates comparatively bright composite image data, and each of the plurality of pixels constituting the two frames of image data read from the storage unit The difference between the pixel data corresponding to each is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, the pixel data corresponding to each of the plurality of pixels constituting the image data of the two frames is calculated. If the difference is smaller than the predetermined value, the smaller one of the pixel data is set as new pixel data. On the other hand, when the difference is smaller than the predetermined value, the average value of the plurality of pixel data respectively constituting the two frames of image data As the data, a comparative dark composition processing unit that performs image composition processing and generates comparative dark composite image data, and pixel data corresponding to each of a plurality of pixels constituting the comparative bright composite image data and the comparative dark composite image data a difference image combining unit that calculates the difference to generate a new difference image data, and the dark image data multiplied by multiplying the arbitrary gain value to the relatively dark composite image data, the difference image de It synthesizes the multiplication difference image data obtained by multiplying the arbitrary gain value data, comprising an image combining unit for generating a composite image.
The image processing apparatus according to the fourth invention, the cumulative in the third aspect of the invention, the lighten compositing processing unit, the first image data that has been initially generated based on image data read out from the storage unit A plurality of pixel data constituting the second image data generated based on the image data read out from the storage unit and stored as the comparatively bright composite image data and the cumulative comparative bright composite image data The difference between the pixel data corresponding to each of the plurality of pixel data is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, the pixel corresponding to each of the plurality of pixel data constituting each of the two frames of image data When the data is compared and the larger pixel data is set as new pixel data, and the difference is smaller than the predetermined value, a plurality of images constituting each of the two frames of image data are obtained. A comparatively bright combination process for generating the cumulative comparatively bright combined image data is performed using the average value of the data as new pixel data, and the comparative dark combining process unit is first configured based on the image data read from the storage unit A plurality of pixel data constituting the second image data generated based on the image data read out from the storage unit. And the difference between the pixel data corresponding to each of the plurality of pixel data constituting the cumulative comparison dark composite image data is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, the image data of the two frames is formed. When the pixel data corresponding to each of the plurality of pixels is compared and the smaller pixel data is set as new pixel data, and the difference is smaller than the predetermined value, Using the average value of a plurality of pieces of pixel data constituting each of the two frames of image data as new pixel data, a comparative dark composition process for generating the cumulative comparative dark composite image data is performed, and the difference image composition unit is configured to perform the cumulative comparison. A difference between pixel data corresponding to each of the bright composite image data and the cumulative comparative dark composite image data is calculated to generate new difference image data, and the image composition unit adds an arbitrary gain to the cumulative comparative dark composite image data. The cumulative multiplied dark image data multiplied by the value and the multiplied difference image data obtained by multiplying the difference image data by an arbitrary gain value are combined to generate a combined image.

の発明に係る画像処理方法は、順次入力される複数の画像データを記憶する記憶部を有する画像処理装置における画像処理方法において、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか大きい方の画素データを新たな画素データとして、比較明合成画像データを構成する比較明合成処理を行い、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか小さい方の画素データを新たな画素データとして、比較暗合成画像データを構成する比較暗合成処理を行い、上記比較明合成画像データと上記比較暗合成画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データの差を演算して新たな差分画像データを生成し、上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する。
の発明に係る画像処理方法は、順次入力される複数の画像データを記憶する記憶部を有する画像処理装置における画像処理方法において、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データとの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか大きい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、上記2コマの画像データを構成するそれぞれの複数の画素データの平均値を新たな画素データとして比較明合成処理を行い、比較明合成画像データを生成し、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか小さい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、画像合成処理を行い、比較暗合成画像データを生成し、上記比較明合成画像データと比較暗合成画像データを構成する複数の画素のそれぞれに対応する画素データの差を演算して新たな差分画像データを生成し、上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する。
An image processing method according to a fifth aspect of the present invention is an image processing method in an image processing apparatus having a storage unit for storing a plurality of sequentially input image data, wherein the two frames of image data read from the storage unit are configured. The corresponding pixel data of each of the plurality of pixels is compared, and the larger pixel data is used as new pixel data to perform comparatively bright combination processing that forms the comparatively bright combined image data. Comparing the corresponding pixel data of each of the plurality of pixels constituting the two-frame image data thus output, and using the smaller pixel data as new pixel data, the comparative dark composite image data constituting the comparative dark composite image data Pixels corresponding to each of the plurality of pixels constituting the comparatively bright composite image data and the comparative dark composite image data by performing the synthesis process By calculating the difference over data to generate a new shelf difference image data, and the dark image data multiplied by multiplying the arbitrary gain value to the relatively dark composite image data, multiplied by the arbitrary gain value to the difference image data The multiplication difference image data is synthesized to generate a synthesized image .
An image processing method according to a sixth aspect of the present invention is an image processing method in an image processing apparatus having a storage unit for storing a plurality of sequentially input image data, wherein two frames of image data read from the storage unit are configured. The difference between the pixel data corresponding to each of the plurality of pixels to be compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, each of the plurality of pixels constituting the two-frame image data If the difference is smaller than the predetermined value, the plurality of pixels constituting the image data of the two frames are compared. Performs comparatively bright composite processing using the average value of the data as new pixel data, generates comparatively bright composite image data, and constructs two frames of image data read from the storage unit The difference between the pixel data corresponding to each of the plurality of pixels is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, the difference between each of the plurality of pixels constituting the image data of the two frames is determined. Comparing the corresponding pixel data, the smaller pixel data is set as new pixel data. On the other hand, when the difference is smaller than the predetermined value, the average of the plurality of pixel data respectively constituting the two frames of image data Using the value as new pixel data, image synthesis processing is performed to generate comparative dark composite image data, and the difference between pixel data corresponding to each of the plurality of pixels constituting the comparative bright composite image data and the comparative dark composite image data the calculates and generates a new difference image data, and the dark image data multiplied by multiplying the arbitrary gain value to the relatively dark composite image data, optionally in the difference image data Synthesizes the multiplication difference image data obtained by multiplying the in-value, to generate a composite image.

の発明に係るプログラムは、順次入力される複数の画像データを記憶する記憶部を有する画像処理装置のコンピュータを実行するためのプログラムにおいて、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか大きい方の画素データを新たな画素データとして、比較明合成画像データを構成する比較明合成処理を行い、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか小さい方の画素データを新たな画素データとして、比較暗合成画像データを構成する比較暗合成処理を行い、上記比較明合成画像データと上記比較暗合成画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データの差を演算して新たな差分画像データを生成し、上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する。
の発明に係るプログラムは、順次入力される複数の画像データを記憶する記憶部を有する画像処理装置のコンピュータを実行するためのプログラムにおいて、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データとの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか大きい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、上記2コマの画像データを構成するそれぞれの複数の画素データの平均値を新たな画素データとして比較明合成処理を行い、比較明合成画像データを生成し、上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか小さい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、画像合成処理を行い、比較暗合成画像データを生成し、上記比較明合成画像データと比較暗合成画像データを構成する複数の画素のそれぞれに対応する画素データの差を演算して新たな差分画像データを生成し、上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する。


According to a seventh aspect of the invention, there is provided a program for executing a computer of an image processing apparatus having a storage unit for storing a plurality of sequentially input image data, wherein the two frames of image data read from the storage unit The corresponding pixel data of each of the plurality of pixels constituting the image data are compared, and the larger pixel data is used as new pixel data, and the comparatively bright synthesized image data constituting the relatively bright synthesized image data is performed. The pixel data corresponding to each of the plurality of pixels constituting the two-frame image data read from the image data are compared, and the smaller pixel data is used as new pixel data to form comparative dark composite image data. A comparative dark composition process is performed, and each of the plurality of pixels constituting the comparative bright composite image data and the comparative dark composite image data is processed. Each generates by calculating the difference between the corresponding pixel data new shelf differential image data, and the dark image data multiplied by multiplying the arbitrary gain value to the relatively dark composite image data, any gain in the difference image data The multiplication difference image data multiplied by the value is synthesized to generate a synthesized image .
According to an eighth aspect of the invention, there is provided a program for executing a computer of an image processing apparatus having a storage unit for storing a plurality of sequentially input image data, wherein two frames of image data read from the storage unit The difference between the pixel data corresponding to each of the plurality of pixels constituting the image is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, the plurality of pixels constituting the image data of the two frames If the difference is smaller than the predetermined value, the plurality of pixels constituting the image data of the two frames are compared. The comparatively bright composite processing is performed by using the average value of the pixel data as new pixel data to generate comparatively bright composite image data, and the two frames read from the storage unit The difference between the pixel data corresponding to each of the plurality of pixels constituting the image data is compared with a predetermined value. When the difference is equal to or greater than the predetermined value, the plurality of the plurality of pixels constituting the image data of the two frames are compared. Pixel data corresponding to each of the pixels is compared and the smaller pixel data is set as new pixel data. On the other hand, when the difference is smaller than the predetermined value, a plurality of pieces of image data of two frames are formed. Using the average value of the pixel data as new pixel data, image synthesis processing is performed, comparative dark composite image data is generated, and each of the plurality of pixels constituting the comparative bright composite image data and the comparative dark composite image data is handled. by calculating the difference between the pixel data to generate new difference image data, and the dark image data multiplied by multiplying the arbitrary gain value to the relatively dark composite image data, the difference It synthesizes the multiplication difference image data obtained by multiplying the arbitrary gain value to the image data to generate a composite image.


本発明によれば、難易度の高いバルブ撮影の露出失敗を防止し、撮影者の意図に沿った写真の撮影を可能とする画像処理装置、画像処理方法、およびプログラムを提供することができる。   According to the present invention, it is possible to provide an image processing apparatus, an image processing method, and a program that prevent exposure of bulb photography with a high degree of difficulty and that can take a photograph according to the photographer's intention.

本発明の第1実施形態に係るカメラの主として電気的構成を示すブロック図である。It is a block diagram which shows mainly an electrical structure of the camera which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係るカメラにおいて、バルブモードで比較明合成モードが選択されている場合の動作を示すフローチャートである。5 is a flowchart showing an operation when a comparatively bright combination mode is selected in a valve mode in the camera according to the first embodiment of the present invention. 本発明の第1実施形態に係るカメラにおいて、バルブモードで比較明合成モードが選択されている場合の動作を示すフローチャートである。5 is a flowchart showing an operation when a comparatively bright combination mode is selected in a valve mode in the camera according to the first embodiment of the present invention. 本発明の第1実施形態に係るカメラにおいて、露出調整の際の操作画面を示す図である。It is a figure which shows the operation screen at the time of exposure adjustment in the camera which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係るカメラにおいて、比較明・暗合成を示す図である。It is a figure which shows comparative bright and dark composition in the camera which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係るカメラにおいて、露出調整を説明する図である。It is a figure explaining exposure adjustment in the camera concerning a 1st embodiment of the present invention. 本発明の第2実施形態に係るカメラにおいて、バルブモードが選択されている場合の動作を示すフローチャートである。It is a flowchart which shows operation | movement when the valve mode is selected in the camera which concerns on 2nd Embodiment of this invention.

以下、図面に従って本発明を適用したカメラを用いて好ましい実施形態について説明する。本発明の好ましい実施形態に係るカメラは、デジタルカメラであり、概略、撮像素子から読み出される画像データに基づく画像データを表示部にライブビュー表示すると共にレリーズ釦の操作に応じて記録用に画像処理した画像データを外部メモリに記録する。また、バルブ撮影モードとして比較明合成モードを設定すると、バルブ撮影中に、画像データの画素毎に明るい方の画素を用いた比較明合成による比較明合成画像データを生成し、この画像データを用いてバルブ撮影中に露光状態の経過表示を行うことができる。   Hereinafter, a preferred embodiment will be described using a camera to which the present invention is applied according to the drawings. A camera according to a preferred embodiment of the present invention is a digital camera, and roughly displays image data based on image data read from an image sensor on a display unit and performs image processing for recording according to an operation of a release button. The recorded image data is recorded in the external memory. Also, when the comparatively bright combination mode is set as the bulb shooting mode, the comparatively bright combined image data is generated by the comparatively bright combination using the brighter pixel for each pixel of the image data during the bulb shooting, and this image data is used. Thus, the progress of the exposure state can be displayed during bulb photography.

さらに、このカメラは、画像データの画素毎に暗い方の画素を用いた比較暗合成による比較暗合成画像データを生成し、前述の比較明合成画像データと比較暗合成画像データから差分出力画像データを生成している。生成した比較暗合成画像データを背景出力画像データとし、また差分出力画像データを光跡出力画像データとして、それぞれ明るさを調整し、調整後の各画像データを合成することにより、基準となる比較明合成画像データに対して、背景の明るさ、光跡の明るさを、それぞれ独立に調整可能である。   Further, the camera generates comparative dark composite image data by comparative dark combining using a darker pixel for each pixel of the image data, and outputs difference output image data from the comparative bright composite image data and the comparative dark composite image data. Is generated. The generated comparative dark composite image data is used as background output image data, and the difference output image data is used as light trace output image data. For the bright composite image data, the brightness of the background and the brightness of the light trail can be adjusted independently.

図1は、本発明の好ましい実施形態としての第1実施形態に係るカメラの主として電気的構成を示すブロック図である。本実施形態におけるカメラは、撮像部1、画像処理部10、システム制御部20、およびバス31とこれに接続された各部を有する。   FIG. 1 is a block diagram mainly showing an electrical configuration of a camera according to the first embodiment as a preferred embodiment of the present invention. The camera in the present embodiment includes an imaging unit 1, an image processing unit 10, a system control unit 20, and a bus 31 and each unit connected thereto.

レンズ2は、イメージセンサ4に被写体の光学像を結像する。このレンズ2内には、露出量を調節するための絞り値を決定する絞りを備える。また、メカシャッタ3は、開閉動作によりイメージセンサ4への露出や遮光を行い、シャッタ速度を制御する。イメージセンサ4は、CMOSイメージセンサやCCDイメージセンサ等の撮像素子を含み、レンズ2により結像された被写体の光学像を画素毎に電気信号に変換し、画像データを、画像処理部10およびバス31に出力する。バス31は、各ブロック間で信号の送受信を行うための信号線である。   The lens 2 forms an optical image of the subject on the image sensor 4. This lens 2 is provided with an aperture for determining an aperture value for adjusting the exposure amount. The mechanical shutter 3 controls the shutter speed by performing exposure and shading to the image sensor 4 by opening and closing operations. The image sensor 4 includes an image sensor such as a CMOS image sensor or a CCD image sensor, converts an optical image of a subject formed by the lens 2 into an electrical signal for each pixel, and converts the image data into the image processing unit 10 and the bus. To 31. The bus 31 is a signal line for transmitting and receiving signals between the blocks.

画像処理部10は、イメージセンサ4から出力された画像データに画像処理を施し、画像比較合成部11、画像平均合成部12、差分画像合成部13、画像加算合成部14、画像合成部15、および現像処理部16を有する。   The image processing unit 10 performs image processing on the image data output from the image sensor 4, and performs an image comparison / synthesis unit 11, an image average synthesis unit 12, a difference image synthesis unit 13, an image addition synthesis unit 14, an image synthesis unit 15, And a development processing unit 16.

画像比較合成部11は、イメージセンサ4から連続的に読み出された画像データと、内部メモリ33に保存された画像データの画素毎の出力を比較し、画素毎に比較明処理及び比較暗合成処理を行い、これらの処理によって生成された比較明合成画像データおよび比較暗合成画像データを用いて合成画像データを生成する。   The image comparison / synthesis unit 11 compares the image data continuously read from the image sensor 4 with the output of each pixel of the image data stored in the internal memory 33, and performs comparative bright processing and comparative dark synthesis for each pixel. Processing is performed, and composite image data is generated using the comparatively bright composite image data and the comparative dark composite image data generated by these processes.

すなわち、画像比較合成部11における比較明処理では、最初にイメージセンサ4から読み出された画像データを基に生成された画像データを構成する画素データを比較明合成画像データとして内部メモリ33に記憶する。次に、イメージセンサ4から読み出された画像データを基に生成された画像データを構成する画素データと、内部メモリ33に記憶されている累積比較明合成画像データを構成する複数の画素データについて、それぞれ対応する画素データを比較する。そして、それぞれ対応する画素データを比較した結果、その差が所定値以上の場合には、いずれか大きい方、すなわち明るい方の画素データを検出し、この明るい方の画素データを用いて、累積比較明合成画像データを再構成する。一方、画像比較合成部11は、それぞれ対応する画素データを比較した結果、その差が所定値よりも小さい場合には、対応する画素データを画像平均合成部12により算出された平均値に置き換える。この処理をイメージセンサ4から画像データが読み出されるたびに繰り返し行う。比較明処理を行うことにより、夜空の星の光跡の画像を得ることができる(後述する図5(b)参照)。   That is, in the comparatively bright process in the image comparison / synthesis unit 11, the pixel data constituting the image data generated based on the image data first read from the image sensor 4 is stored in the internal memory 33 as the comparatively bright composite image data. To do. Next, the pixel data constituting the image data generated based on the image data read from the image sensor 4 and the plurality of pixel data constituting the cumulative comparative bright composite image data stored in the internal memory 33 Compare the corresponding pixel data. When the difference between the corresponding pixel data is equal to or greater than a predetermined value, the larger pixel data, that is, the brighter pixel data is detected, and this brighter pixel data is used for cumulative comparison. Reconstruct bright composite image data. On the other hand, the image comparison / synthesis unit 11 replaces the corresponding pixel data with the average value calculated by the image average synthesis unit 12 when the difference is smaller than a predetermined value as a result of comparing the corresponding pixel data. This process is repeated every time image data is read from the image sensor 4. By performing the comparative light processing, an image of a light trail of a star in the night sky can be obtained (see FIG. 5B described later).

また、画像比較合成部11における比較暗処理では、最初にイメージセンサ4から読み出された画像データを基に生成された画像データを構成する画素データを比較暗合成画像データとして内部メモリ33に記憶する。次にイメージセンサ4から読み出された画像データを基に生成された画像データを構成する画素データと、内部メモリ33に記憶されている累積比較暗合成画像データを構成する複数の画素データについて、それぞれ対応する画素データを比較する。そして、それぞれ対応する画素データを比較した結果、その差が所定値以上の場合には、いずれか小さい方、すなわち暗い方の画素データを検出し、この暗い方の画素データを用いて、累積比較暗合成画像データを再構成する。一方、画像比較合成部11は、それぞれ対応する画素データを比較した結果、その差が所定値よりも小さい場合には、対応する画素データを画像平均合成部12により算出された平均値に置き換える。この処理をイメージセンサ4から画像データが読み出されるたびに繰り返し行う。比較暗処理を行うことにより、夜空の星の光跡を消去し、背景の画像を得ることができる(後述する図5(c)参照)。   Further, in the comparative dark process in the image comparison / synthesis unit 11, the pixel data constituting the image data generated based on the image data first read from the image sensor 4 is stored in the internal memory 33 as the comparative dark composite image data. To do. Next, the pixel data constituting the image data generated based on the image data read from the image sensor 4 and the plurality of pixel data constituting the cumulative comparative dark composite image data stored in the internal memory 33 are as follows. Each corresponding pixel data is compared. If the difference between the corresponding pixel data is greater than or equal to a predetermined value, the smaller one, that is, the darker pixel data is detected, and the darker pixel data is used to perform cumulative comparison. Reconstruct dark composite image data. On the other hand, the image comparison / synthesis unit 11 replaces the corresponding pixel data with the average value calculated by the image average synthesis unit 12 when the difference is smaller than a predetermined value as a result of comparing the corresponding pixel data. This process is repeated every time image data is read from the image sensor 4. By performing comparative dark processing, it is possible to erase the light trails of the stars in the night sky and obtain a background image (see FIG. 5C described later).

画像平均合成部12は、累積比較明合成画像データまたは累積比較暗合成画像データを構成する複数の画素データについて、それぞれ対応する画素データを比較した結果、その差が所定値よりも小さい場合に、対応する画素データの平均値を算出する。   The image average composition unit 12 compares the corresponding pixel data with respect to a plurality of pixel data constituting the cumulative comparative bright composite image data or the cumulative comparative dark composite image data, and when the difference is smaller than a predetermined value, The average value of the corresponding pixel data is calculated.

差分画像合成部13は、比較明合成画像データと比較暗合成画像データの画素毎の差分出力を算出し、差分画像データを生成する。すなわち、差分画像データは、比較明合成画像データから比較暗合成画像データを画素データ毎に差分を算出して得た画像データであり、背景画像データが消失し、光跡のみの画像データである(後述する図5(d)参照)。   The difference image composition unit 13 calculates a difference output for each pixel of the comparatively bright composite image data and the comparative dark composite image data, and generates difference image data. That is, the difference image data is image data obtained by calculating a difference for each pixel data from the comparative dark composite image data from the comparative bright composite image data, and the background image data is lost and the image data is only the light trace. (See FIG. 5D described later).

画像加算合成部14は、画素毎の出力を加算し、加算合成データを生成する。すなわち、所定周期でイメージセンサ4から画像データが読み出される毎に、画像加算合成部14は、画像データを加算し、加算合成データを生成する。この加算合成データに基づいて表示を行うことにより、バルブ撮影時の撮影経過表示を行うことができる。なお、後述するフローチャート(図2,3参照)においては、この加算合成データに基づく撮影経過表示を省略している。   The image addition / synthesis unit 14 adds the outputs for each pixel to generate addition synthesis data. That is, every time image data is read from the image sensor 4 at a predetermined cycle, the image addition / synthesis unit 14 adds the image data to generate addition / synthesis data. By displaying on the basis of the added synthesized data, it is possible to display the shooting progress during bulb shooting. In addition, in the flowchart (refer FIG.2, 3) mentioned later, the imaging | photography progress display based on this addition synthetic data is abbreviate | omitted.

画像合成部15は、比較暗合成画像データと差分画像データのそれぞれにゲインを乗算し、加算処理を行う。画像比較合成部11によって生成された比較暗合成画像データは移動する明るい部分は消失し、背景のみからなる画像データであり(図5(c)参照)、また差分画像データ移動する明るい部分、すなわち光跡からなる画像データである(図5(d)参照)。これらの画像データにそれぞれゲインを乗算して加算処理を行うことにより、光跡部分と背景部分の明るさをそれぞれ独立して調整することができる。この調整については、図4ないし図6、および図3のS43〜S55を用いて後述する。   The image composition unit 15 multiplies the comparative dark composite image data and the difference image data by a gain, and performs an addition process. The comparative dark composite image data generated by the image comparison / combination unit 11 is a bright portion where only the background moves (see FIG. 5C). This is image data consisting of light traces (see FIG. 5D). By multiplying each of these image data by a gain and performing addition processing, the brightness of the light trail portion and the background portion can be adjusted independently. This adjustment will be described later with reference to FIGS. 4 to 6 and S43 to S55 of FIG.

現像処理部16は、画像合成部15において生成されたRAW画像データに対して、デモザイキング、ホワイトバランス調整、ガンマ補正、画像圧縮などの現像処理を行う。   The development processing unit 16 performs development processing such as demosaicing, white balance adjustment, gamma correction, and image compression on the RAW image data generated by the image composition unit 15.

内部メモリ33は、カメラ動作に必要な各種設定情報や、画像処理時に途中経過の画像データを一時的に記憶する。内部メモリ33は、フラッシュメモリ、DRAM等の不揮発性のメモリによって構成される。   The internal memory 33 temporarily stores various setting information necessary for camera operation and image data in the middle of image processing. The internal memory 33 is configured by a nonvolatile memory such as a flash memory or a DRAM.

外部メモリ36は、カメラ本体に装填自在、または内部に固定された不揮発性の記憶媒体であり、例えば、SDカードやCFカード等である。この外部メモリ36は、現像処理部16で現像処理された画像データを記録し、また再生時には、記録された画像データが読み出され、カメラの外部に出力可能である。   The external memory 36 is a non-volatile storage medium that can be loaded into the camera body or fixed inside, and is, for example, an SD card or a CF card. The external memory 36 records the image data developed by the development processing unit 16, and at the time of reproduction, the recorded image data can be read out and output to the outside of the camera.

表示部37は、TFT(Thin Film Transistor)液晶や有機ELなどの背面表示部やEVF(電子ビューファインダ)によって構成され、現像処理部16によって現像された画像を表示する。   The display unit 37 includes a rear display unit such as a TFT (Thin Film Transistor) liquid crystal or an organic EL, or an EVF (Electronic Viewfinder), and displays an image developed by the development processing unit 16.

入力IF38は、レリーズ釦等の操作部材や、背面表示部等におけるタッチ操作を入力するためのタッチパネル等を有し、ユーザ操作に基づいて各種のモード設定やレリーズ等撮影動作の指示を行う。   The input IF 38 includes an operation member such as a release button, a touch panel for inputting a touch operation on the rear display unit, and the like, and instructs various shooting operations such as mode setting and release based on a user operation.

露出判定部34は、イメージセンサ4から読み出される画像データまたは各合成部で生成された画像データの出力から適正露出か否かを判定する。比較部35は、比較合成する複数の画像データの画素毎の出力差を比較する。また画素毎の出力差と所定値(スレッシュレベル)を比較することも可能である。   The exposure determination unit 34 determines whether the exposure is proper from the output of the image data read from the image sensor 4 or the image data generated by each combining unit. The comparison unit 35 compares output differences for each pixel of a plurality of image data to be compared and synthesized. It is also possible to compare the output difference for each pixel with a predetermined value (threshold level).

システム制御部20は、CPU(Central Processing Unit)を有し、内部メモリ33内に記憶されたプログラムに従ってカメラの全体制御を行う。また、システム制御部20は、露光時間算出部21および露光時間制御部22を有する。露光時間算出部21は露出判定部34における露出判定結果から最適な露光時間(シャッタ速度)を算出する。露光時間制御部22は露出時間算出部21における算出結果に応じてメカシャッタ3の開閉タイミング処理を制御する。露光時間算出部21および露光時間制御部22は、ソフトウエアによって処理してもよく、またハードウエアによって処理してもよい。   The system control unit 20 includes a CPU (Central Processing Unit), and performs overall control of the camera according to a program stored in the internal memory 33. The system control unit 20 includes an exposure time calculation unit 21 and an exposure time control unit 22. The exposure time calculation unit 21 calculates an optimal exposure time (shutter speed) from the exposure determination result in the exposure determination unit 34. The exposure time control unit 22 controls the opening / closing timing processing of the mechanical shutter 3 according to the calculation result in the exposure time calculation unit 21. The exposure time calculation unit 21 and the exposure time control unit 22 may be processed by software or may be processed by hardware.

次に、図1に示したカメラの動作の概要を述べる。システム制御部20による制御に基づいて、レンズ2を構成するフォーカスレンズの調整が行われ、絞りが所定値に設定され、メカシャッタ3が開いて、イメージセンサ4により光学像が電気信号に変換される。イメージセンサ4から読み出された画像データは、画像処理部10において所定の画像処理が施され、外部メモリ36に記録される。また画像処理部10で所定の画像処理が施された画像データはリサイズされたのち表示部37において表示される。   Next, an outline of the operation of the camera shown in FIG. 1 will be described. Based on the control by the system control unit 20, the focus lens constituting the lens 2 is adjusted, the diaphragm is set to a predetermined value, the mechanical shutter 3 is opened, and the optical image is converted into an electrical signal by the image sensor 4. . Image data read from the image sensor 4 is subjected to predetermined image processing in the image processing unit 10 and recorded in the external memory 36. The image data that has undergone predetermined image processing by the image processing unit 10 is resized and then displayed on the display unit 37.

システム制御部20は、入力IF38を介してユーザからの指示を受け、イメージセンサ4の露出開始、信号読出等のタイミング制御、メカシャッタ3の開閉タイミング制御、レンズ2の絞り制御やオートフォーカス制御を行う。また、システム制御部20は、画像処理部10から画像データを受け取り、表示部37による画像表示や、外部メモリ36に画像データの保存等の制御を行う。   The system control unit 20 receives an instruction from the user via the input IF 38, and performs timing control such as exposure start of the image sensor 4, signal readout, etc., opening / closing timing control of the mechanical shutter 3, lens aperture control and autofocus control. . In addition, the system control unit 20 receives image data from the image processing unit 10 and performs control such as image display by the display unit 37 and storage of image data in the external memory 36.

次に、図2および図3に示すフローチャートを用いて、本実施形態に係るカメラの処理の流れを説明する。このフローチャートは、内部メモリ33に記憶されたプログラムに従って、システム制御部20が各部を制御することにより実行する。   Next, the processing flow of the camera according to the present embodiment will be described using the flowcharts shown in FIGS. This flowchart is executed by the system control unit 20 controlling each unit in accordance with a program stored in the internal memory 33.

このフローチャートでは、ユーザが入力IFによりバルブ撮影モードを選択し、かつバルブ撮影モード中の比較明合成モードを選択している場合のシーケンスを図示している。バルブ撮影モードであっても、露光中の経過表示を行わない通常のバルブ撮影や、露光中の経過表示を加算画像で行う加算合成表示モードについては、省略してある。なお、経過表示モードの一種である加算合成表示モードが選択されると、バルブ撮影中に所定の周期でイメージセンサ4から画像データを読み出し、この読み出された画像データを順次加算することにより、露光時間の経過に応じて徐々に画面が明るくなっていくことを表示部37に表示することができる。また、経過表示モードの一種である比較明合成モードは、露光時間によらず背景の明るさは一定で、露光時間に応じて光跡の長さを調整可能である。   In this flowchart, a sequence in the case where the user selects the bulb photographing mode by the input IF and selects the comparatively bright combination mode in the bulb photographing mode is illustrated. Even in the bulb photographing mode, the normal bulb photographing in which the progress display during exposure is not performed, and the addition composite display mode in which the progress display during exposure is performed with an added image are omitted. In addition, when the addition composite display mode which is a kind of the progress display mode is selected, the image data is read from the image sensor 4 at a predetermined cycle during bulb photographing, and the read image data is sequentially added. It can be displayed on the display unit 37 that the screen gradually becomes brighter as the exposure time elapses. In the comparative bright combination mode, which is a kind of progress display mode, the brightness of the background is constant regardless of the exposure time, and the length of the light trace can be adjusted according to the exposure time.

ユーザは、バルブ撮影を行うにあたって予め表示部37や光学ファインダ(不図示)を確認して撮影したい被写体を撮影できるように、カメラの向きやレンズの焦点距離(ズーム)を調節しておく。また必要に応じて、釦やタッチパネル等の入力IF38を介して、フォーカスレンズの位置、絞り値、ISO感度等の撮影情報を設定してもよい。   The user adjusts the direction of the camera and the focal length (zoom) of the lens so that the subject to be photographed can be photographed by checking the display unit 37 and the optical viewfinder (not shown) in advance when performing bulb photographing. If necessary, photographing information such as a focus lens position, an aperture value, and ISO sensitivity may be set via an input IF 38 such as a button or a touch panel.

図2に示すフローに入ると、システム制御部20は、レリーズスイッチの最初の押圧動作に応じて1stレリーズスイッチがオンとなったか否かを判定する(S1)。この判定の結果、オンでなければ、待機状態となる。   In the flow shown in FIG. 2, the system control unit 20 determines whether or not the 1st release switch is turned on in response to the first pressing operation of the release switch (S1). If the result of this determination is not on, a standby state is entered.

ステップS1における判定の結果、1stレリーズスイッチがオンであれば、次に、AFおよびAEを行う(S3)。ここでは、システム手制御部20は、AF(オートフォーカス)を行い、被写体にピントを合わせる。AFにあたっては、システム制御部20は、イメージセンサ4から繰り返し読み出される画像データのコントラスト値が最大値になるように、レンズ2内のフォーカスレンズを駆動する。また、AE(自動露出制御)を行い、適正露光となる露出時間や絞り等を算出する。   If the result of determination in step S1 is that the 1st release switch is on, AF and AE are next carried out (S3). Here, the system hand control unit 20 performs AF (autofocus) to focus on the subject. In AF, the system control unit 20 drives the focus lens in the lens 2 so that the contrast value of the image data repeatedly read from the image sensor 4 becomes the maximum value. In addition, AE (automatic exposure control) is performed to calculate an exposure time, an aperture, and the like for proper exposure.

AFとAEを行うと、次に、2ndレリーズスイッチがオンであるか否かを判定する(S5)。ここでは、システム制御部20は、最初の押圧動作よりも相対的に強い押圧動作がなされ、2ndレリーズスイッチがオンになったかを判定する。この判定の結果、2ndレリーズスイッチがオンでなければ、ステップS3に戻り、AF・AE動作を繰り返す。   Once AF and AE have been carried out, it is next determined whether or not the 2nd release switch is on (S5). Here, the system control unit 20 determines whether a relatively stronger pressing operation than the first pressing operation is performed and the 2nd release switch is turned on. If the result of this determination is that the 2nd release switch is not on, processing returns to step S3 and AF / AE operations are repeated.

ステップS5における判定の結果、2ndレリーズスイッチがオンであれば、比較明合成モードによる比較明合成を行う。まず、画像読み出し周期Tを反映させる(S7)。この周期Tは、イメージセンサ4から画像データを読み出す周期であり、ユーザが手動で設定した値でもよく、またステップS3におけるAEにおいて算出した適正露光時間に応じた値でもよい。   If the result of determination in step S5 is that the 2nd release switch is on, comparatively bright combination in the comparatively bright combination mode is performed. First, the image reading cycle T is reflected (S7). This period T is a period for reading image data from the image sensor 4 and may be a value set manually by the user or a value corresponding to the appropriate exposure time calculated in AE in step S3.

画像読み出し周期Tを反映させると、次に、露出を開始する(S9)。ここでは、システム制御部20は、イメージセンサ4に対して、露出を開始させる。露出を開始させると、次に、露出時間Tが経過したか否かを判定する(S11)。ここでは、ステップS9における露出開始後、時間Tが経過したかを判定する。時間Tが経過するまで待機状態となる。   If the image reading cycle T is reflected, then exposure is started (S9). Here, the system control unit 20 causes the image sensor 4 to start exposure. Once exposure is started, it is next determined whether or not the exposure time T has elapsed (S11). Here, it is determined whether time T has elapsed after the start of exposure in step S9. It will be in a standby state until time T passes.

ステップS11における判定の結果、露出時間Tが経過すると、次に、画像データを読み出すと共に、次のコマの露出を開始する(S13)。続いて、ステップS13において読み出された画像データを内部メモリ33に保存する(S15)と同時に、次回の撮影のための露出を開始する。   If the exposure time T elapses as a result of the determination in step S11, next, image data is read and exposure of the next frame is started (S13). Subsequently, the image data read in step S13 is stored in the internal memory 33 (S15), and at the same time, exposure for the next photographing is started.

内部メモリ33に画像データを保存すると、次に、比較明・暗合成処理を行う(S17)。但し、比較明合成モードで最初にイメージセンサ4から画像データを読み出した場合には、比較明・暗合成処理はスキップし、2コマ目以降において比較明・暗合成処理を行う。この2コマ目以降の比較明・暗合成処理は、後述するステップS25における判定の結果がNoであった場合に、時間Tが経過後に、ステップS13において読み出した画像データと内部メモリ33に記憶されている画像データ(累積比較明合成画像データおよび累積比較暗合成データ)に対して行う。   After the image data is stored in the internal memory 33, comparative bright / dark combination processing is performed (S17). However, when image data is first read from the image sensor 4 in the comparative bright combination mode, the comparative bright / dark combination processing is skipped and the comparative bright / dark combination processing is performed in the second and subsequent frames. The comparative light / dark combination processing for the second and subsequent frames is stored in the internal memory 33 and the image data read in step S13 after the time T has elapsed when the result of determination in step S25 described later is No. Image data (cumulative comparative bright composite image data and cumulative comparative dark composite data).

2コマ目の比較明・暗合成処理は、以下のようにして行う。内部メモリ33には、1コマ目と2コマ目の画像データが一時記憶されている。システム制御部20は、内部メモリ33に一時記憶された1コマ目と2コマ目の読み出し画像データを、比較部35に転送し、2枚の画像の同じアドレスの画素出力同士を比較し、大きい方の画素データを合成後の画像の画素データとして選択し、比較明合成画像データ(累積比較明合成画像データ)とする。また、2枚の画像の同じアドレスの画素出力同士を比較し、小さい方の画素データを合成後の画像の画素データとして選択し、比較暗合成画像データ(累積比較暗合成画像データ)とする。   The comparative light / dark combination process in the second frame is performed as follows. The internal memory 33 temporarily stores image data for the first frame and the second frame. The system control unit 20 transfers the read image data of the first frame and the second frame temporarily stored in the internal memory 33 to the comparison unit 35 and compares the pixel outputs of the same address of the two images with each other. The other pixel data is selected as the pixel data of the combined image, and set as comparatively bright composite image data (cumulative comparative bright composite image data). Also, the pixel outputs at the same address of the two images are compared with each other, and the smaller pixel data is selected as the pixel data of the combined image, and is set as comparative dark composite image data (cumulative comparative dark composite image data).

ステップS17において生成された比較明合成画像データと比較暗合成画像データは、内部メモリ33に保存する(S19)。   The comparatively bright composite image data and comparative dark composite image data generated in step S17 are stored in the internal memory 33 (S19).

内部メモリに保存すると、次に、現像処理を行う(S21)。ここでは、システム制御部20は、内部メモリ33に一時記憶された画像データに対して、現像処理部16によって、デモザイキング処理、γ補正処理、ノイズリダクション処理、YC信号生成処理、リサイズ処理等の現像処理を行わせる。なお、リサイズ処理は、読み出された画像データの画素数は、液晶表示や電子ビューファインダの表示画素よりも大きいため、表示素子の表示画素数に合わせるためである。   Once stored in the internal memory, next, development processing is performed (S21). Here, the system control unit 20 performs, for example, demosaicing processing, γ correction processing, noise reduction processing, YC signal generation processing, and resizing processing on the image data temporarily stored in the internal memory 33 by the development processing unit 16. Let the development process. The resizing process is performed in order to match the number of display pixels of the display element because the number of pixels of the read image data is larger than the display pixels of the liquid crystal display or the electronic viewfinder.

現像処理を行うと、次に、現像画像の表示を行う(S23)。ここでは、システム制御部20は、現像処理部16によって現像処理された比較明合成画像を、露光経過画像として、表示部37に表示させる。ユーザは、バルブ撮影時の経過画像として確認することができる。   Once the development process is performed, a developed image is displayed (S23). Here, the system control unit 20 causes the display unit 37 to display the comparatively bright composite image developed by the development processing unit 16 as an exposure progress image. The user can check the progress image at the time of bulb photography.

現像画像の表示を行うと、次に、2ndレリーズスイッチのオフを検知したか否かを判定する(S25)。本実施形態においては、ユーザがレリーズ釦を強く押し込んでから離すまで、すなわち2ndレリーズスイッチがオンになるとバルブ撮影を開始し、2ndレリーズスイッチがオフになるとバルブ撮影が終了する。なお、最初、2ndレリーズスイッチがオンした後、オフしてもバルブ撮影を続行し、再度、2ndレリーズスイッチがオンした際に、バルブ撮影を終了するようにしても勿論かまわない。   Once the developed image is displayed, it is next determined whether or not the 2nd release switch is detected to be off (S25). In the present embodiment, bulb photographing is started until the user presses and releases the release button, that is, when the 2nd release switch is turned on, and the bulb photography is terminated when the 2nd release switch is turned off. It should be noted that, after the 2nd release switch is first turned on, the bulb photography may be continued even if it is turned off, and the bulb photography may be terminated when the 2nd release switch is turned on again.

ステップS25における判定の結果、2ndレリーズスイッチがオフでなかった場合には、ステップS11に戻る。3コマ目以降の画像データも露出時間T経過後にイメージセンサから読み出され(S13)、内部メモリ33に保存される(S15)。比較部35で、イメージセンサ4から読み出された画像データと、内部メモリ33に保存されたそれまでの累積比較明合成画像データ(3コマ目の合成画像データであれば、1,2コマ目の比較明合成画像データ)を比較明合成処理し(S17)、累積比較明合成画像データとして内部メモリ33に保存する(S19)。この保存された累積比較明合成画像データは現像処理が施され(S21)、露光経過画像として表示部37に表示される(S23)。また、同様に、イメージセンサ4から読み出された画像データと累積比較暗合成画像データ(3コマ目の合成画像データであれば、1,2コマ目の比較暗合成画像データ)を比較暗合成処理し(S17)、累積比較暗合成画像データとして内部メモリ33に保存される(S19)。   If the result of determination in step S25 is that the 2nd release switch is not OFF, processing returns to step S11. The image data for the third and subsequent frames are also read from the image sensor after the exposure time T has elapsed (S13) and stored in the internal memory 33 (S15). The comparison unit 35 reads the image data read from the image sensor 4 and the accumulated comparatively bright composite image data stored in the internal memory 33 (if the third frame is composite image data, the first and second frames). Comparatively bright composite image data) is subjected to comparatively bright composite processing (S17), and is stored in the internal memory 33 as cumulative comparative bright composite image data (S19). The stored cumulative comparative bright composite image data is subjected to development processing (S21), and is displayed on the display unit 37 as an exposure progress image (S23). Similarly, the image data read from the image sensor 4 and the cumulative comparative dark composite image data (if the third frame composite image data, the comparative dark composite image data of the first and second frames) are comparatively dark combined. Processed (S17) and stored in the internal memory 33 as accumulated comparative dark composite image data (S19).

このように、バルブ撮影中は、時間Tが経過するたびに、イメージセンサ4から画像データが読み出され、比較明合成処理と比較暗合成処理が行われ、比較明合成処理された画像が表示部37に露光経過画像として表示される。   As described above, during bulb photographing, every time T elapses, image data is read from the image sensor 4, the comparatively bright combining process and the comparative dark combining process are performed, and the comparatively bright combined process image is displayed. It is displayed on the part 37 as an exposure progress image.

ステップS25における判定の結果、2ndレリーズスイッチのオフを検知すると、バルブ撮影の終了処理を行う。   As a result of the determination in step S25, when it is detected that the 2nd release switch is turned off, bulb photographing end processing is performed.

次に、ステップS43以下において、露出調整処理を行う。この露出調整処理では、最終撮影画像の背景と光跡の部分の明るさを、それぞれ独立して調整することができる。まず、背景・光跡の明るさを調整するか否かの判定を行う(S43)。このステップでは、調整要否画面(例えば、図4(a)に示すような露出調整要否画面)が表示部37に表示されることから、ユーザはこの露出調整要否画面を見て、背景と光跡の明るさが意図通りかを確認する。意図通りである場合には、入力IF38によって、露出調整「しない」を選択する(S43→No)。この場合には、累積比較明合成画像データ及びその現像処理画像データを外部メモリに保存し、撮影を完了する。   Next, in step S43 and subsequent steps, exposure adjustment processing is performed. In this exposure adjustment process, the brightness of the background and the light trace portion of the final photographed image can be adjusted independently. First, it is determined whether or not to adjust the brightness of the background / light trail (S43). In this step, since an adjustment necessity screen (for example, an exposure adjustment necessity screen as shown in FIG. 4A) is displayed on the display unit 37, the user looks at the exposure adjustment necessity screen to determine the background. Confirm that the brightness of the light trail is as intended. If it is as intended, the exposure adjustment “NO” is selected by the input IF 38 (S43 → No). In this case, the accumulated comparatively bright composite image data and its development processed image data are stored in the external memory, and the photographing is completed.

一方、ステップS43における判定の結果、露出調整「する」を選択した場合には(S43→Yes)、表示部に背景・光跡の明るさ調整画面(例えば、図4(b)に示すような露出調整操作画面)が表示部37に表示される。   On the other hand, as a result of the determination in step S43, when the exposure adjustment “Yes” is selected (S43 → Yes), the background / light trace brightness adjustment screen (for example, as shown in FIG. 4B) is displayed on the display unit. An exposure adjustment operation screen) is displayed on the display unit 37.

この状態で、露出調整ゲイン設定操作がなされると、その設定操作量を取得する(S45)。図4(b)に示す例では、背景と光跡のそれぞれについて、調整インジケータを表示する。ユーザがインジケータを右にスライド操作することによって輝度を明るく、または左にスライド操作することによって輝度を暗くすることを指示すると、システム制御部20は、入力IF38中のタッチパネルを介して、ユーザの指示を入力する。   When an exposure adjustment gain setting operation is performed in this state, the set operation amount is acquired (S45). In the example shown in FIG. 4B, an adjustment indicator is displayed for each of the background and the light trace. When the user instructs to increase the luminance by sliding the indicator to the right or to decrease the luminance by sliding the indicator to the left, the system control unit 20 instructs the user via the touch panel in the input IF 38. Enter.

システム制御部20は、ユーザの操作によって入力された背景、光跡の明るさ調整量を、表示されている画像に対して、何倍の明るさに変更するかを調整ゲインに変更する。背景の調整ゲインをα、光跡の調整ゲインをβとすると、例えば、背景を+1段、光跡を−1段の明るさ調整したい旨の入力があった場合は、α=2、β=0.5と変換する。   The system control unit 20 changes the brightness adjustment amount of the background and light trace input by the user's operation to how much the brightness is changed with respect to the displayed image to an adjustment gain. Assuming that the background adjustment gain is α and the light trace adjustment gain is β, for example, when there is an input for adjusting the brightness of the background by +1 stage and the light trace by −1 stage, α = 2, β = Convert to 0.5.

次に、露出調整ゲイン設定操作を行うと、次に差分出力画像データの生成を行う(S47)。ここでは、システム制御部20は、差分画像合成部13に比較明合成画像データと比較暗合成画像データを入力させ、下記(1)式によって差分出力画像データを生成し、内部メモリ33に保存する。
差分出力画像データ=比較明合成画像データ−比較暗合成画像データ ・・・(1)
Next, when an exposure adjustment gain setting operation is performed, next, difference output image data is generated (S47). Here, the system control unit 20 inputs the comparatively bright composite image data and the comparative dark composite image data to the differential image composition unit 13, generates differential output image data by the following equation (1), and stores it in the internal memory 33. .
Difference output image data = Comparative light composite image data−Comparative dark composite image data (1)

ここで、図5のように、露光時間Tで読み出された合成前のそれぞれの画像データは、背景の明るさが変わるところがなければ、比較暗合成画像データ(図5(c))は光跡を除いた背景の明るさを反映した画像データに相当する。一方、差分出力画像データ(図5(d))は、比較明合成画像データ(図5(b))から背景(比較暗合成画像データ)(図5(c))を減算した画像データであるので、光跡のみを写し込んだ画像データとなる。   Here, as shown in FIG. 5, the image data before synthesis read out at the exposure time T is comparatively dark composite image data (FIG. 5C) unless the background brightness changes. This corresponds to image data reflecting the brightness of the background excluding the trace. On the other hand, the difference output image data (FIG. 5D) is image data obtained by subtracting the background (comparative dark composite image data) (FIG. 5C) from the comparatively bright composite image data (FIG. 5B). Therefore, it becomes image data in which only the light trace is captured.

ステップS47において、差分出力画像データを生成すると、次に合成画像データの生成を行う(S49)。ここでは、システム制御部20は、内部メモリ33に保存した比較暗合成画像データと差分出力画像データを画像合成部15に出力させ、以下に示す式(2)に従って合成画像データを生成する。すなわち、比較暗合成画像データに調整ゲインαを乗算した画像データと、差分出力画像データに調整ゲインβを乗算した画像データの2つの画像データの加算合成を行い、合成画像データを生成する。この生成された合成画像データを内部メモリ33に保存する。
合成画像データ=(比較暗合成画像データ×α)+(差分出力画像データ×β) ・・・(2)
ここで、A+Bは、画像データAと画像データBの加算合成画像データを示す。
If difference output image data is generated in step S47, next, composite image data is generated (S49). Here, the system control unit 20 causes the image composition unit 15 to output the comparative dark composite image data and the difference output image data stored in the internal memory 33, and generates composite image data according to the following equation (2). That is, two image data of the image data obtained by multiplying the comparative dark composite image data by the adjustment gain α and the image data obtained by multiplying the difference output image data by the adjustment gain β are added and combined to generate composite image data. The generated composite image data is stored in the internal memory 33.
Composite image data = (Comparative dark composite image data × α) + (Differential output image data × β) (2)
Here, A + B indicates the combined composite image data of the image data A and the image data B.

上述の合成により、背景の明るさ調整画像データ(比較暗合成画像データ×α)と光跡の明るさ調整画像データ(差分出力画像データ×β)を合成した画像データが生成され、ユーザの操作に応じて明るさが調整された画像データが生成される。   Through the above-described synthesis, image data is generated by synthesizing the background brightness adjusted image data (comparative dark synthesized image data × α) and the light trace brightness adjusted image data (difference output image data × β), and the user's operation Image data whose brightness is adjusted in accordance with is generated.

ステップS49において、合成画像データが生成されると、次に、現像処理を行い(S51)、表示部37に画像表示を行う(S53)。画像表示を行うと、次に、明るさがOKか否かを判定する(S55)。ここでは、図4に示したように、再度、調整画面が表示されるので、ユーザは明るさ調整された画像を確認し、再調整が必要であれば、露出調整「する」をタッチ操作する。合成画像の明るさが不十分または過度であれば、ステップS45に戻り、明るさ調整値の入力後、再度、背景・光跡の明るさ調整を行う。   When the composite image data is generated in step S49, next, development processing is performed (S51), and an image is displayed on the display unit 37 (S53). Once image display has been carried out, it is next determined whether or not the brightness is OK (S55). Here, as shown in FIG. 4, since the adjustment screen is displayed again, the user confirms the image whose brightness has been adjusted, and touches the exposure adjustment “Yes” if readjustment is necessary. . If the brightness of the composite image is insufficient or excessive, the process returns to step S45, and after the brightness adjustment value is input, the brightness of the background / light trace is adjusted again.

図6に、背景・光跡調整の例を示す。図6(a)は、光跡の明るさ調整の例であり、ここでは、軌跡の本数を調整する。画像P2は基準画像であり、画像P1はマイナス補正を施し、画像P3はプラス補正を施している。図6(a)から分かるように、背景の明るさは変化させないで、光跡のみを調整することができる。   FIG. 6 shows an example of background / light trace adjustment. FIG. 6A shows an example of light trace brightness adjustment. Here, the number of trajectories is adjusted. The image P2 is a reference image, the image P1 is subjected to minus correction, and the image P3 is subjected to plus correction. As can be seen from FIG. 6A, only the light trace can be adjusted without changing the brightness of the background.

また、図6(b)は、背景の明るさ調整の例である。画像P5は基準画像であり(P2と同じ画像)、画像P4はマイナス補正を施し、画像P6はプラス補正を施している。図6(b)から分かるように、光跡の明るさは変化させないで、背景の明るさのみを調整することができる。   FIG. 6B is an example of background brightness adjustment. The image P5 is a reference image (the same image as P2), the image P4 is subjected to minus correction, and the image P6 is subjected to plus correction. As can be seen from FIG. 6B, only the brightness of the background can be adjusted without changing the brightness of the light trace.

一方、ステップS55において、ユーザが意図通りの明るさに調整されたと判断した場合には、入力IF38を介して、露出調整「しない」をタッチ操作する。この場合には、ステップS55における判定の結果が、明るさOKとなり、合成画像及びその現像処理画像を外部メモリ36に保存し(S57)、撮影を完了する。   On the other hand, if it is determined in step S55 that the user has adjusted the brightness as intended, the user performs a touch operation on exposure adjustment “NO” via the input IF 38. In this case, the result of determination in step S55 is brightness OK, the composite image and its developed image are saved in the external memory 36 (S57), and the shooting is completed.

このように、本発明の第1実施形態においては、図6に示したように、撮影後に比較明合成画像を確認しながら、ユーザは作意意図に合わせて、背景と光跡について、それぞれ明るさを調整することができる。このため、難易度の高いバルブ撮影の露出失敗による撮影失敗を防止すると共に、撮影者の意図に沿った写真撮影が可能となる。   As described above, in the first embodiment of the present invention, as shown in FIG. 6, while confirming the comparatively bright composite image after shooting, the user can brighten the background and the light trace in accordance with the intention. Can be adjusted. For this reason, it is possible to prevent a shooting failure due to the exposure failure of bulb shooting, which is difficult, and to take a photo according to the photographer's intention.

次に、本発明の第1実施形態の変形例について説明する。第1実施形態においては、画像比較合成部11における比較明・暗合成を行う際に、比較部35で画素毎に画素データを比較し、大きいか小さいかを判定していた。これに対して、本変形例では、比較する画素データ出力同士の差分画素データを算出し、その差分画素データを比較部35において、スレッシュレベル(所定値)THと比較し、スレッシュレベルよりも大きい画素データは画像比較合成部11で比較明・暗合成した値とし、またスレッシュレベルより小さい画素は画像平均合成部12で平均値を算出し、この平均値を合成後の画像出力とする。すなわち、下記に示す処理を行う。
差分画素データ≧TH → 比較明・暗合成
差分画素データ<TH → 平均合成
Next, a modification of the first embodiment of the present invention will be described. In the first embodiment, when the comparative light / dark combination is performed in the image comparison / synthesis unit 11, the comparison unit 35 compares the pixel data for each pixel to determine whether it is large or small. On the other hand, in this modification, difference pixel data between pixel data outputs to be compared is calculated, and the difference pixel data is compared with a threshold level (predetermined value) TH in the comparison unit 35, and is larger than the threshold level. The pixel data is a value obtained by performing comparatively bright / dark combination in the image comparison / synthesis unit 11, and an average value is calculated by the image average combination unit 12 for pixels smaller than the threshold level, and this average value is used as an image output after synthesis. That is, the following processing is performed.
Difference pixel data ≧ TH → Comparative light / dark combination Difference pixel data <TH → Average combination

イメージセンサ4から読み出された画像データにはランダムノイズが含まれる。輝度の変化しない背景については複数の画像データの比較明合成ではランダムノイズの最大値が、累積比較明合成画像データに反映され、また比較暗合成ではランダムノイズの最小値が、累積比較暗合成画像データに反映される。このため、本変形例においては、スレッシュレベルTHをランダムノイズ程度の値に設定することにより、ランダムノイズによる画質悪化を抑制し、最終的な合成画像の画質を改善することができる。   The image data read from the image sensor 4 includes random noise. For backgrounds that do not change in brightness, the maximum value of random noise is reflected in the cumulative bright composite image data in the comparative bright synthesis of multiple image data, and the minimum random noise value is reflected in the cumulative comparative dark composite image in the comparative dark synthesis. Reflected in the data. For this reason, in this modification, by setting the threshold level TH to a value of about random noise, it is possible to suppress image quality deterioration due to random noise and improve the image quality of the final composite image.

次に、本発明の第2実施形態について、図7を用いて説明する。第1実施形態においては、イメージセンサ4からの1コマの露出時間(読出周期T)は、バルブ撮影中、一定であった。これに対して、第2実施形態においては、イメージセンサ4からの1コマの露出時間は、周囲の明るさに応じて変化させている。   Next, a second embodiment of the present invention will be described with reference to FIG. In the first embodiment, the exposure time (reading period T) for one frame from the image sensor 4 is constant during bulb photography. On the other hand, in the second embodiment, the exposure time for one frame from the image sensor 4 is changed according to the ambient brightness.

すなわち、第1実施形態においては、2ndレリーズスイッチがオンになってからオフとなるまでの撮影の途中で、背景の明るさが変化した場合、例えば、夕暮れ時や夜明け時の天体撮影や、大きな花火が打ちあがり、背景の明るさが変化した場合には、最終的な累積比較明合成には、背景が最も明るく写った際の背景が反映される。一方、累積比較暗合成画像データには背景が最も暗く写った際の背景が反映される。差分合成画像データは、これらの画像データの差分であることから、光跡の出力と共に背景の明るさの変化の差分が含まれてしまう。   That is, in the first embodiment, when the brightness of the background changes during shooting from when the 2nd release switch is turned on to when it is turned off, for example, astronomical shooting at dusk or dawn, When fireworks shine up and the brightness of the background changes, the background when the background appears brightest is reflected in the final cumulative comparative light composition. On the other hand, the background when the background appears darkest is reflected in the cumulative comparative dark composite image data. Since the difference composite image data is a difference between these image data, a difference in the change in brightness of the background is included together with the output of the light trace.

この差分合成画像データを用いて、撮影者が第1実施形態において説明したような背景・光跡の明るさ調整を行う場合には、光跡の明るさだけではなく背景の輝度も変化することになり、撮影者の意図しない合成画像データが生成されてしまう。そこで、第2実施形態においては、この不具合を解決するために、1コマの露出時間を周囲の明るさの変化に応じて変えることにより、比較明・暗合成する際の画像の明るさ変化を極力小さくするようにしている。   When the photographer adjusts the brightness of the background / light trace as described in the first embodiment using the difference composite image data, not only the brightness of the light trace but also the brightness of the background changes. Thus, composite image data not intended by the photographer is generated. Therefore, in the second embodiment, in order to solve this problem, by changing the exposure time of one frame in accordance with the change in ambient brightness, the change in the brightness of the image at the time of comparatively bright / dark combining is performed. I try to make it as small as possible.

本実施形態における構成は、第1実施形態に係る図1に示すブロック図と同様であり、図2に示したフローチャートを図7に置き換えるだけである。また、図7のフローチャートは、図2に示したフローチャートにステップS16A〜S16Eを追加しているだけであるから、この相違点を中心に説明する。   The configuration in this embodiment is the same as the block diagram shown in FIG. 1 according to the first embodiment, and only the flowchart shown in FIG. 2 is replaced with FIG. In addition, the flowchart of FIG. 7 is only described with respect to this difference since steps S16A to S16E are only added to the flowchart shown in FIG.

図7に示すフローに入り、ステップS7において画像読み出し周期Tを反映させ、露出を開始し(S9)、1コマ目の露出時間Tが経過すると(S11)、画像データを読み出すと共に、次回撮影のための露出を開始し(S13)、読み出した画像データを内部メモリ33に保存する(S15)。   In the flow shown in FIG. 7, the image reading cycle T is reflected in step S7, and exposure is started (S9). When the exposure time T of the first frame has passed (S11), the image data is read and the next shooting is performed. Exposure is started (S13), and the read image data is stored in the internal memory 33 (S15).

ステップS15において画像データを内部メモリに保存すると、2コマ目以降の露出時間がT/Nを経過したか否かを判定する(S16A)。ここで、Nは整数であり、T/Nは時間Tよりも短い時間となる。イメージセンサ4は、1コマ目は時間Tで露光を行い、2コマ目以降は時間T/Nで露光を行う。   When the image data is stored in the internal memory in step S15, it is determined whether or not the exposure time for the second and subsequent frames has passed T / N (S16A). Here, N is an integer, and T / N is shorter than time T. The image sensor 4 performs exposure at time T for the first frame, and performs exposure at time T / N for the second and subsequent frames.

ステップS16Aにおける判定の結果、露出時間T/Nが経過すると、画像データを読み出すと共に、次回の撮影のための露出を開始する(S16B)。読み出された画像データは、内部メモリ33に保存される(S16C)。   As a result of the determination in step S16A, when the exposure time T / N elapses, image data is read and exposure for the next photographing is started (S16B). The read image data is stored in the internal memory 33 (S16C).

内部メモリに保存すると、次に、加算画像処理を行う(S16D)。ここでは、画像加算合成部14において、2コマ目以降の読み出した画像データを加算する。すなわち、ステップS16Bにおいて、画像データが読み出されるたびに、画像データが加算されていく。この加算画像データは内部メモリ33に保存し、次の加算画像処理の際に使用する。   Once stored in the internal memory, addition image processing is then performed (S16D). Here, the image addition / synthesis unit 14 adds the read image data for the second and subsequent frames. That is, in step S16B, image data is added each time image data is read. The added image data is stored in the internal memory 33 and used in the next added image processing.

加算画像処理を行うと、次に、この加算画像データとステップS15にて内部メモリ33に記憶された1コマ目の画像データとの露出差が1/Nよりも小さいか否かを判定する(S16E)。ここでは、比較部35が、1コマ目の露出によって取得した画像データの露出量と、加算画像処理によって取得した画像データの露出量の比較を行う。比較は比較部35にて、以下に示す(3)式において露出差を算出して行う。
露出差={(1コマ目の画像データの露出量)−(加算合成画像データの露出量)}/(1コマ目の画像データ露出量) ・・・(3)
Once the addition image processing has been carried out, it is next determined whether or not the exposure difference between the addition image data and the first frame image data stored in the internal memory 33 in step S15 is smaller than 1 / N ( S16E). Here, the comparison unit 35 compares the exposure amount of the image data acquired by the exposure of the first frame with the exposure amount of the image data acquired by the addition image processing. The comparison is performed in the comparison unit 35 by calculating the exposure difference in the following equation (3).
Exposure difference = {(exposure amount of first frame image data) − (exposure amount of added composite image data)} / (first frame image data exposure amount) (3)

露出量の算出は、近年、デジタルカメラに搭載されているAE(測光)の手法を用いて画像画素出力平均値を算出すればよい。   In order to calculate the exposure amount, an image pixel output average value may be calculated using an AE (photometry) method mounted on a digital camera in recent years.

ステップS16Eにおける判定の結果、露出差が1/N以上の場合は、ステップS16Aに戻り、上述した加算合成処理を繰り返し行う。これにより、徐々に加算合成画像データの露出量が大きくなっていく。   As a result of the determination in step S16E, if the exposure difference is 1 / N or more, the process returns to step S16A and the above-described addition / synthesis processing is repeated. Thereby, the exposure amount of the addition composite image data gradually increases.

ステップS16Eにおける判定の結果、露出差が1/N以下になったところで、加算合成画像データを内部メモリ33に保存し、この加算合成画像データと1コマ目の読み出し画像データを用いて比較明・暗合成を行い(S17)、それぞれ累積比較明合成画像データと累積比較暗合成画像データとして内部メモリ33に保存する(S19)。   As a result of the determination in step S16E, when the exposure difference becomes 1 / N or less, the added synthesized image data is stored in the internal memory 33, and the added synthesized image data and the read image data of the first frame are used for comparison. Dark synthesis is performed (S17), and the result is stored in the internal memory 33 as cumulative comparative bright composite image data and cumulative comparative dark composite image data, respectively (S19).

以後、2ndレリーズスイッチがオフされるまでは、時間T/N(Nは整数)ごとに読み出した画像データに対して、上述したシーケンスで、1コマ目との露出差が1/N以下となる加算合成画像データを生成し、累積比較明合成、累積比較暗合成と比較合成処理を行う。ステップS25における判定の結果、2ndレリーズスイッチがオフされると、図3に示すステップS31以下を実行する。このフローは、第1実施形態と同様であることから、説明を省略するが、撮影者の意図に合わせて背景・光跡の明るさを調整し、最終的な画像データを外部メモリ36に保存する。   Thereafter, until the 2nd release switch is turned off, the exposure difference from the first frame becomes 1 / N or less in the above-described sequence for the image data read every time T / N (N is an integer). Additive synthesized image data is generated, and cumulative comparative bright synthesis, cumulative comparative dark synthesis, and comparative synthesis processing are performed. If the 2nd release switch is turned off as a result of the determination in step S25, step S31 and subsequent steps shown in FIG. 3 are executed. Since this flow is the same as that of the first embodiment, description thereof is omitted, but the brightness of the background / light trace is adjusted according to the photographer's intention and the final image data is stored in the external memory 36. To do.

このように、第2実施形態においては、背景の明るさが1コマ目の撮影画像の明るさに近い(露出差1/N以下)加算合成画像データを比較明合成と比較暗合成することで、背景の明るさが変化した場合でも、撮影者の意図しない合成画像データ生成されることを防止することができる。   As described above, in the second embodiment, the background brightness is close to the brightness of the captured image of the first frame (exposure difference of 1 / N or less). Even when the brightness of the background changes, it is possible to prevent generation of composite image data not intended by the photographer.

以上説明したように、本発明の各実施形態や変形例においては、イメージセンサから所定時間間隔で連続的に読み出された画像データを用いて、画像データの画素毎に暗い方の画素を用いた比較暗合成による比較暗合成画像データを生成し、また画像データの画素毎に明るい方の画素を用いた比較明合成による比較明合成画像データを生成し、比較明合成画像データと比較暗合成画像データから差分出力画像データを生成している(図3のS35、S47、図5(b)(c)(d)参照)。そして、生成した比較暗合成画像データを背景画像データとし、また差分出力画像データを光跡出力画像データとして、それぞれ明るさを調整し、調整後の各画像データを加算合成することにより、基準となる比較明合成画像データに対して、背景の明るさ、光跡の明るさを、それぞれ独立して調整可能としている。このため、難易度の高いバルブ撮影の露出失敗を防止し、撮影者の意図に沿った写真の撮影を可能としている。   As described above, in each embodiment or modification of the present invention, the darker pixel is used for each pixel of the image data using the image data continuously read from the image sensor at predetermined time intervals. The comparative dark composite image data is generated by the comparative dark composite, and the comparative bright composite image data is generated by the comparative bright composite using the brighter pixel for each pixel of the image data. Difference output image data is generated from the image data (see S35 and S47 in FIG. 3, and FIGS. 5B, 5C, and 5D). Then, the generated comparative dark composite image data is used as background image data, and the difference output image data is used as light trace output image data. For the comparatively bright composite image data, the brightness of the background and the brightness of the light trail can be adjusted independently of each other. For this reason, the exposure failure of bulb photography with high difficulty is prevented, and photography according to the photographer's intention is made possible.

また、比較暗合成画像データと比較明画像データの合成の生成にあたっては、同じアドレスの画素データ同士の比較を行い、大きいまたは小さい方の画素データを用いて行うようにしている。このため、構成が単純であり、迅速に処理することができる。また、比較暗合成画像データと比較明画像データの合成にあたっては、画素データ同士の差分が所定値を超えている場合には、大きいまたは小さい画素データを用いて比較暗合成画像データまたは比較明合成画像データを生成し、画素データ同士の差分が所定値以下の場合には、画素データの平均値を用いて比較暗合成画像データまたは比較明合成画像データを生成している。差分値を用いて判定していることにより、画素ノイズの影響を低減することができる。   Further, when generating the composite of the comparative dark composite image data and the comparative bright image data, the pixel data of the same address are compared with each other, and the larger or smaller pixel data is used. Therefore, the configuration is simple and processing can be performed quickly. In addition, when compositing the comparative dark composite image data and the comparative bright image data, if the difference between the pixel data exceeds a predetermined value, the comparative dark composite image data or the comparative bright composite is used by using large or small pixel data. When image data is generated and the difference between the pixel data is equal to or smaller than a predetermined value, comparative dark composite image data or comparatively bright composite image data is generated using an average value of the pixel data. By determining using the difference value, the influence of pixel noise can be reduced.

なお、本発明の各実施形態や変形例においては、比較明・暗合成処理を行うと、最新の累積比較明合成画像データ・累積比較暗合成画像データのみを記憶していたが(図2のステップS19、図3のS37、図7のS19)、過去の一連の累積明合成画像データ・累積暗合成画像データを記憶しておき、バルブ撮影の終了後に、これらの画像データに基づいて、それぞれ差分出力画像データを生成し、ユーザが意図する画像データを選択するようにしてもよい。   In each embodiment and modification of the present invention, when the comparative light / dark combination processing is performed, only the latest cumulative comparative bright composite image data / cumulative comparative dark composite image data is stored (see FIG. 2). Step S19, S37 in FIG. 3, S19 in FIG. 7), a series of past accumulated bright composite image data / cumulative dark composite image data is stored, and after bulb photography is completed, based on these image data, respectively. Difference output image data may be generated and image data intended by the user may be selected.

また、本発明の各実施形態や変形例においては、画像表示として比較明合成画像を表示していたが、これに限らず、ユーザが選択すれば比較暗合成画像、差分出力画像を表示するようにしても良い。   In each embodiment and modification of the present invention, a comparatively bright composite image is displayed as an image display. However, the present invention is not limited to this, and a comparative dark composite image and a differential output image are displayed if selected by the user. Anyway.

また、本発明の各実施形態や変形例においては、撮影のための機器として、デジタルカメラを用いて説明したが、カメラとしては、デジタル一眼レフカメラでもミラーレスカメラでもコンパクトデジタルカメラでもよく、ビデオカメラ、ムービーカメラのような動画用のカメラでもよく、さらに、携帯電話、スマートフォーンや携帯情報端末(PDA:Personal Digital Assist)、ゲーム機器等に内蔵されるカメラでも構わない。いずれにしても、バルブ撮影が可能な撮影のための機器であれば、本発明を適用することができる。   In each embodiment and modification of the present invention, a digital camera has been described as an apparatus for photographing. However, a digital single-lens reflex camera, a mirrorless camera, or a compact digital camera may be used as the camera. It may be a camera for moving images such as a camera or a movie camera, and may be a camera built in a mobile phone, a smart phone, a personal digital assistant (PDA), a game device, or the like. In any case, the present invention can be applied to any device for bulb photography that can perform bulb photography.

また、本明細書において説明した技術のうち、主にフローチャートで説明した制御に関しては、プログラムで設定可能であることが多く、記録媒体や記録部に収められる場合もある。この記録媒体、記録部への記録の仕方は、製品出荷時に記録してもよく、配布された記録媒体を利用してもよく、インターネットを介してダウンロードしたものでもよい。   Of the techniques described in this specification, the control mainly described in the flowchart is often settable by a program and may be stored in a recording medium or a recording unit. The recording method for the recording medium and the recording unit may be recorded at the time of product shipment, may be a distributed recording medium, or may be downloaded via the Internet.

また、特許請求の範囲、明細書、および図面中の動作フローに関して、便宜上「まず」、「次に」等の順番を表現する言葉を用いて説明したとしても、特に説明していない箇所では、この順で実施することが必須であることを意味するものではない。   In addition, regarding the operation flow in the claims, the specification, and the drawings, even if it is described using words expressing the order such as “first”, “next”, etc. It does not mean that it is essential to implement in this order.

本発明は、上記実施形態にそのまま限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素の幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。   The present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, you may delete some components of all the components shown by embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

1・・・撮像部、2・・・レンズ(絞り)、3・・・メカシャッタ、4・・・イメージセンサ、10・・・画像処理部、11・・・画像比較合成部、12・・・画像平均合成部、13・・・差分画像合成部、14・・・画像加算合成部、15・・・画像合成部、16・・・現像処理部、20・・・システム制御部、21・・・露光時間算出部、22・・・露光時間制御部、31・・・バス、33・・・内部メモリ、34・・・露出判定部、35・・・比較部、36・・・外部メモリ、37・・・表示部、38・・・入力IF DESCRIPTION OF SYMBOLS 1 ... Imaging part, 2 ... Lens (aperture), 3 ... Mechanical shutter, 4 ... Image sensor, 10 ... Image processing part, 11 ... Image comparison combining part, 12 ... Image average synthesizing unit, 13 ... Difference image synthesizing unit, 14 ... Image addition synthesizing unit, 15 ... Image synthesizing unit, 16 ... Development processing unit, 20 ... System control unit, 21 ... Exposure time calculation unit, 22 ... exposure time control unit, 31 ... bus, 33 ... internal memory, 34 ... exposure determination unit, 35 ... comparison unit, 36 ... external memory, 37 ... Display unit, 38 ... Input IF

Claims (8)

順次入力される複数の画像データを記憶する記憶部と、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか大きい方の画素データを新たな画素データとして、比較明合成画像データを構成する比較明合成処理を行う比較明合成処理部と、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか小さい方の画素データを新たな画素データとして、比較暗合成画像データを構成する比較暗合成処理を行う比較暗合成処理部と、
上記比較明合成画像データと上記比較暗合成画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データの差を演算して新たな差分画像データを生成する差分画像合成部と、
上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する画像合成部と、
を備えたことを特徴とする画像処理装置。
A storage unit for storing a plurality of image data sequentially input ;
Compared pixel data corresponding to each of the plurality of pixels constituting the two-frame image data read out from the storage unit, and using the larger pixel data as new pixel data, comparatively bright composite image data A comparatively bright combination processing unit for performing comparatively bright combination processing that constitutes
Comparison dark composite image data by comparing pixel data corresponding to each of a plurality of pixels constituting the two-frame image data read from the storage unit, and using the smaller pixel data as new pixel data A comparative dark synthesis processing unit for performing comparative dark synthesis processing that constitutes
A difference image synthesizing unit for generating a corresponding calculates the difference between the pixel data new shelf differential image data for each of a plurality of pixels constituting the relatively bright composite image data and the relatively dark composite image data,
An image composition unit that synthesizes the multiplication dark image data obtained by multiplying the comparative dark composite image data by an arbitrary gain value and the multiplication difference image data obtained by multiplying the difference image data by an arbitrary gain value, and generates a composite image;
An image processing apparatus comprising:
上記比較明合成処理部は、上記記憶部から読み出された画像データを基に最初に生成された第1画像データを累積比較明合成画像データとして上記記憶部に記憶し、上記記憶部から読み出された画像データを基に生成された第2画像データを構成する複数の画素データと上記累積比較明合成画像データを構成する複数の画素データのそれぞれ対応する画素データとを比較し、いずれか大きい方の画素データを新たな画素データとして、上記累積比較明合成画像データを構成する比較明合成処理を行い、
上記比較暗合成処理部、上記記憶部から読み出された画像データを基に最初に生成された第1画像データを累積比較暗合成画像データとして上記記憶部に記憶し、上記記憶部から読み出された画像データを基に生成された第2画像データを構成する複数の画素データと上記累積比較暗合成画像データを構成する複数の画素データのそれぞれ対応する画素データとを比較し、いずれか小さい方の画素データを新たな画素データとして、上記累積比較暗合成画像データを構成する比較暗合成処理を行い、
上記差分画像合成部は、上記累積比較明合成画像データと上記累積比較暗合成画像データのそれぞれ対応する画素データの差を演算して新たな差分画像データを生成し、
上記画像合成部は、上記累積比較暗合成画像データに任意のゲイン値を乗算した累積乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する、
ことを特徴とする請求項に記載の画像処理装置。
The comparatively bright combination processing unit stores the first image data first generated based on the image data read from the storage unit in the storage unit as cumulative comparative bright combined image data, and reads from the storage unit. Comparing the plurality of pixel data constituting the second image data generated based on the output image data and the corresponding pixel data of the plurality of pixel data constituting the cumulative comparative bright composite image data, The larger pixel data is used as new pixel data, and the comparatively bright combination processing that constitutes the cumulative comparative bright combined image data is performed.
The relatively dark combination processing unit, the first image data that has been initially generated based on image data read out from the storage unit as a cumulative relatively dark composite image data stored in the storage unit, read from the storage unit Comparing a plurality of pixel data constituting the second image data generated based on the outputted image data and corresponding pixel data of the plurality of pixel data constituting the cumulative comparative dark composite image data, Using the smaller pixel data as new pixel data, a comparative dark composition process is performed that constitutes the cumulative comparative dark composite image data.
The difference image composition unit calculates a difference between corresponding pixel data of the cumulative comparative bright composite image data and the cumulative comparative dark composite image data to generate new difference image data,
The image composition unit synthesizes the cumulative multiplication dark image data obtained by multiplying the cumulative comparative dark composite image data by an arbitrary gain value and the multiplication difference image data obtained by multiplying the difference image data by an arbitrary gain value. Generate
The image processing apparatus according to claim 1 .
順次入力される複数の画像データを記憶する記憶部と、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データとの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか大きい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、上記2コマの画像データを構成するそれぞれの複数の画素データの平均値を新たな画素データとして比較明合成処理を行い、比較明合成画像データを生成する比較明合成処理部と、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか小さい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、画像合成処理を行い、比較暗合成画像データを生成する比較暗合成処理部と、
上記比較明合成画像データと比較暗合成画像データを構成する複数の画素のそれぞれに対応する画素データの差を演算して新たな差分画像データを生成する差分画像合成部と、
上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する画像合成部と、
を備えたことを特徴とする画像処理装置。
A storage unit for storing a plurality of image data sequentially input ;
The difference between the pixel data corresponding to each of the plurality of pixels constituting the two-frame image data read from the storage unit is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, When pixel data corresponding to each of a plurality of pixels constituting the image data of two frames is compared, and the larger pixel data is set as new pixel data. On the other hand, when the difference is smaller than the predetermined value, A comparatively bright composite processing unit that performs comparatively bright composite processing using the average value of each of the plurality of pixel data constituting the two frames of image data as new pixel data, and generates comparatively bright composite image data;
The difference between the pixel data corresponding to each of the plurality of pixels constituting the two frames of image data read from the storage unit is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, the 2 Comparing the pixel data corresponding to each of the plurality of pixels constituting the image data of the frame, the smaller pixel data is set as new pixel data, and when the difference is smaller than the predetermined value, A comparative dark composition processing unit that performs image composition processing by using an average value of a plurality of pixel data constituting each of the two frames of image data as new pixel data, and generates comparative dark composite image data;
A difference image composition unit that calculates a difference between pixel data corresponding to each of a plurality of pixels constituting the comparative bright composite image data and the comparative dark composite image data to generate new difference image data;
An image composition unit that synthesizes the multiplication dark image data obtained by multiplying the comparative dark composite image data by an arbitrary gain value and the multiplication difference image data obtained by multiplying the difference image data by an arbitrary gain value, and generates a composite image;
An image processing apparatus comprising:
上記比較明合成処理部は、上記記憶部から読み出された画像データを基に最初に生成された第1画像データを累積比較明合成画像データとして上記記憶部に記憶し、上記記憶部から読み出された画像データを基に生成された第2画像データを構成する複数の画素データと上記累積比較明合成画像データを構成する複数の画素データのそれぞれ対応する画素データの差を所定値と比較し、上記差が上記所定値以上のときは、上記2コマの画像データをそれぞれ構成する複数の画素データのそれぞれ対応する画素データを比較していずれか大きい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、上記累積比較明合成画像データを生成する比較明合成処理を行い、
上記比較暗合成処理部は、上記記憶部から読み出された画像データを基に最初に生成された第1画像データを累積比較暗合成画像データとして上記記憶部に記憶し、上記記憶部から読み出された画像データを基に生成された第2画像データを構成する複数の画素データと上記累積比較暗合成画像データを構成する複数の画素データのそれぞれ対応する画素データとの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか小さい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、上記累積比較暗合成画像データを生成する比較暗合成処理を行い、
上記差分画像合成部は、上記累積比較明合成画像データと上記累積比較暗合成画像データのそれぞれ対応する画素データの差を演算して新たな差分画像データを生成し、
上記画像合成部は、上記累積比較暗合成画像データに任意のゲイン値を乗算した累積乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する、
ことを特徴とする請求項記載の画像処理装置。
The comparatively bright combination processing unit stores the first image data first generated based on the image data read from the storage unit in the storage unit as cumulative comparative bright combined image data, and reads from the storage unit. The difference between the plurality of pixel data constituting the second image data generated based on the output image data and the plurality of pixel data constituting the cumulative comparative bright composite image data is compared with a predetermined value. When the difference is equal to or greater than the predetermined value, the pixel data corresponding to each of the plurality of pixel data constituting the image data of the two frames is compared, and the larger pixel data is set as new pixel data. On the other hand, when the difference is smaller than the predetermined value, the average value of a plurality of pixel data constituting each of the two frames of image data is used as new pixel data, and the cumulative comparison Performed lighten compositing process of generating formed image data,
The comparative dark synthesis processing unit stores the first image data generated first based on the image data read from the storage unit in the storage unit as cumulative comparative dark synthesized image data, and reads the first image data from the storage unit. The difference between the plurality of pixel data constituting the second image data generated based on the output image data and the corresponding pixel data of the plurality of pixel data constituting the cumulative comparative dark composite image data is defined as a predetermined value. If the difference is equal to or greater than the predetermined value, the pixel data corresponding to each of the plurality of pixels constituting the image data of the two frames is compared, and the smaller pixel data is set as a new pixel. On the other hand, when the difference is smaller than the predetermined value, the average value of a plurality of pixel data constituting each of the two frames of image data is used as new pixel data, and the cumulative comparative darkness is obtained. It compares dark combination process of generating formed image data,
The difference image composition unit calculates a difference between corresponding pixel data of the cumulative comparative bright composite image data and the cumulative comparative dark composite image data to generate new difference image data,
The image composition unit synthesizes the cumulative multiplication dark image data obtained by multiplying the cumulative comparative dark composite image data by an arbitrary gain value and the multiplication difference image data obtained by multiplying the difference image data by an arbitrary gain value. Generate
The image processing apparatus according to claim 3 .
順次入力される複数の画像データを記憶する記憶部を有する画像処理装置における画像処理方法において、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか大きい方の画素データを新たな画素データとして、比較明合成画像データを構成する比較明合成処理を行い、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか小さい方の画素データを新たな画素データとして、比較暗合成画像データを構成する比較暗合成処理を行い、
上記比較明合成画像データと上記比較暗合成画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データの差を演算して新たな差分画像データを生成し、
上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する、
ことを特徴とする画像処理方法。
In an image processing method in an image processing apparatus having a storage unit for storing a plurality of image data sequentially input ,
Compared pixel data corresponding to each of the plurality of pixels constituting the two-frame image data read out from the storage unit, and using the larger pixel data as new pixel data, comparatively bright composite image data The comparative light composition processing that composes
Comparison dark composite image data by comparing pixel data corresponding to each of a plurality of pixels constituting the two-frame image data read from the storage unit, and using the smaller pixel data as new pixel data The comparative dark synthesis process that composes
By calculating the respective differences of the corresponding pixel data of each of a plurality of pixels constituting the relatively bright composite image data and the relatively dark composite image data to generate a new shelf difference image data,
The composite dark image data obtained by multiplying the comparative dark composite image data by an arbitrary gain value and the multiply differential image data obtained by multiplying the difference image data by an arbitrary gain value are combined to generate a composite image .
An image processing method.
順次入力される複数の画像データを記憶する記憶部を有する画像処理装置における画像処理方法において、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データとの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか大きい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、上記2コマの画像データを構成するそれぞれの複数の画素データの平均値を新たな画素データとして比較明合成処理を行い、比較明合成画像データを生成し、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか小さい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、画像合成処理を行い、比較暗合成画像データを生成し、
上記比較明合成画像データと比較暗合成画像データを構成する複数の画素のそれぞれに対応する画素データの差を演算して新たな差分画像データを生成し、
上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する、
ことを特徴とする画像処理方法。
In an image processing method in an image processing apparatus having a storage unit for storing a plurality of image data sequentially input ,
The difference between the pixel data corresponding to each of the plurality of pixels constituting the two-frame image data read from the storage unit is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, When pixel data corresponding to each of a plurality of pixels constituting the image data of two frames is compared, and the larger pixel data is set as new pixel data. On the other hand, when the difference is smaller than the predetermined value, , Performing a comparatively bright composite process using the average value of each of the plurality of pixel data constituting the two frames of image data as new pixel data, and generating comparatively bright composite image data,
The difference between the pixel data corresponding to each of the plurality of pixels constituting the two frames of image data read from the storage unit is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, the 2 Comparing the pixel data corresponding to each of the plurality of pixels constituting the image data of the frame, the smaller pixel data is set as new pixel data, and when the difference is smaller than the predetermined value, An image synthesizing process is performed by using an average value of a plurality of pixel data constituting each of the two frames of image data as new pixel data, and comparative dark synthesized image data is generated.
Calculating a difference between pixel data corresponding to each of a plurality of pixels constituting the comparative light composite image data and the comparative dark composite image data, and generating new difference image data ;
The composite dark image data obtained by multiplying the comparative dark composite image data by an arbitrary gain value and the multiply differential image data obtained by multiplying the difference image data by an arbitrary gain value are combined to generate a composite image .
An image processing method.
順次入力される複数の画像データを記憶する記憶部を有する画像処理装置のコンピュータを実行するためのプログラムにおいて、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか大きい方の画素データを新たな画素データとして、比較明合成画像データを構成する比較明合成処理を行い、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データを比較し、いずれか小さい方の画素データを新たな画素データとして、比較暗合成画像データを構成する比較暗合成処理を行い、
上記比較明合成画像データと上記比較暗合成画像データを構成するそれぞれの複数の画素のそれぞれ対応する画素データの差を演算して新たな差分画像データを生成し、
上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する、
ことを上記コンピュータに実行させるためのプログラム。
In a program for executing a computer of an image processing apparatus having a storage unit for storing a plurality of image data sequentially input ,
Compared pixel data corresponding to each of the plurality of pixels constituting the two-frame image data read out from the storage unit, and using the larger pixel data as new pixel data, comparatively bright composite image data The comparative light composition processing that composes
Comparison dark composite image data by comparing pixel data corresponding to each of a plurality of pixels constituting the two-frame image data read from the storage unit, and using the smaller pixel data as new pixel data The comparative dark synthesis process that composes
By calculating the respective differences of the corresponding pixel data of each of a plurality of pixels constituting the relatively bright composite image data and the relatively dark composite image data to generate a new shelf difference image data,
The composite dark image data obtained by multiplying the comparative dark composite image data by an arbitrary gain value and the multiply differential image data obtained by multiplying the difference image data by an arbitrary gain value are combined to generate a composite image .
A program for causing the computer to execute the above.
順次入力される複数の画像データを記憶する記憶部を有する画像処理装置のコンピュータを実行するためのプログラムにおいて、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データとの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか大きい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、上記2コマの画像データを構成するそれぞれの複数の画素データの平均値を新たな画素データとして比較明合成処理を行い、比較明合成画像データを生成し、
上記記憶部から読み出された2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データの差を所定値と比較し、当該差が上記所定値以上のときは、上記2コマの画像データを構成するそれぞれの複数の画素のそれぞれに対応する画素データを比較していずれか小さい方の画素データを新たな画素データとし、一方、当該差が上記所定値より小さいときは、2コマの画像データをそれぞれ構成する複数の画素データの平均値を新たな画素データとして、画像合成処理を行い、比較暗合成画像データを生成し、
上記比較明合成画像データと比較暗合成画像データを構成する複数の画素のそれぞれに対応する画素データの差を演算して新たな差分画像データを生成し、
上記比較暗合成画像データに任意のゲイン値を乗算した乗算暗画像データと、上記差分画像データに任意のゲイン値を乗算した乗算差分画像データを合成し、合成画像を生成する、
ことを上記コンピュータに実行させるためのプログラム。
In a program for executing a computer of an image processing apparatus having a storage unit for storing a plurality of image data sequentially input ,
The difference between the pixel data corresponding to each of the plurality of pixels constituting the two-frame image data read from the storage unit is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, When pixel data corresponding to each of a plurality of pixels constituting the image data of two frames is compared, and the larger pixel data is set as new pixel data. On the other hand, when the difference is smaller than the predetermined value, , Performing a comparatively bright composite process using the average value of each of the plurality of pixel data constituting the two frames of image data as new pixel data, and generating comparatively bright composite image data,
The difference between the pixel data corresponding to each of the plurality of pixels constituting the two frames of image data read from the storage unit is compared with a predetermined value, and when the difference is equal to or greater than the predetermined value, the 2 Comparing the pixel data corresponding to each of the plurality of pixels constituting the image data of the frame, the smaller pixel data is set as new pixel data, and when the difference is smaller than the predetermined value, An image synthesizing process is performed by using an average value of a plurality of pixel data constituting each of the two frames of image data as new pixel data, and comparative dark synthesized image data is generated.
Calculating a difference between pixel data corresponding to each of a plurality of pixels constituting the comparative light composite image data and the comparative dark composite image data, and generating new difference image data ;
The composite dark image data obtained by multiplying the comparative dark composite image data by an arbitrary gain value and the multiply differential image data obtained by multiplying the difference image data by an arbitrary gain value are combined to generate a composite image .
A program for causing the computer to execute the above.
JP2016211773A 2016-10-28 2016-10-28 Image processing apparatus, image processing method, and program Active JP6284604B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016211773A JP6284604B2 (en) 2016-10-28 2016-10-28 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016211773A JP6284604B2 (en) 2016-10-28 2016-10-28 Image processing apparatus, image processing method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2013087300A Division JP6034740B2 (en) 2013-04-18 2013-04-18 Imaging apparatus and imaging method

Publications (2)

Publication Number Publication Date
JP2017034718A JP2017034718A (en) 2017-02-09
JP6284604B2 true JP6284604B2 (en) 2018-02-28

Family

ID=57986425

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016211773A Active JP6284604B2 (en) 2016-10-28 2016-10-28 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP6284604B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4082318B2 (en) * 2003-09-04 2008-04-30 カシオ計算機株式会社 Imaging apparatus, image processing method, and program
JP2012119858A (en) * 2010-11-30 2012-06-21 Aof Imaging Technology Ltd Imaging device, imaging method, and program
JP5895409B2 (en) * 2011-09-14 2016-03-30 株式会社リコー Imaging device
JP6034740B2 (en) * 2013-04-18 2016-11-30 オリンパス株式会社 Imaging apparatus and imaging method
JP6391383B2 (en) * 2014-02-10 2018-09-19 キヤノン株式会社 Image processing apparatus, control method therefor, program, and storage medium

Also Published As

Publication number Publication date
JP2017034718A (en) 2017-02-09

Similar Documents

Publication Publication Date Title
JP6034740B2 (en) Imaging apparatus and imaging method
JP6278713B2 (en) Imaging apparatus and imaging method
JP6570918B2 (en) Imaging apparatus and imaging method
US9654695B2 (en) Imaging device and control method for imaging device
JP6370207B2 (en) Imaging apparatus, image processing apparatus, imaging method, and program
JP6321990B2 (en) Imaging apparatus and imaging method
JP6250098B2 (en) Imaging apparatus and imaging method
JP2017108309A (en) Imaging apparatus and imaging method
JP6096041B2 (en) Imaging apparatus and imaging method
JP2016149631A (en) Imaging apparatus and imaging method
US10097751B2 (en) Imaging apparatus and image compositing method
JP6231814B2 (en) EXPOSURE DETERMINING DEVICE, IMAGING DEVICE, CONTROL METHOD, AND PROGRAM
JP6284604B2 (en) Image processing apparatus, image processing method, and program
JP6501619B2 (en) Imaging apparatus, imaging method
JP6418715B2 (en) Image processing apparatus and image processing method
KR20100112788A (en) Method of controlling activation between shaking correction and electronical strobo, method of photographing, and digital camera module
JP2010200097A (en) Imaging apparatus
US20130194456A1 (en) Imaging device
JP2016054447A (en) Imaging apparatus, image processing apparatus, image processing method and image processing program
JP6727975B2 (en) Imaging device, control method thereof, and program
JP2013118562A (en) Imaging apparatus

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170608

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170615

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170802

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180105

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180130

R151 Written notification of patent or utility model registration

Ref document number: 6284604

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250