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

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

Info

Publication number
JP5757472B2
JP5757472B2 JP2012090107A JP2012090107A JP5757472B2 JP 5757472 B2 JP5757472 B2 JP 5757472B2 JP 2012090107 A JP2012090107 A JP 2012090107A JP 2012090107 A JP2012090107 A JP 2012090107A JP 5757472 B2 JP5757472 B2 JP 5757472B2
Authority
JP
Japan
Prior art keywords
line
flash
screen
unit
image data
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
JP2012090107A
Other languages
Japanese (ja)
Other versions
JP2013219658A (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.)
JVCKenwood Corp
Original Assignee
JVCKenwood 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 JVCKenwood Corp filed Critical JVCKenwood Corp
Priority to JP2012090107A priority Critical patent/JP5757472B2/en
Publication of JP2013219658A publication Critical patent/JP2013219658A/en
Application granted granted Critical
Publication of JP5757472B2 publication Critical patent/JP5757472B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)
  • Studio Devices (AREA)

Description

本発明は、動画像の撮影時に撮影者以外の他者のフラッシュ等によって、画像の明るさが不連続となった画面を補正することができる画像処理装置、画像処理方法、画像処理プログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program capable of correcting a screen in which the brightness of an image is discontinuous by a flash of a third party other than a photographer when shooting a moving image.

近年、ビデオカメラ等の撮像装置においては、CMOS(Complementary Metal Oxide Semiconductor)センサが数多く採用されている。CMOSセンサにおける撮像信号の読み出しは、全画素で同一タイミングでなく、ライン単位で順次、リセット、露光、読み出しを行うことにより、読み出しタイミングがライン方向に順次ずれていくローリングシャッタ方式にて行われる。   2. Description of the Related Art In recent years, many complementary metal oxide semiconductor (CMOS) sensors have been employed in imaging devices such as video cameras. Reading of the imaging signal in the CMOS sensor is performed by a rolling shutter system in which the readout timing is sequentially shifted in the line direction by sequentially performing reset, exposure, and readout in units of lines, not at the same timing in all pixels.

このため、例えば結婚式等において多数のビデオカメラやスチルカメラが、同一の被写体を同時に撮影する場合において、他者のフラッシュによる発光期間が短く強い光が一部のラインのみの露光期間中にCMOSセンサに入射することがある。この場合、撮像する画面の一部で露光量が異なり、画面内に白帯状の明るい領域が発生して不連続な画像となってしまう。この問題点はフラッシュに限らず、フラッシュと同様の発光期間が短く強い光がCMOSセンサに入射した場合も同様に発生する。   For this reason, for example, when a large number of video cameras or still cameras photograph the same subject at the same time, such as at a wedding ceremony, CMOS is emitted during the exposure period of only a part of the lines, where the flashing period of the other person's flash is short and intense light is emitted. May enter the sensor. In this case, the exposure amount differs in a part of the screen to be imaged, and a white band-like bright area is generated in the screen, resulting in a discontinuous image. This problem is not limited to the flash, but also occurs when strong light having a short light emission period similar to the flash is incident on the CMOS sensor.

この問題点の解決策が例えば特許文献1〜3に記載されているように種々提案されている。   Various solutions to this problem have been proposed as described in Patent Documents 1 to 3, for example.

特開2010−213220号公報JP 2010-213220 A 特開2011−15222号公報JP 2011-15222 A 特開2011−101208号公報JP 2011-101208 A

フラッシュ等の発光期間が短く強い光がCMOSセンサに入射して画面内で画像の明るさが不連続となったことを、極力、誤検出少なく検出して補正することが求められる。また、画面内で画像の明るさが不連続となったことを検出するためにメモリリソースが増大することは好ましくない。メモリリソースが増大せず、画像の明るさが不連続となったことを検出することが求められる。さらに、画像の明るさが不連続となったことを検出して補正した場合に補正処理による遅延を極力少なくすることが求められる。   It is required to detect and correct as little as possible misdetection that the brightness of the image is discontinuous in the screen due to the light having a short light emission period such as a flash entering the CMOS sensor. Further, it is not preferable that the memory resources increase in order to detect that the brightness of the image is discontinuous in the screen. It is required to detect that the brightness of an image becomes discontinuous without increasing memory resources. Furthermore, it is required to minimize the delay caused by the correction process when it is detected and corrected that the brightness of the image is discontinuous.

本発明はこのような要望に対応するため、画面内で画像の明るさが不連続となったことを精度よく検出することができる画像処理装置、画像処理方法、画像処理プログラムを提供することを目的とする。また、メモリリソースを増大させることなく、画面内で画像の明るさが不連続となったことを検出することができる画像処理装置、画像処理方法、画像処理プログラムを提供することを目的とする。さらに、画像の明るさの不連続を補正した場合に補正処理による遅延を少なくすることができる画像処理装置、画像処理方法、画像処理プログラムを提供することを目的とする。   In order to meet such a demand, the present invention provides an image processing apparatus, an image processing method, and an image processing program capable of accurately detecting that the brightness of an image is discontinuous on the screen. Objective. It is another object of the present invention to provide an image processing apparatus, an image processing method, and an image processing program that can detect that the brightness of an image is discontinuous in a screen without increasing memory resources. It is another object of the present invention to provide an image processing apparatus, an image processing method, and an image processing program that can reduce delay due to correction processing when discontinuity in image brightness is corrected.

本発明は、上述した従来の技術の課題を解決するため、フラッシュの発光によって高輝度となっているラインを含むか否かの検出対象となっている画像データ内の対象画面におけるそれぞれのラインのライン平均輝度と、前記対象画面の少なくとも1画面前の画面である過去の画面の全画面平均輝度とを算出し、それぞれのラインの前記ライン平均輝度と前記全画面平均輝度とを比較することによって、前記対象画面内のラインがフラッシュの発光によって高輝度となっているか否かを検出するフラッシュ検出部(2,20)と、前記画像データの前記過去の画面を保持する保持部(4)と、前記フラッシュ検出部によって前記対象画面内のラインがフラッシュの発光によって高輝度となっていることが検出された場合には、前記対象画面における高輝度となっているラインを前記保持部に保持された前記過去の画面のラインに置換することにより画像データを補正するフラッシュ補正部(8)と、前記フラッシュ補正部によって補正された前記画像データを記録する記録部(11)と、前記フラッシュ補正部によって補正されていない状態の前記画像データを表示部に表示させるよう前記表示部に出力する出力信号処理部(6)とを備えることを特徴とする画像処理装置を提供する。   In order to solve the above-described problems of the related art, the present invention solves the problem of each line on the target screen in the image data that is the target of detection of whether or not it includes a line that is bright due to flash emission. By calculating a line average luminance and a total screen average luminance of a past screen that is at least one screen before the target screen, and comparing the line average luminance and the full screen average luminance of each line A flash detection unit (2, 20) for detecting whether or not a line in the target screen has high brightness due to flash emission, and a holding unit (4) for holding the past screen of the image data When the flash detection unit detects that the line in the target screen has high brightness due to flash emission, A flash correction unit (8) for correcting image data by replacing a line having high brightness with the line of the past screen held in the holding unit, and the image corrected by the flash correction unit A recording unit (11) for recording data, and an output signal processing unit (6) for outputting the image data in a state not corrected by the flash correction unit to the display unit so that the image data is displayed on the display unit. An image processing apparatus is provided.

上記の画像処理装置において、前記フラッシュ補正部は、前記対象画面の全体を、フラッシュの発光による影響を受けていない前記過去の画面に置換してもよい。   In the image processing apparatus, the flash correction unit may replace the entire target screen with the past screen that is not affected by the flash emission.

上記の画像処理装置において、前記フラッシュ検出部は、フラッシュの発光によって高輝度となっている最初のラインであるフラッシュ開始ラインと最後のラインであるフラッシュ終了ラインとを検出し、前記フラッシュ補正部は、前記フラッシュ開始ラインよりも上方に位置し、前記フラッシュ開始ラインに隣接する第1の隣接領域と、前記フラッシュ終了ラインよりも下方に位置し、前記フラッシュ終了ラインに隣接する第2の隣接領域とをそれぞれ設定し、前記第1の隣接領域では、前記第1の隣接領域の最初のラインから最後のラインに進行するに従って前記対象画面の画像データを順次減少させ、前記過去の画面の画像データを順次増加させるように両者の画像データを混合し、前記第2の隣接領域では、前記第2の隣接領域の最初のラインから最後のラインに進行するに従って前記過去の画面の画像データを順次減少させ、前記対象画面の画像データを順次増加させるように両者の画像データを混合することが好ましい。   In the image processing apparatus, the flash detection unit detects a flash start line and a flash end line that are the first lines that are bright due to flash emission, and the flash correction unit A first adjacent region located above the flash start line and adjacent to the flash start line; and a second adjacent region located below the flash end line and adjacent to the flash end line; In the first adjacent area, the image data of the target screen is sequentially decreased as the first line of the first adjacent area progresses from the first line to the last line, and the image data of the past screen is The image data of both are mixed so as to increase sequentially, and in the second adjacent area, the maximum of the second adjacent area. The image data is sequentially reduced from the line of the previous screen in accordance with progress in the last line, it is preferable to mix both image data so as to sequentially increase the image data of the target screen.

上記の画像処理装置において、前記フラッシュ検出部は、フラッシュの発光によって高輝度となっている最初のラインであるフラッシュ開始ラインと最後のラインであるフラッシュ終了ラインとを検出し、前記フラッシュ補正部は、前記フラッシュ開始ラインよりも上方に位置し、前記フラッシュ開始ラインに隣接する第1の隣接領域と、前記フラッシュ終了ラインよりも下方に位置し、前記フラッシュ終了ラインに隣接する第2の隣接領域とをそれぞれ設定し、前記第1及び第2の隣接領域では、前記第1及び第2の隣接領域内のそれぞれの画素の明るさが第1の閾値より小さければ前記対象画面の画素データのみとし、前記第1の閾値より大きい値である第2の閾値より大きければ前記過去の画面の画素データのみとし、前記第1の閾値以上前記第2の閾値以下であれば前記対象画面の画素データと前記過去の画面の画素データとを混合することが好ましい。   In the image processing apparatus, the flash detection unit detects a flash start line and a flash end line that are the first lines that are bright due to flash emission, and the flash correction unit A first adjacent region located above the flash start line and adjacent to the flash start line; and a second adjacent region located below the flash end line and adjacent to the flash end line; In the first and second adjacent areas, if the brightness of each pixel in the first and second adjacent areas is smaller than the first threshold, only the pixel data of the target screen is set. If it is larger than the second threshold value which is larger than the first threshold value, only the past screen pixel data is set, and the first threshold value is set. It is preferred to mix the pixel data of the target screen pixel data and the past screen if less above the second threshold.

上記の画像処理装置において、前記フラッシュ検出部は、前記対象画面におけるラインを複数のブロックに分割したそれぞれのブロックのブロック平均輝度を算出するブロック平均輝度算出部(201)と、前記ブロック平均輝度算出部で算出された1ラインにおけるブロック平均輝度に基づいて、前記対象画面におけるそれぞれのラインのライン平均輝度を算出するライン平均輝度算出部(203)と、前記ライン平均輝度算出部で算出された1画面におけるそれぞれのラインのライン平均輝度に基づいて、前記過去の画面の全画面平均輝度を算出する全画面平均輝度算出部(205)と、前記ブロック平均輝度と前記全画面平均輝度との差分と、前記ライン平均輝度と前記全画面平均輝度との差分とをそれぞれ算出する差分算出部(207)と、前記ライン平均輝度と前記全画面平均輝度との差分が第1の閾値以上であり、前記ブロック平均輝度と前記全画面平均輝度との差分が第2の閾値以上である条件が所定ライン以上継続した場合にフラッシュの発光によって高輝度となっていると判定するフラッシュ判定部(208)とを有することが好ましい。   In the image processing apparatus, the flash detection unit includes a block average luminance calculation unit (201) that calculates a block average luminance of each block obtained by dividing a line on the target screen into a plurality of blocks, and the block average luminance calculation. The line average luminance calculation unit (203) that calculates the line average luminance of each line on the target screen based on the block average luminance in one line calculated by the unit, and 1 calculated by the line average luminance calculation unit Based on the line average brightness of each line on the screen, a full screen average brightness calculation unit (205) that calculates the total screen average brightness of the past screen, and the difference between the block average brightness and the total screen average brightness , A difference calculation unit (20 for calculating the difference between the line average luminance and the whole screen average luminance, respectively) ), And the difference between the line average luminance and the whole screen average luminance is a first threshold or more, and the condition that the difference between the block average luminance and the whole screen average luminance is a second threshold or more is a predetermined line. It is preferable to have a flash determination unit (208) that determines that the luminance is high due to flash emission when the above is continued.

また、本発明は、上述した従来の技術の課題を解決するため、フラッシュの発光によって高輝度となっているラインを含むか否かの検出対象となっている画像データ内の対象画面におけるそれぞれのラインのライン平均輝度を算出し、前記対象画面の少なくとも1画面前の画面である過去の画面の全画面平均輝度を算出し、それぞれのラインの前記ライン平均輝度と前記全画面平均輝度とを比較することによって、前記対象画面内のラインがフラッシュの発光によって高輝度となっているか否かを検出し、前記画像データの前記過去の画面を保持部に保持し、前記対象画面内のラインがフラッシュの発光によって高輝度となっていることが検出された場合には、前記対象画面における高輝度となっているラインを前記保持部に保持された前記過去の画面のラインに置換することにより前記画像データを補正し、補正された前記画像データを記録部に記録し、補正されていない状態の前記画像データを表示部に表示させることを特徴とする画像処理方法を提供する。   In addition, in order to solve the above-described problems of the related art, the present invention provides each of the target screens in the image data in the image data to be detected as to whether or not it includes a line that is bright due to flash emission. Calculate the line average luminance of the line, calculate the total screen average luminance of the past screen that is at least one screen before the target screen, and compare the line average luminance of the respective lines with the total screen average luminance By detecting whether or not the line in the target screen has high brightness due to flash emission, the past screen of the image data is held in a holding unit, and the line in the target screen is flashed. When it is detected that the luminance is high due to light emission, the line having high luminance in the target screen is held in the holding unit. The image data is corrected by replacing with a line on the previous screen, the corrected image data is recorded in a recording unit, and the uncorrected image data is displayed on a display unit. An image processing method is provided.

さらに、本発明は、上述した従来の技術の課題を解決するため、コンピュータに、フラッシュの発光によって高輝度となっているラインを含むか否かの検出対象となっている画像データ内の対象画面におけるそれぞれのラインのライン平均輝度を算出する機能と、前記対象画面の少なくとも1画面前の画面である過去の画面の全画面平均輝度を算出する機能と、それぞれのラインの前記ライン平均輝度と前記全画面平均輝度とを比較することによって、前記対象画面内のラインがフラッシュの発光によって高輝度となっているか否かを検出する機能と、前記画像データの前記過去の画面を保持部に保持させる機能と、前記対象画面内のラインがフラッシュの発光によって高輝度となっていることが検出された場合には、前記対象画面における高輝度となっているラインを前記保持部に保持された前記過去の画面のラインに置換することにより前記画像データを補正する機能と、補正された前記画像データを記録部に記録させる機能と、補正されていない状態の前記画像データを表示部に表示させる機能とを実現させることを特徴とする画像処理プログラムを提供する。   Furthermore, in order to solve the above-described problems of the conventional technology, the present invention provides a target screen in image data that is a target of detection as to whether or not the computer includes a line having high brightness due to flash emission. A function for calculating the line average luminance of each line in the above, a function for calculating the whole screen average luminance of a past screen that is at least one screen before the target screen, the line average luminance of each line and the above A function for detecting whether or not a line in the target screen has high luminance due to flash emission by comparing with the average luminance of the entire screen, and holding the past screen of the image data in a holding unit If the function and a line in the target screen are detected to have high brightness due to flash emission, A function of correcting the image data by replacing a line having luminance with the line of the past screen held in the holding unit, a function of recording the corrected image data in the recording unit, and a correction An image processing program is provided that realizes a function of displaying the image data in a state of not being displayed on a display unit.

本発明の画像処理装置、画像処理方法、画像処理プログラムによれば、画面内で画像の明るさが不連続となったことを精度よく検出することができる。また、本発明の画像処理装置、画像処理方法、画像処理プログラムによれば、メモリリソースを増大させることなく、画面内で画像の明るさが不連続となったことを検出することができる。さらに、本発明の画像処理装置、画像処理方法、画像処理プログラムによれば、画像の明るさの不連続を補正した場合に補正処理による遅延を少なくすることができる。   According to the image processing apparatus, the image processing method, and the image processing program of the present invention, it is possible to accurately detect that the brightness of the image is discontinuous in the screen. Further, according to the image processing apparatus, the image processing method, and the image processing program of the present invention, it is possible to detect that the brightness of the image is discontinuous on the screen without increasing the memory resources. Furthermore, according to the image processing apparatus, the image processing method, and the image processing program of the present invention, it is possible to reduce the delay due to the correction process when the brightness discontinuity of the image is corrected.

本発明の画像処理装置の第1実施形態を示すブロック図である。1 is a block diagram showing a first embodiment of an image processing apparatus of the present invention. CMOSセンサを用いた動画像の撮影時にフラッシュの発光によって発生する画像の明るさが不連続となる現象を説明するための図である。It is a figure for demonstrating the phenomenon in which the brightness of the image which generate | occur | produces by light emission of a flash at the time of imaging | photography of a moving image using a CMOS sensor becomes discontinuous. 第1実施形態の画像処理装置における撮影及び記録処理の全体的な流れを示すフローチャートである。It is a flowchart which shows the whole flow of imaging | photography and the recording process in the image processing apparatus of 1st Embodiment. 第1実施形態におけるフラッシュ検出・補正処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the flash detection and correction process in 1st Embodiment. 第1実施形態による画像データの補正を説明するための図である。It is a figure for demonstrating correction | amendment of the image data by 1st Embodiment. 本発明の画像処理装置の第2実施形態を示すブロック図である。It is a block diagram which shows 2nd Embodiment of the image processing apparatus of this invention. 第2実施形態におけるフラッシュ検出・補正処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the flash detection and correction process in 2nd Embodiment. 第2実施形態による効果を説明するための図である。It is a figure for demonstrating the effect by 2nd Embodiment. 第3実施形態におけるフラッシュ検出・補正処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the flash detection and correction process in 3rd Embodiment. 第3実施形態による動作を説明するための隣接領域を示す図である。It is a figure which shows the adjacent area | region for demonstrating the operation | movement by 3rd Embodiment. 第3実施形態による動作を説明するための混合特性を示す図である。It is a figure which shows the mixing characteristic for demonstrating the operation | movement by 3rd Embodiment. 第4実施形態の画像処理装置における撮影及び記録再生処理の全体的な流れを示すフローチャートである。It is a flowchart which shows the whole flow of imaging | photography and the recording / reproducing process in the image processing apparatus of 4th Embodiment. 第4実施形態におけるフラッシュ検出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the flash detection process in 4th Embodiment. 第4実施形態におけるフラッシュ補正処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the flash correction | amendment process in 4th Embodiment. 第4実施形態による画像データの補正を説明するための図である。It is a figure for demonstrating correction | amendment of the image data by 4th Embodiment. 第5実施形態の画像処理装置における撮影及び記録再生処理の全体的な流れを示すフローチャートである。It is a flowchart which shows the whole flow of the imaging | photography and recording / reproducing process in the image processing apparatus of 5th Embodiment. 再生リストを説明するための概念図である。It is a conceptual diagram for demonstrating a reproduction list. 第5実施形態による画像データの補正を説明するための図である。It is a figure for demonstrating correction | amendment of the image data by 5th Embodiment. 第6実施形態の画像処理装置における撮影及び記録処理の全体的な流れを示すフローチャートである。It is a flowchart which shows the whole flow of imaging | photography and the recording process in the image processing apparatus of 6th Embodiment. 第6実施形態におけるフラッシュ補正処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the flash correction | amendment process in 6th Embodiment. 第6実施形態による画像データの補正を説明するための図である。It is a figure for demonstrating correction | amendment of the image data by 6th Embodiment. 第7実施形態におけるフラッシュ検出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the flash detection process in 7th Embodiment.

以下、本発明の画像処理装置、画像処理方法、画像処理プログラムの各実施形態について、添付図面を参照して説明する。各実施形態においては、画像処理装置をビデオカメラに適用し、ビデオカメラで行われる画像処理方法、ビデオカメラに搭載されているコンピュータに画像処理を実行させる画像処理プログラムを例として説明する。   Hereinafter, embodiments of an image processing apparatus, an image processing method, and an image processing program of the present invention will be described with reference to the accompanying drawings. In each embodiment, an image processing apparatus applied to a video camera, an image processing method performed by the video camera, and an image processing program that causes a computer mounted on the video camera to execute image processing will be described as examples.

<第1実施形態>
図1を用いて、第1実施形態の画像処理装置であるビデオカメラ101の全体構成について説明する。ビデオカメラ101は、撮像部1,フラッシュ検出部2,画像信号処理部3,バッファメモリ4,圧縮伸張処理部5,出力信号処理部6,表示部7,フラッシュ補正部8,制御部9,メモリ10,記録再生部11,操作スイッチ12を備える。記録再生部11は、半導体メモリ,ハードディスク・ドライブ等の任意の記録媒体を有する。記録媒体はビデオカメラ101に対して着脱自在であってもよい。
<First Embodiment>
The overall configuration of a video camera 101 that is an image processing apparatus according to the first embodiment will be described with reference to FIG. The video camera 101 includes an imaging unit 1, a flash detection unit 2, an image signal processing unit 3, a buffer memory 4, a compression / decompression processing unit 5, an output signal processing unit 6, a display unit 7, a flash correction unit 8, a control unit 9, a memory 10 includes a recording / reproducing unit 11 and an operation switch 12. The recording / reproducing unit 11 has an arbitrary recording medium such as a semiconductor memory or a hard disk drive. The recording medium may be detachable from the video camera 101.

撮像部1は、レンズや絞り等の光学系(図示せず)、CMOSセンサ1s、露出やピントの制御機構(図示せず)等を有する。一例として、撮像部1は3つのCMOSセンサ1sを有し、3つのCMOSセンサ1sから赤,緑,青それぞれの色信号であるR,G,B信号を示す電気信号を出力する。勿論、CMOSセンサ1sは1つであってもよい。撮像部1は、レンズを介してCMOSセンサ1sに入力された光情報を所定のタイミングで電気信号として取り出し、電気信号をフラッシュ検出部2及び画像信号処理部3に供給する。   The imaging unit 1 includes an optical system (not shown) such as a lens and an aperture, a CMOS sensor 1s, an exposure and focus control mechanism (not shown), and the like. As an example, the imaging unit 1 includes three CMOS sensors 1s, and outputs electrical signals indicating R, G, and B signals that are red, green, and blue color signals from the three CMOS sensors 1s. Of course, the number of CMOS sensors 1s may be one. The imaging unit 1 extracts optical information input to the CMOS sensor 1 s through the lens as an electrical signal at a predetermined timing, and supplies the electrical signal to the flash detection unit 2 and the image signal processing unit 3.

フラッシュ検出部2は、ライン平均輝度算出部21,ライン平均輝度保持部22,全画面平均輝度算出部23,全画面平均輝度保持部24,差分算出部25,フラッシュ判定部26を有する。フラッシュ検出部2は、制御部9による制御に従って以下のようにフラッシュの発光を検出する。   The flash detection unit 2 includes a line average luminance calculation unit 21, a line average luminance holding unit 22, a full screen average luminance calculation unit 23, a full screen average luminance holding unit 24, a difference calculation unit 25, and a flash determination unit 26. The flash detection unit 2 detects the flash emission according to the control by the control unit 9 as follows.

ライン平均輝度算出部21は、撮像部1から供給された電気信号におけるラインごとの明るさの平均を算出する。第1実施形態においては、R,G,B信号の内、G信号に基づいてラインごとの明るさの平均を算出する。具体的には、ライン平均輝度算出部21は、G信号の値を1ラインの有効画素分に渡って加算し、有効画素数で除算することによって1ラインの明るさの平均(ライン平均輝度)を算出する。ライン平均輝度を算出する基にする信号はG信号に限定されるものではない。   The line average luminance calculation unit 21 calculates the average brightness for each line in the electrical signal supplied from the imaging unit 1. In the first embodiment, the average brightness for each line is calculated based on the G signal among the R, G, and B signals. Specifically, the line average luminance calculating unit 21 adds the value of the G signal over the effective pixels of one line, and divides by the number of effective pixels to average the brightness of one line (line average luminance). Is calculated. The signal based on which the line average luminance is calculated is not limited to the G signal.

ライン平均輝度算出部21によって算出されたライン平均輝度は、ライン平均輝度保持部22及び全画面平均輝度算出部23に入力される。ライン平均輝度保持部22は、ライン平均輝度算出部21によって算出されたライン平均輝度を一時的に保持する。全画面平均輝度算出部23は、1画面(1フレーム)全体の明るさの平均を算出する。具体的には、全画面平均輝度算出部23は、順次入力されるライン平均輝度を1画面の有効ラインに渡って加算し、有効ライン数で除算することによって1画面全体の明るさの平均(全画面平均輝度)を算出する。全画面平均輝度保持部24は、全画面平均輝度を一時的に保持する。   The line average luminance calculated by the line average luminance calculation unit 21 is input to the line average luminance holding unit 22 and the full screen average luminance calculation unit 23. The line average luminance holding unit 22 temporarily holds the line average luminance calculated by the line average luminance calculating unit 21. The entire screen average luminance calculation unit 23 calculates the average brightness of one screen (one frame). Specifically, the entire screen average luminance calculation unit 23 adds the average line luminance sequentially input over the effective lines of one screen, and divides by the number of effective lines, thereby averaging the brightness of the entire one screen ( The average luminance of the entire screen) is calculated. The full screen average luminance holding unit 24 temporarily holds the full screen average luminance.

差分算出部25には、ライン平均輝度保持部22で保持されたライン平均輝度と、全画面平均輝度保持部24で保持された全画面平均輝度とが入力される。なお、全画面平均輝度を算出した画面とライン平均輝度を算出した画面とは1画面ずれており、全画面平均輝度を算出した画面は、ライン平均輝度を算出した画面の1画面前の画面である。1画面前の画面の全画面平均輝度を1画面の期間保持しておき、2画面前の画面の全画面平均輝度として用いてもよい。また、1画面前の画面の全画面平均輝度と2画面前の画面の全画面平均輝度との双方を保持し、1画面前の画面がフラッシュの発光の影響を受けている場合に、2画面前の画面の全画面平均輝度を用いるようにしてもよい。   The difference calculating unit 25 receives the line average luminance held by the line average luminance holding unit 22 and the full screen average luminance held by the full screen average luminance holding unit 24. Note that the screen for which the average average luminance is calculated is different from the screen for which the average average luminance is calculated by one screen. The screen for which the average average luminance is calculated is the screen one screen before the screen for which the average average luminance is calculated. is there. The entire screen average brightness of the previous screen may be retained for one screen period and used as the entire screen average brightness of the previous two screens. Also, if both the screen average brightness of the previous screen and the screen average brightness of the previous two screens are retained and the previous screen is affected by the flash emission, You may make it use the whole screen average brightness | luminance of a previous screen.

第1実施形態では、ライン平均輝度を算出している画面を現在の画面、全画面平均輝度を算出した画面を1画面前の画面とする。即ち、現在の画面が、フラッシュの発光によって高輝度となっているラインを含むか否かの検出対象となっている対象画面である。差分算出部25は、現在の画面におけるそれぞれのライン平均輝度と1画面前の画面における全画面平均輝度との差分を順次算出する。差分算出部25は差分の絶対値をとり、差分値として出力する。   In the first embodiment, the screen on which the line average brightness is calculated is the current screen, and the screen on which the total screen average brightness is calculated is the previous screen. That is, the current screen is a target screen that is a target for detection as to whether or not it includes a line that is bright due to flash emission. The difference calculation unit 25 sequentially calculates the difference between each line average luminance on the current screen and the entire screen average luminance on the previous screen. The difference calculation unit 25 takes the absolute value of the difference and outputs it as a difference value.

差分算出部25によって算出された差分値は、フラッシュ判定部26に入力される。フラッシュ判定部26は、ラインごとの差分値が設定された閾値以上であるか否かを判定するとともに、差分値が閾値以上である状態が予め設定したライン数以上継続するか否かを判定する。フラッシュ判定部26は、差分値が閾値以上である状態が予め設定したライン数以上継続したと判定した場合に、フラッシュの発光によって画像の明るさが不連続となったと検出する。フラッシュ判定部26は、フラッシュが発光したことを示す検出信号と併せて、フラッシュの発光の開始時点である差分値が閾値以上となった最初のライン番号を示すデータと、差分値が閾値未満となった最初のライン番号を示すデータとを出力する。差分値が閾値未満となった最初のラインの1ライン前のラインがフラッシュの発光の最終ラインである。   The difference value calculated by the difference calculation unit 25 is input to the flash determination unit 26. The flash determination unit 26 determines whether or not the difference value for each line is equal to or greater than a set threshold value, and determines whether or not the state where the difference value is equal to or greater than the threshold value continues for a preset number of lines. . When it is determined that the state where the difference value is equal to or greater than the threshold value continues for a preset number of lines or more, the flash determination unit 26 detects that the brightness of the image is discontinuous due to flash emission. The flash determination unit 26, together with the detection signal indicating that the flash is emitted, the data indicating the first line number when the difference value at the start of flash emission is equal to or greater than the threshold, and the difference value is less than the threshold. The data indicating the first line number is output. The line one line before the first line where the difference value is less than the threshold is the last line of flash emission.

なお、フラッシュ判定部26は、例えば、フラッシュが発光したと判定した場合にはフラッシュが発光したことを示す検出信号として“1”を、フラッシュが発光しなかったと判定した場合にはフラッシュが発光しなかったことを示す検出信号として“0”を生成すればよい。   For example, the flash determination unit 26 sets “1” as a detection signal indicating that the flash is emitted when it is determined that the flash is emitted, and the flash is emitted when it is determined that the flash is not emitted. What is necessary is just to produce | generate "0" as a detection signal which shows not having existed.

以上の説明より分かるように、フラッシュ検出部2は、ライン平均輝度、全画面平均輝度、差分値を算出し、差分値を判定してフラッシュの発光を検出するだけであるので、フレームメモリのような大容量のメモリリソースを備える必要はない。なお、ここではフラッシュの発光を検出としたが、上記のように、フラッシュと同様の発光期間が短く強い光がCMOSセンサ1sに入射した場合にもフラッシュ検出部2は画像の明るさが不連続となったことを検出する。このような場合も含めてフラッシュの発光の検出とする。   As can be seen from the above description, the flash detection unit 2 only calculates line average brightness, full screen average brightness, and difference value, and determines the difference value to detect flash emission. It is not necessary to provide a large memory resource. Note that although the flash emission is detected here, as described above, the flash detection unit 2 also has a discontinuous image brightness even when strong light having a short emission period is incident on the CMOS sensor 1s. It detects that it became. Including such a case, the flash emission is detected.

フラッシュ検出部2は、現在の画面におけるそれぞれのラインのライン平均輝度と、例えば1画面前の画面である過去の画面の全画面平均輝度とを比較するので、画面の一部のラインがフラッシュの発光によって高輝度となっている場合には、高輝度となっている全てのラインで差分値が閾値以上となる。仮に現在の画面内で隣接するラインのライン平均輝度を比較した場合には、正常なラインと高輝度となったラインの境界のみしか差分値が閾値以上とならない。従って、本実施形態においては、画面内で画像の明るさが不連続となったことを誤検出少なく検出することが可能である。   The flash detection unit 2 compares the line average brightness of each line on the current screen with, for example, the screen average brightness of the past screen which is the previous screen, so that some lines of the screen are flashed. When the luminance is high due to light emission, the difference value is equal to or greater than the threshold value for all lines having high luminance. If the average line brightness of adjacent lines in the current screen is compared, the difference value is equal to or greater than the threshold value only at the boundary between the normal line and the line with high brightness. Therefore, in the present embodiment, it is possible to detect that the brightness of the image is discontinuous on the screen with few false detections.

画像信号処理部3は、撮像部1から供給された電気信号を所定の信号方式に変換する。上記のように第1実施形態におていは、電気信号はR,G,B信号であるため、ホワイトバランスやゲインを調整し、ガンマ処理等を行った後に、輝度信号Yと色差信号Cb,Crに変換する。フラッシュ検出部2は、輝度信号Yに基づいてライン平均輝度及び全画面平均輝度を算出してもよい。バッファメモリ(保持部)4は、画像信号処理部3より出力された輝度信号Yと色差信号Cb,Crの画像データを一時的に保持する。色差信号Cb,Crを帯域制限して輝度信号Yと時間軸多重すれば、画像処理に必要なメモリや演算リソースを少なくすることができる。   The image signal processing unit 3 converts the electrical signal supplied from the imaging unit 1 into a predetermined signal system. As described above, in the first embodiment, since the electrical signals are R, G, and B signals, after adjusting the white balance and gain and performing gamma processing, the luminance signal Y and the color difference signals Cb, Convert to Cr. The flash detection unit 2 may calculate the line average luminance and the full screen average luminance based on the luminance signal Y. The buffer memory (holding unit) 4 temporarily holds the image data of the luminance signal Y and the color difference signals Cb and Cr output from the image signal processing unit 3. If the color difference signals Cb and Cr are band-limited and the luminance signal Y is time-axis multiplexed, memory and calculation resources necessary for image processing can be reduced.

フラッシュの発光が検出された場合には、画像信号処理部3からバッファメモリ4へと入力されて保持された画像データが後述するフラッシュ補正部8による画像データの補正処理の際に用いられる。   When the flash emission is detected, the image data input from the image signal processing unit 3 to the buffer memory 4 and held therein is used in the image data correction processing by the flash correction unit 8 described later.

圧縮伸張処理部5は、バッファメモリ4より読み出した画像データをMPEG-2,MPEG-4 AVC/H.264,JPEG等の圧縮方式によって圧縮処理して符号化データを生成するとともに、記録再生部11に記録された符号化データを再生して読み出した場合に符号化データを伸張処理する。   The compression / decompression processing unit 5 compresses the image data read from the buffer memory 4 by a compression method such as MPEG-2, MPEG-4 AVC / H.264, JPEG, etc. to generate encoded data, and also records and reproduces the data. When the encoded data recorded in 11 is reproduced and read, the encoded data is decompressed.

出力信号処理部6は、バッファメモリ4より読み出した画像データを外部機器(図示せず)に出力するとともに、後段の表示部7の入力フォーマットに合わせて例えばNTSC信号方式に変換し、表示部7の表示画面の大きさに合わせて画像データのサイズを変更する。これによって、画像データは表示部7に表示可能なデータとなり、表示部7に供給されて表示される。出力信号処理部6には制御部9から出力されたオンスクリーン信号も入力され、出力信号処理部6はオンスクリーン信号を画像データに重畳する。   The output signal processing unit 6 outputs the image data read from the buffer memory 4 to an external device (not shown) and converts it to, for example, the NTSC signal system in accordance with the input format of the display unit 7 at the subsequent stage. The size of the image data is changed according to the size of the display screen. As a result, the image data becomes data that can be displayed on the display unit 7 and is supplied to the display unit 7 for display. The on-screen signal output from the control unit 9 is also input to the output signal processing unit 6, and the output signal processing unit 6 superimposes the on-screen signal on the image data.

フラッシュ補正部8には、フラッシュ判定部26より出力された検出信号が入力される。フラッシュ補正部8は、補正制御部81と補正処理部82とを有する。フラッシュ補正部8は、制御部9による制御に従って、フラッシュの発光によって明るさが不連続となった画像データを補正する。フラッシュ検出部2がフラッシュの発光を検出した場合には、補正制御部81にはフラッシュが発光したことを示す検出信号(“1”)と、フラッシュ発光の最初のライン番号及びフラッシュ発光終了後の最初のライン番号を示すデータとが入力される。フラッシュ発光終了後の最初のライン番号を示すデータの代わりに、フラッシュ発光の最終のライン番号を示すデータを入力してもよい。フラッシュ検出部2がフラッシュの発光を検出しなかった場合には、補正制御部81にはフラッシュが発光しなかったことを示す検出信号(“0”)が入力される。   The detection signal output from the flash determination unit 26 is input to the flash correction unit 8. The flash correction unit 8 includes a correction control unit 81 and a correction processing unit 82. The flash correction unit 8 corrects image data whose brightness has become discontinuous due to flash emission under the control of the control unit 9. When the flash detection unit 2 detects the flash emission, the correction control unit 81 detects the flash emission signal (“1”), the first line number of the flash emission, and after the flash emission ends. Data indicating the first line number is input. Instead of data indicating the first line number after the end of flash emission, data indicating the last line number of flash emission may be input. When the flash detection unit 2 does not detect the flash emission, the correction control unit 81 receives a detection signal (“0”) indicating that the flash did not emit.

制御部9には、後述する低遅延モードと画面単位切換モードとのいずれかが設定されている。フラッシュ検出部2及びフラッシュ補正部8は、制御部9に設定されているモードの情報を参照する。補正制御部81は、補正処理部82が制御部9に設定されているモードに応じた補正処理動作を実行するよう補正処理部82を制御する。なお、画面単位切換モードは必須ではなく、必要に応じて低遅延モードと画面単位切換モードとを選択するようにすればよい。   The control unit 9 is set with either a low delay mode or a screen unit switching mode, which will be described later. The flash detection unit 2 and the flash correction unit 8 refer to the mode information set in the control unit 9. The correction control unit 81 controls the correction processing unit 82 so that the correction processing unit 82 executes a correction processing operation corresponding to the mode set in the control unit 9. Note that the screen unit switching mode is not essential, and the low delay mode and the screen unit switching mode may be selected as necessary.

まず、フラッシュ検出部2がフラッシュの発光を検出しなかった場合の補正処理部82の動作について説明する。低遅延モードに設定されている場合、補正処理部82は、画像信号処理部3より出力されて補正処理部82へと入力された画像データをそのままバッファメモリ4へと供給する。バッファメモリ4から読み出された画像データは、圧縮伸張処理部5及び出力信号処理部6へと供給されて、上述した圧縮伸張処理部5と出力信号処理部6とにおけるそれぞれの処理が行われる。   First, the operation of the correction processing unit 82 when the flash detection unit 2 does not detect the flash emission will be described. When the low delay mode is set, the correction processing unit 82 supplies the image data output from the image signal processing unit 3 and input to the correction processing unit 82 to the buffer memory 4 as it is. The image data read from the buffer memory 4 is supplied to the compression / decompression processing unit 5 and the output signal processing unit 6, and the respective processes in the compression / decompression processing unit 5 and the output signal processing unit 6 are performed. .

画面単位切換モードに設定されている場合、補正処理部82には、画像信号処理部3からバッファメモリ4へと入力されて読み出された1画面遅延の画像データが入力され、補正処理部82は、入力された1画面遅延の画像データをそのままバッファメモリ4へと供給する。同様に、バッファメモリ4から読み出された画像データは、圧縮伸張処理部5及び出力信号処理部6へと供給されて、上述した圧縮伸張処理部5と出力信号処理部6とにおけるそれぞれの処理が行われる。   When the screen unit switching mode is set, the correction processing unit 82 is inputted with the image data of one-screen delay input and read from the image signal processing unit 3 to the buffer memory 4, and the correction processing unit 82. Supplies the input image data with one screen delay to the buffer memory 4 as it is. Similarly, the image data read from the buffer memory 4 is supplied to the compression / decompression processing unit 5 and the output signal processing unit 6, and the respective processes in the compression / decompression processing unit 5 and the output signal processing unit 6 described above. Is done.

次に、フラッシュ検出部2がフラッシュの発光を検出した場合の補正処理部82の動作について説明する。低遅延モードに設定されている場合、補正処理部82は、画像信号処理部3からバッファメモリ4へと入力された1画面遅延の画像データを読み出す。補正処理部82は、画像信号処理部3より出力されて補正処理部82へと入力された画像データにおけるフラッシュの発光によって明るさが不連続となった複数のラインを、バッファメモリ4から読み出した1画面遅延の画像データにおける対応する複数のラインに置換することによって画像データを補正する。補正処理部82によって補正された画像データは、同様に、バッファメモリ4を介して圧縮伸張処理部5及び出力信号処理部6へと供給される。   Next, the operation of the correction processing unit 82 when the flash detection unit 2 detects the flash emission will be described. When the low delay mode is set, the correction processing unit 82 reads the image data with one screen delay input from the image signal processing unit 3 to the buffer memory 4. The correction processing unit 82 reads, from the buffer memory 4, a plurality of lines whose brightness is discontinuous due to flash emission in the image data output from the image signal processing unit 3 and input to the correction processing unit 82. The image data is corrected by replacing with a plurality of corresponding lines in the image data with one screen delay. Similarly, the image data corrected by the correction processing unit 82 is supplied to the compression / decompression processing unit 5 and the output signal processing unit 6 via the buffer memory 4.

バッファメモリ4によって画像信号処理部3より出力された画像データを2画面分遅延させて、補正処理部82へと入力された画像データにおけるフラッシュの発光によって明るさが不連続となった複数のラインを、2画面遅延の画像データにおける対応する複数のラインに置換してもよい。   A plurality of lines in which the image data output from the image signal processing unit 3 by the buffer memory 4 is delayed by two screens and the brightness becomes discontinuous due to flash emission in the image data input to the correction processing unit 82. May be replaced with a plurality of corresponding lines in the image data with two screen delays.

画面単位切換モードに設定されている場合、補正処理部82は、入力された1画面遅延の画像データにおけるフラッシュの発光によって明るさが不連続となった複数のラインを含む画面を過去の画面に置換することによって画像データを補正する。補正処理部82によって補正された画像データは、同様に、バッファメモリ4を介して圧縮伸張処理部5及び出力信号処理部6へと供給される。   When the screen unit switching mode is set, the correction processing unit 82 converts a screen including a plurality of lines whose brightness becomes discontinuous due to flash emission in the input one-screen delay image data to a past screen. The image data is corrected by the replacement. Similarly, the image data corrected by the correction processing unit 82 is supplied to the compression / decompression processing unit 5 and the output signal processing unit 6 via the buffer memory 4.

画面単位切換モードを設ける場合には、バッファメモリ4は、画像信号処理部3より出力された画像データを少なくとも2画面分、保持する必要がある。フラッシュの発光のタイミングによっては、3画面の期間分過去の画面が必要となる。なお、第1実施形態では、バッファメモリ4は画像データを3画面分、保持することとする。低遅延モードのみとする場合には、バッファメモリ4は画像データを少なくとも1画面分、保持すればよい。   When the screen unit switching mode is provided, the buffer memory 4 needs to hold the image data output from the image signal processing unit 3 for at least two screens. Depending on the timing of flash emission, a past screen is required for a period of three screens. In the first embodiment, the buffer memory 4 holds image data for three screens. When only the low delay mode is set, the buffer memory 4 may hold at least one screen of image data.

制御部9は、CPUを有するマイクロコンピュータによって構成することができる。制御部9はビデオカメラ101の全体を制御する制御プログラムを記憶した記憶部を有し、制御プログラムに基づいてビデオカメラ101の全体を制御する。第1実施形態による画像処理を画像処理プログラムによって実現する場合には、制御プログラムの一部として第1実施形態の画像処理を実行させる画像処理プログラムを含むようにすればよい。この場合、制御部9は画像処理プログラムを実行させてフラッシュの発光を検出し、フラッシュが発光した場合に画像データを補正する。   The control unit 9 can be configured by a microcomputer having a CPU. The control unit 9 has a storage unit that stores a control program for controlling the entire video camera 101, and controls the entire video camera 101 based on the control program. When the image processing according to the first embodiment is realized by an image processing program, an image processing program for executing the image processing according to the first embodiment may be included as a part of the control program. In this case, the control unit 9 executes the image processing program to detect flash emission, and corrects the image data when the flash emits light.

制御部9には、制御部9の作業用メモリとしてのメモリ10が接続されている。また、制御部9には、記録再生部11と操作スイッチ12とが接続されている。制御部9は操作スイッチ12によって撮像した動画像を記録する指示がなされたら、圧縮伸張処理部5より出力された符号化データを記録再生部11に記録するよう制御する。また、制御部9は操作スイッチ12によって撮像した動画像を記録する指示がなされたら、記録再生部11に符号化データを再生させて読み出し、圧縮伸張処理部5へと供給するよう制御する。制御部9は、操作スイッチ12による操作に従ってオンスクリーン信号を発生して、出力信号処理部6へと供給する。   A memory 10 as a working memory of the control unit 9 is connected to the control unit 9. In addition, a recording / reproducing unit 11 and an operation switch 12 are connected to the control unit 9. When the control unit 9 is instructed to record the moving image captured by the operation switch 12, the control unit 9 controls to record the encoded data output from the compression / decompression processing unit 5 in the recording / reproducing unit 11. Further, when an instruction to record a moving image captured by the operation switch 12 is given, the control unit 9 controls the recording / reproducing unit 11 to reproduce and read out the encoded data and supply it to the compression / decompression processing unit 5. The control unit 9 generates an on-screen signal according to an operation by the operation switch 12 and supplies it to the output signal processing unit 6.

図1では、フラッシュ検出部2をハードウェアにて構成した例を示しているが、ソフトウェアによって構成してもよい。即ち、第1実施形態の画像処理プログラムの一部であるフラッシュ検出プログラムを実行させることによって、フラッシュ検出部2と同等の構成を実現してもよい。また、フラッシュ補正部8もソフトウェアによって構成してもよい。即ち、第1実施形態の画像処理プログラムの一部であるフラッシュ補正プログラムを実行させることによって、フラッシュ補正部8と同等の構成を実現してもよい。   Although FIG. 1 shows an example in which the flash detection unit 2 is configured by hardware, it may be configured by software. That is, a configuration equivalent to the flash detection unit 2 may be realized by executing a flash detection program that is a part of the image processing program of the first embodiment. The flash correction unit 8 may also be configured by software. That is, a configuration equivalent to the flash correction unit 8 may be realized by executing a flash correction program that is a part of the image processing program of the first embodiment.

ここで、図2を用いて、動画像の撮影時に撮影者以外の他者のフラッシュが発光した場合に発生する画像の明るさが不連続となる現象について説明する。ローリングシャッタ方式を採用するCMOSセンサ1sはラインLn単位で撮像した画素データを読み出していくので、撮像部1による被写体の撮像ST1,ST2,ST3,ST4…は、図2(b)に示すように、画面の最初のラインLnから最後のラインLnまでタイミングが時間方向に順次ずれていく。1つのラインLnの撮像は、図2の(a)に示すように、露光時間と画素データの読み出し時間とを含む。   Here, with reference to FIG. 2, a phenomenon in which the brightness of the image that occurs when the flash of another person other than the photographer emits light when shooting a moving image is discontinuous will be described. Since the CMOS sensor 1s adopting the rolling shutter system reads out pixel data imaged in units of line Ln, subject imaging ST1, ST2, ST3, ST4... By the imaging unit 1 is as shown in FIG. The timing sequentially shifts in the time direction from the first line Ln to the last line Ln on the screen. The imaging of one line Ln includes an exposure time and a pixel data readout time, as shown in FIG.

撮像部1による撮像ST1,ST2,ST3,ST4…によって、撮像部1からは図2の(c)に示すように、有効データD1,D2,D3,D4…が出力される。時刻t1にて他者のフラッシュによる発光FLがあり、CMOSセンサ1sに入射したとする。この場合、撮像ST2の一点鎖線で示す位置から最後のラインLnまでの各ラインLnと、撮像ST3の最初のラインLnから一点鎖線で示す位置までの各ラインLnは発光FLによる影響を受けることになる。   As shown in (c) of FIG. 2, the effective data D1, D2, D3, D4... Are output from the imaging unit 1 by the imaging ST1, ST2, ST3, ST4. It is assumed that there is a light emission FL caused by another person's flash at time t1 and enters the CMOS sensor 1s. In this case, each line Ln from the position indicated by the alternate long and short dash line to the last line Ln and each line Ln from the first line Ln to the position indicated by the alternate long and short dash line of the imaging ST3 are affected by the light emission FL. Become.

第1実施形態による画像データの補正を行わないとすると、表示部7に表示される画像(記録再生部11に記録される画像)Im1,Im2,Im3,Im4…は図2の(d)に示すようになる。画像Im1,Im4は発光FLによる影響を受けておらず、画面の明るさが連続して正常な画像である。画像Im2は、一点鎖線以降の下端部で白帯状に明るくなっており、画像の明るさが不連続となった正常でない画像である。ハッチングを付した部分が高輝度の部分を示す。画像Im3は、上端から一点鎖線までの上端部で同様に白帯状に明るくなっており、画像の明るさが不連続となった正常でない画像である。   If the image data correction according to the first embodiment is not performed, images displayed on the display unit 7 (images recorded on the recording / reproducing unit 11) Im1, Im2, Im3, Im4,... Are shown in FIG. As shown. The images Im1 and Im4 are not affected by the light emission FL, and the screen brightness is normal continuously. The image Im2 is an abnormal image in which the lower end portion after the one-dot chain line is brightened in a white band shape, and the brightness of the image is discontinuous. A hatched portion indicates a portion with high luminance. The image Im3 is an abnormal image in which the upper end portion from the upper end to the alternate long and short dash line is similarly brightened in a white band shape, and the brightness of the image becomes discontinuous.

なお、撮影者が所有するビデオカメラ101のフラッシュを発光させる場合には、フラッシュの発光のタイミングを図2の(b)に示す撮像のタイミングと合わせるので、図2の(d)に示すような画像の明るさが不連続となる現象は発生しない。   Note that when the flash of the video camera 101 owned by the photographer is emitted, the flash emission timing is matched with the imaging timing shown in FIG. 2B, and as shown in FIG. The phenomenon that the brightness of the image becomes discontinuous does not occur.

図3,図4を用いて、第1実施形態によるビデオカメラ101の動作についてさらに詳細に説明する。図3は、ビデオカメラ101による撮影及び記録処理の全体的な流れを示している。図3において、制御部9は、ステップS1にて、操作スイッチ12による撮影開始の指示があったか否かを判定する。撮影開始の指示があったと判定されれば(YES)、制御部9は、ステップS2にて、絞り及びシャッタースピード等の条件に合わせて撮像部1を制御して撮影を開始させる。なお、操作スイッチ12によるビデオカメラ101の電源投入の指示を撮影開始の指示としてもよい。撮影開始の指示があったと判定されなければ(NO)、制御部9は処理をステップS1に戻してステップS1を繰り返す。   The operation of the video camera 101 according to the first embodiment will be described in more detail with reference to FIGS. FIG. 3 shows the overall flow of shooting and recording processing by the video camera 101. In FIG. 3, the control unit 9 determines whether or not there is an instruction to start shooting with the operation switch 12 in step S <b> 1. If it is determined that there is an instruction to start shooting (YES), the control unit 9 starts shooting by controlling the imaging unit 1 in accordance with conditions such as an aperture and a shutter speed in step S2. Note that an instruction to turn on the video camera 101 by the operation switch 12 may be an instruction to start shooting. If it is not determined that there is an instruction to start shooting (NO), the control unit 9 returns the process to step S1 and repeats step S1.

制御部9は、ステップS3にて、フラッシュ検出部2によるフラッシュ検出処理及びフラッシュ補正部8によるフラッシュ補正処理を実行させる。また、制御部9は、ステップS3と並行して、ステップS4にて、画像信号処理部3による画像信号処理を実行させる。ステップS3のフラッシュ検出・補正処理の詳細については後述する。制御部9は、ステップS5にて、出力信号処理部6を制御して表示部7に撮影した画像を表示させる。   In step S <b> 3, the control unit 9 causes the flash detection process by the flash detection unit 2 and the flash correction process by the flash correction unit 8 to be executed. The control unit 9 causes the image signal processing unit 3 to execute image signal processing in step S4 in parallel with step S3. Details of the flash detection / correction processing in step S3 will be described later. In step S5, the control unit 9 controls the output signal processing unit 6 to display the captured image on the display unit 7.

制御部9は、ステップS6にて、操作スイッチ12による記録開始の指示があったか否かを判定する。記録開始の指示があったと判定されれば(YES)、制御部9は、ステップS7にて、圧縮伸張処理部5より出力された符号化データを記録再生部11に記録させる。記録開始の指示があったと判定されなければ(NO)、制御部9は、処理をステップS10に移行させる。   In step S <b> 6, the control unit 9 determines whether or not there is an instruction to start recording by the operation switch 12. If it is determined that there is an instruction to start recording (YES), the control unit 9 causes the recording / reproducing unit 11 to record the encoded data output from the compression / decompression processing unit 5 in step S7. If it is not determined that there is an instruction to start recording (NO), the control unit 9 shifts the process to step S10.

制御部9は、ステップS8にて、記録終了の指示があったか否かを判定する。記録終了の指示があったと判定されれば(YES)、制御部9は、ステップS9にて、記録再生部11への記録を停止させる。記録終了の指示があったと判定されなければ(NO)、制御部9は処理をステップS7に戻してステップS7を繰り返す。そして、制御部9は、ステップS10にて、操作スイッチ12による撮影終了の指示があったか否かを判定する。撮影終了の指示があったと判定されれば(YES)、制御部9は処理を終了させる。撮影終了の指示があったと判定されなければ(NO)、制御部9は、処理をステップS2に戻してステップS2以降を繰り返す。操作スイッチ12によるビデオカメラ101の電源切断の指示を撮影終了の指示としてもよい。   In step S8, the controller 9 determines whether or not there is an instruction to end recording. If it is determined that there is an instruction to end recording (YES), the control unit 9 stops recording in the recording / reproducing unit 11 in step S9. If it is not determined that there is an instruction to end recording (NO), the control unit 9 returns the process to step S7 and repeats step S7. Then, in step S10, the control unit 9 determines whether or not there has been an instruction to end shooting using the operation switch 12. If it is determined that there is an instruction to end shooting (YES), the control unit 9 ends the process. If it is not determined that there is an instruction to end shooting (NO), the control unit 9 returns the process to step S2 and repeats step S2 and subsequent steps. An instruction to turn off the power of the video camera 101 by the operation switch 12 may be used as an instruction to end shooting.

図4を用いて、図3に示すステップS3のフラッシュ検出・補正処理の詳細について説明する。以下の各ステップは、制御部9による制御に基づいてフラッシュ検出部2及びフラッシュ補正部8によって実行される。第1実施形態におけるステップS3をステップS3とする。 Details of the flash detection / correction processing in step S3 shown in FIG. 3 will be described with reference to FIG. The following steps are executed by the flash detection unit 2 and the flash correction unit 8 based on control by the control unit 9. Step S3 in the first embodiment and step S3 1.

図4において、フラッシュ検出部2は、ステップS301にて、有効ラインにおける有効画素の画素値を加算する処理を有効ラインごとに順次実行する。有効ラインとは垂直ブランキング期間を除く期間のラインであり、有効画素とは水平ブランキング期間を除く期間の画素である。フラッシュ検出部2は、ステップS302にて、ステップS301にて得た画素値の加算値を有効画素数で除算してライン平均輝度を算出し、ライン平均輝度を保持する。   In FIG. 4, in step S301, the flash detection unit 2 sequentially executes a process of adding pixel values of effective pixels in the effective line for each effective line. An effective line is a line in a period excluding a vertical blanking period, and an effective pixel is a pixel in a period excluding a horizontal blanking period. In step S302, the flash detection unit 2 calculates the line average luminance by dividing the addition value of the pixel values obtained in step S301 by the number of effective pixels, and holds the line average luminance.

フラッシュ検出部2は、ステップS303にて、ライン平均輝度を順次加算する処理を実行する。フラッシュ検出部2は、ステップS304にて、ステップS302で算出したライン平均輝度と1画面前の全画面平均輝度との差分演算処理を実行する。ステップS304における差分演算処理は、ステップS302でライン平均輝度を算出するたびに実行される。フラッシュ検出部2は、ステップS305にて、差分値が閾値以上のラインを検出したか否かを判定する。この際の閾値は被写体の状況によって変化するが、実験によって最適な値を求めて設定すればよく、他者のフラッシュの発光によって明るさが大きく変化した状態を検出するため、入力されたG信号のダイナミックレンジよりも十分に大きい値とすることが好ましい。なお、閾値を小さくするほど、フラッシュ発光の検出感度を高めることができる。なお、ステップS3でフラッシュ検出・補正処理を開始する際、最初の1画面はそれ以前の画面の全画面平均輝度が保存されていないため、差分値を算出しないようにするとよい。   In step S303, the flash detection unit 2 executes a process of sequentially adding the line average luminance. In step S304, the flash detection unit 2 executes a difference calculation process between the line average luminance calculated in step S302 and the entire screen average luminance of the previous screen. The difference calculation process in step S304 is executed every time the line average luminance is calculated in step S302. In step S305, the flash detection unit 2 determines whether a line having a difference value equal to or greater than a threshold value is detected. The threshold value at this time varies depending on the condition of the subject, but an optimum value may be obtained and set by experiment. In order to detect a state in which the brightness has greatly changed due to the flash emission of the other person, the input G signal It is preferable that the value be sufficiently larger than the dynamic range. In addition, the detection sensitivity of flash emission can be increased as the threshold value is decreased. Note that when the flash detection / correction process is started in step S3, it is preferable not to calculate the difference value because the average brightness of the entire screen of the previous one screen is not saved.

差分値が閾値以上のラインを検出したと判定されれば(YES)、フラッシュ検出部2は、処理をステップS306に移行させる。なお、この際、フラッシュ検出部2は、検出したラインがフレームの最初のラインから何ライン目かを示す検出ライン情報を記憶しておく。記憶する検出ライン情報はラインが連続して検出される場合は最初の1ライン目のみでよい。一方、差分値が閾値以上のラインを検出したと判定されなければ(NO)、フラッシュ検出部2は、既に検出ライン情報を記憶している場合は、それを消去するとともに、処理をステップS314に移行させる。差分値が閾値以上のラインを検出しなければ、フラッシュは発光していないということである。   If it is determined that a line having a difference value equal to or greater than the threshold value is detected (YES), the flash detection unit 2 shifts the process to step S306. At this time, the flash detection unit 2 stores detected line information indicating the number of detected lines from the first line of the frame. The detected line information to be stored may be only the first line when the lines are continuously detected. On the other hand, if it is not determined that a line having a difference value equal to or greater than the threshold value has been detected (NO), the flash detection unit 2 deletes the detected line information if already stored, and the process proceeds to step S314. Transition. If no line with a difference value equal to or greater than the threshold value is detected, the flash is not emitting light.

フラッシュ検出部2は、ステップS306にて、差分値が閾値以上である状態が所定ライン数以上継続したか否かを判定する。所定ライン数以上継続したと判定されれば(YES)、フラッシュ検出部2は、処理をステップS307に移行させ、所定ライン数以上継続したと判定されなければ(NO)、フラッシュ検出部2は、処理をステップS314に移行させる。   In step S306, the flash detection unit 2 determines whether or not the state where the difference value is equal to or greater than the threshold value continues for a predetermined number of lines or more. If it is determined that the predetermined number of lines or more have been continued (YES), the flash detecting unit 2 shifts the process to step S307. If it is not determined that the predetermined number of lines or more has been continued (NO), the flash detecting unit 2 The process proceeds to step S314.

ステップS306を設けることによって、ステップS305での閾値を小さくしたとしても誤検出を防止することができる。ステップS306でのライン数も実験によって最適な値を求めて設定すればよい。差分値が閾値以上のラインを検出したとしても、差分値が閾値以上である状態が所定ライン数以上継続しなかった場合は、フラッシュは発光していないと判断することができる。   By providing step S306, erroneous detection can be prevented even if the threshold value in step S305 is reduced. The number of lines in step S306 may be set by obtaining an optimum value by experiment. Even if a line having a difference value equal to or greater than the threshold value is detected, if the state where the difference value is equal to or greater than the threshold value has not continued for a predetermined number of lines, it can be determined that the flash is not emitting light.

ステップS306にて所定ライン数以上継続したと判定された場合には、フラッシュが発光したということである。そこで、フラッシュ検出部2は、ステップS307にて、フラッシュが発光していないことを示す検出信号“0”からフラッシュが発光したことを示す検出信号“1”へと切り換え、この切り換えた検出信号と、記憶している検出ライン情報とをフラッシュ補正部8に供給するとともに、検出ライン情報を消去する。フラッシュ検出部2及びフラッシュ補正部8は、ステップS308にて、設定されているモードが低遅延モードであるか否かを判定する。低遅延モードであると判定されれば(YES)、フラッシュ補正部8は、処理をステップS309に移行させる。低遅延モードであると判定されなければ(NO)、フラッシュ検出部2は、処理をステップS316に移行させる。   If it is determined in step S306 that the predetermined number of lines or more have been continued, this means that the flash has been emitted. In step S307, the flash detection unit 2 switches from the detection signal “0” indicating that the flash is not emitting to the detection signal “1” indicating that the flash is emitted, The stored detection line information is supplied to the flash correction unit 8 and the detection line information is erased. In step S308, the flash detection unit 2 and the flash correction unit 8 determine whether or not the set mode is the low delay mode. If it is determined that the mode is the low delay mode (YES), the flash correction unit 8 shifts the processing to step S309. If it is not determined that the mode is the low delay mode (NO), the flash detection unit 2 shifts the process to step S316.

フラッシュ補正部8は、ステップS309にて、供給された検出ライン情報が示す、1画面前のラインへの置換を開始する。フラッシュ検出部2は、ステップS310にて、差分値が閾値未満のラインを検出したか否かを判定する。差分値が閾値未満のラインを検出したと判定されれば(YES)、フラッシュ検出部2は、処理をステップS311に移行させる。なお、この際、フラッシュ検出部2は、検出したラインがフレームの最初のラインから何ライン目かを示す検出ライン情報を記憶しておく。記憶する検出ライン情報はラインが連続して検出される場合は最初の1ライン目のみでよい。一方、差分値が閾値未満のラインを検出したと判定されなければ(NO)、フラッシュ検出部2は、記憶していた検出ライン情報を消去するとともに、処理をステップS314に移行させる。   In step S309, the flash correction unit 8 starts replacement with the previous line indicated by the supplied detection line information. In step S310, the flash detection unit 2 determines whether a line having a difference value less than the threshold value is detected. If it is determined that a line having a difference value less than the threshold value is detected (YES), the flash detection unit 2 shifts the process to step S311. At this time, the flash detection unit 2 stores detected line information indicating the number of detected lines from the first line of the frame. The detected line information to be stored may be only the first line when the lines are continuously detected. On the other hand, if it is not determined that a line having a difference value less than the threshold value has been detected (NO), the flash detection unit 2 deletes the stored detection line information and shifts the process to step S314.

フラッシュ検出部2は、ステップS311にて、差分値が閾値未満である状態が所定ライン数以上継続したか否かを判定する。所定ライン数以上継続したと判定されれば(YES)、フラッシュ検出部2は、処理をステップS312に移行させ、所定ライン数以上継続したと判定されなければ(NO)、フラッシュ検出部2は、処理をステップS314に移行させる。   In step S311, the flash detection unit 2 determines whether or not the state where the difference value is less than the threshold value continues for a predetermined number of lines or more. If it is determined that the predetermined number of lines or more have been continued (YES), the flash detection unit 2 shifts the process to step S312. If it is not determined that the predetermined number of lines or more has been continued (NO), the flash detection unit 2 The process proceeds to step S314.

ステップS311を設けることによって、ステップS310での閾値を小さくしたとしても誤検出を防止することができる。ステップS305での閾値とステップS310での閾値は同じ値である。ステップS311でのライン数も実験によって最適な値を求めて設定すればよい。ステップS306での所定ライン数とステップS311での所定ライン数とは同じでよい。差分値が閾値未満のラインを検出したとしても、差分値が閾値未満である状態が所定ライン数以上継続しなかった場合は、フラッシュの発光は終了していないと判断することができる。   By providing step S311, erroneous detection can be prevented even if the threshold value in step S310 is reduced. The threshold value in step S305 and the threshold value in step S310 are the same value. The number of lines in step S311 may be set by obtaining an optimum value by experiment. The predetermined number of lines in step S306 and the predetermined number of lines in step S311 may be the same. Even if a line having a difference value less than the threshold value is detected, if the state where the difference value is less than the threshold value does not continue for a predetermined number of lines or more, it can be determined that the flash emission has not ended.

フラッシュ検出部2は、ステップS312にて、検出信号“1”を検出信号“0”へと切り換え、この切り換えた検出信号と、記憶している検出ライン情報とをフラッシュ補正部8に供給するとともに検出ライン情報を消去する。フラッシュ補正部8は、ステップS313にて、供給された検出ライン情報が示す、1画面前のラインへの置換を終了し、フラッシュ検出部2は、処理をステップS314に移行させる。フラッシュ検出部2は、ステップS314にて、全有効ラインに対する判定が終了したか否かを判定する。全有効ラインに対する判定が終了したと判定されれば(YES)、フラッシュ検出部2は、処理をステップS315に移行させ、全有効ラインが終了したと判定されなければ(NO)、フラッシュ検出部2は、処理をステップS305に戻してステップS305以降を繰り返す。   In step S312, the flash detection unit 2 switches the detection signal “1” to the detection signal “0”, and supplies the switched detection signal and the stored detection line information to the flash correction unit 8. Delete detection line information. In step S313, the flash correction unit 8 ends the replacement with the previous line indicated by the supplied detection line information, and the flash detection unit 2 moves the process to step S314. In step S314, the flash detection unit 2 determines whether the determination for all active lines has been completed. If it is determined that the determination for all the effective lines is completed (YES), the flash detection unit 2 shifts the process to step S315, and if it is not determined that all the effective lines are completed (NO), the flash detection unit 2 Returns the process to step S305 and repeats step S305 and subsequent steps.

フラッシュ検出部2は、ステップS315にて、ライン平均輝度の加算値を有効ライン数で除算して全画面平均輝度を算出し、全画面平均輝度を保持して、図3のステップS5へと移行させる。   In step S315, the flash detection unit 2 calculates the total screen average brightness by dividing the added value of the line average brightness by the number of effective lines, holds the total screen average brightness, and proceeds to step S5 in FIG. Let

一方、ステップS308にて低遅延モードであると判定されなかった(即ち、画面単位切換モードであると判定された)場合、フラッシュ検出部2は、ステップS316にて、全有効ラインに対する判定が終了したか否かを判定する。全有効ラインに対する判定が終了したと判定されなければ(NO)、フラッシュ検出部2は、ステップS316の処理を繰り返す。全有効ラインに対する判定が終了したと判定されれば(YES)、フラッシュ検出部2は、ステップS317にて、ライン平均輝度の加算値を有効ライン数で除算して全画面平均輝度を算出し、全画面平均輝度を保持する。   On the other hand, if it is not determined in step S308 that the mode is the low delay mode (that is, it is determined that the screen unit switching mode is selected), the flash detection unit 2 ends the determination for all the effective lines in step S316. Determine whether or not. If it is not determined that the determination for all active lines is completed (NO), the flash detection unit 2 repeats the process of step S316. If it is determined that the determination for all the effective lines is completed (YES), in step S317, the flash detection unit 2 calculates the total screen average luminance by dividing the added value of the line average luminance by the number of effective lines. Holds the full screen average brightness.

フラッシュ補正部8は、ステップS318にて、次の画面に移行したか否かを判定する。次の画面に移行したか否かの情報は、フラッシュ検出部2または制御部9からフラッシュ補正部8へと供給すればよい。次の画面に移行したと判定されなければ(NO)、フラッシュ補正部8は、ステップS318の処理を繰り返す。次の画面に移行したと判定されれば(YES)、フラッシュ補正部8は、ステップS319にて、フラッシュの発光が検出された現在の画面を過去の正常画面に置換して、図3のステップS5へと移行させる。   In step S318, the flash correction unit 8 determines whether or not the screen has shifted to the next screen. Information on whether or not the screen has shifted to the next screen may be supplied from the flash detection unit 2 or the control unit 9 to the flash correction unit 8. If it is not determined that the screen has shifted to the next screen (NO), the flash correction unit 8 repeats the process of step S318. If it is determined that the screen has shifted to the next screen (YES), in step S319, the flash correction unit 8 replaces the current screen in which flash emission has been detected with a past normal screen, and the step of FIG. The process proceeds to S5.

図5を用いて、第1実施形態による画像データの補正について説明する。図5の(a)は、図2の(d)に示す補正前の画像Im1,Im2,Im3,Im4…を示している。制御部9に低遅延モードが設定されている場合には、フラッシュ補正部8は次のように画像データを補正する。   Image data correction according to the first embodiment will be described with reference to FIG. FIG. 5A shows images Im1, Im2, Im3, Im4,... Before correction shown in FIG. When the low delay mode is set in the control unit 9, the flash correction unit 8 corrects the image data as follows.

フラッシュ検出部2は、図5の(a)に示す画像Im2においては、図4のステップS305,S306によって、画像Im2における一点鎖線以降の画面の途中から高輝度となっている複数のラインを検出する。画像Im2では、画面の下端のラインまで高輝度となっているので、フラッシュ補正部8は、図4のステップS309以降の処理によって、図5の(a)に示すように、画像Im2におけるハッチングを付した部分の高輝度となっている複数のラインを、画像Im1における対応する複数のラインに置換する。   In the image Im2 shown in FIG. 5A, the flash detection unit 2 detects a plurality of lines having high luminance from the middle of the screen after the one-dot chain line in the image Im2 in steps S305 and S306 in FIG. To do. Since the image Im2 has high brightness up to the bottom line of the screen, the flash correction unit 8 performs hatching in the image Im2 as shown in FIG. The plurality of lines having high luminance in the attached portion are replaced with the corresponding plurality of lines in the image Im1.

フラッシュ検出部2は、図5の(a)に示す画像Im3においては、図4のステップS305,S306によって、画像Im3における画面の上端から高輝度となっている複数のラインを検出する。フラッシュ検出部2は、図4のステップS310,S311によって、画像Im3における一点鎖線以降の正常な画像の複数のラインを検出する。フラッシュ補正部8は、図4のステップS309以降の処理によって、図5の(a)に示すように、画像Im3におけるハッチングを付した部分の高輝度となっている複数のラインを、画像Im2における対応する複数のラインに置換する。   In the image Im3 shown in FIG. 5A, the flash detection unit 2 detects a plurality of lines having high luminance from the upper end of the screen in the image Im3 in steps S305 and S306 in FIG. The flash detection unit 2 detects a plurality of lines of a normal image after the one-dot chain line in the image Im3 by steps S310 and S311 of FIG. As shown in FIG. 5A, the flash correction unit 8 performs a process after step S309 in FIG. 4 to display a plurality of lines with high luminance in the hatched portion in the image Im3 in the image Im2. Replace with multiple corresponding lines.

結果として、フラッシュ補正部8は、図5の(b)に示すように、画像Im2を画像Im2’へと補正し、画像Im3を画像Im3’へと補正する。従って、フラッシュ補正部8からバッファメモリ4へと供給される画像データは、図5の(b)に示す画像Im1,Im2’,Im3’,Im4…となる。ここでは、画像Im3を、画像Im2を用いて補正して画像Im3’としたが、画像Im1を用いて補正してもよい。この場合には、バッファメモリ4は2画面前の画像データを保持しておくことが必要になる。   As a result, the flash correction unit 8 corrects the image Im2 to the image Im2 'and corrects the image Im3 to the image Im3', as shown in FIG. 5B. Therefore, the image data supplied from the flash correction unit 8 to the buffer memory 4 is the images Im1, Im2 ', Im3', Im4,... Shown in FIG. Here, the image Im3 is corrected using the image Im2 to be an image Im3 ', but may be corrected using the image Im1. In this case, the buffer memory 4 needs to hold the image data of the previous two screens.

この低遅延モードでは、画像データの遅延は、画像信号処理部3における信号処理に起因する複数ライン程度の時間であり、実質的にはほとんど遅延がない。例えば、ビデオカメラ101でマニュアルにて動画像を撮影する場合には、表示部7に表示されている画像を確認しながらビデオカメラ101における種々の設定を調整する。画像データに大幅な遅延があると、リアルタイムで画像を確認することができず、適切な操作が困難となる場合がある。第1実施形態による低遅延モードでは遅延がほとんどないので、リアルタイムで画像を確認でき、適切な操作も可能となる。   In this low delay mode, the delay of the image data is a time of about a plurality of lines due to the signal processing in the image signal processing unit 3, and there is substantially no delay. For example, when a moving image is manually captured by the video camera 101, various settings in the video camera 101 are adjusted while confirming the image displayed on the display unit 7. If there is a significant delay in the image data, the image cannot be confirmed in real time, and proper operation may be difficult. Since there is almost no delay in the low delay mode according to the first embodiment, an image can be confirmed in real time, and an appropriate operation can be performed.

一方、制御部9に画面単位切換モードが設定されている場合には、フラッシュ補正部8は次のように画像データを補正する。前述のように、画面単位切換モードが設定されている場合には、フラッシュ補正部8は、画像データの補正の有無にかかわらず、バッファメモリ4から1画面遅延の画像データを読み出してバッファメモリ4を介して圧縮伸張処理部5及び出力信号処理部6へと供給する。従って、図5の(c)に示すように、図5の(a)の補正前の画像Im1,Im2のタイミングで、画像Im1,Im2よりそれぞれ1画面前の画像Im0,Im1が出力される。   On the other hand, when the screen unit switching mode is set in the control unit 9, the flash correction unit 8 corrects the image data as follows. As described above, when the screen unit switching mode is set, the flash correction unit 8 reads the image data of one screen delay from the buffer memory 4 regardless of whether the image data is corrected or not. To the compression / decompression processing unit 5 and the output signal processing unit 6. Accordingly, as shown in FIG. 5C, images Im0 and Im1 that are one screen before the images Im1 and Im2, respectively, are output at the timing of the images Im1 and Im2 before correction in FIG.

フラッシュ補正部8は、図4のステップS319によって、高輝度部分を有する画像Im2の代わりに画像Im1を出力し、高輝度部分を有する画像Im3の代わりに画像Im1を出力する。従って、フラッシュ補正部8からバッファメモリ4へと供給される画像データは、図5の(c)に示す画像Im0,Im1,Im1,Im1,Im4…となる。この場合、高輝度部分を有する画像が2画面連続しているので、バッファメモリ4は3画面前の画像データを保持しておくことが必要になる。   In step S319 of FIG. 4, the flash correction unit 8 outputs the image Im1 instead of the image Im2 having the high luminance part, and outputs the image Im1 instead of the image Im3 having the high luminance part. Accordingly, the image data supplied from the flash correction unit 8 to the buffer memory 4 is the images Im0, Im1, Im1, Im1, Im4,... Shown in FIG. In this case, since two images having a high-luminance portion are continuous, it is necessary for the buffer memory 4 to hold the image data of the previous three screens.

<第2実施形態>
図7に示す第2実施形態において、図1と同一部分には同一符号を付し、その説明を適宜省略することとする。第2実施形態の画像処理装置であるビデオカメラ102は、フラッシュ検出部2の代わりにフラッシュ検出部20を備える。フラッシュ検出部20は、ブロック平均輝度算出部201,ブロック平均輝度保持部202,ライン平均輝度算出部203,ライン平均輝度保持部204,全画面平均輝度算出部205,全画面平均輝度保持部206,差分算出部207,フラッシュ判定部208を有する。
Second Embodiment
In the second embodiment shown in FIG. 7, the same parts as those in FIG. 1 are denoted by the same reference numerals, and the description thereof is omitted as appropriate. A video camera 102 as an image processing apparatus according to the second embodiment includes a flash detection unit 20 instead of the flash detection unit 2. The flash detection unit 20 includes a block average luminance calculation unit 201, a block average luminance holding unit 202, a line average luminance calculation unit 203, a line average luminance holding unit 204, a full screen average luminance calculation unit 205, a full screen average luminance holding unit 206, A difference calculation unit 207 and a flash determination unit 208 are included.

フラッシュ検出部20は、制御部9による制御に従って以下のようにフラッシュの発光を検出する。ブロック平均輝度算出部201は、撮像部1から供給された電気信号における1ラインの有効画素を複数のブロックに分割しブロックごとの明るさの平均を算出する。ブロックの数は2のべき乗であることが好ましい。具体的には、ブロック平均輝度算出部201は、G信号の値を各ブロックの有効画素分に渡って加算し、有効画素数で除算することによって1ブロックの明るさの平均(ブロック平均輝度)を算出する。   The flash detection unit 20 detects flash emission according to control by the control unit 9 as follows. The block average luminance calculation unit 201 divides one line of effective pixels in the electrical signal supplied from the imaging unit 1 into a plurality of blocks, and calculates the average brightness for each block. The number of blocks is preferably a power of two. Specifically, the block average luminance calculation unit 201 adds the value of the G signal over the effective pixels of each block, and divides the value by the number of effective pixels to average the brightness of one block (block average luminance). Is calculated.

ブロック平均輝度算出部201によって算出されたブロック平均輝度は、ブロック平均輝度保持部202及びライン平均輝度算出部203に入力される。ライン平均輝度算出部203は、1ラインにおけるブロック平均輝度を加算し、1ラインのブロック数で除算することによって1ラインの明るさの平均(ライン平均輝度)を算出する。ライン平均輝度算出部203によって算出されたライン平均輝度は、ライン平均輝度保持部204及び全画面平均輝度算出部205に入力される。ライン平均輝度保持部204は、ライン平均輝度算出部203によって算出されたライン平均輝度を一時的に保持する。   The block average luminance calculated by the block average luminance calculation unit 201 is input to the block average luminance holding unit 202 and the line average luminance calculation unit 203. The line average luminance calculation unit 203 calculates the average (line average luminance) of the brightness of one line by adding the block average luminance in one line and dividing by the number of blocks in one line. The line average luminance calculated by the line average luminance calculation unit 203 is input to the line average luminance holding unit 204 and the full screen average luminance calculation unit 205. The line average luminance holding unit 204 temporarily holds the line average luminance calculated by the line average luminance calculating unit 203.

全画面平均輝度算出部205は、順次入力されるライン平均輝度を1画面の有効ラインに渡って加算し、有効ライン数で除算することによって1画面全体の明るさの平均(全画面平均輝度)を算出する。全画面平均輝度保持部206は、全画面平均輝度を一時的に保持する。   The total screen average brightness calculation unit 205 adds the average line brightness sequentially input over the effective lines of one screen, and divides by the number of effective lines to average the brightness of the entire screen (average average screen brightness). Is calculated. The full screen average brightness holding unit 206 temporarily holds the full screen average brightness.

差分算出部207には、ブロック平均輝度保持部202で保持されたブロック平均輝度と、ライン平均輝度保持部204で保持されたライン平均輝度と、全画面平均輝度保持部206で保持された全画面平均輝度とが入力される。差分算出部207は、ブロック平均輝度と全画面平均輝度との差分と、ライン平均輝度と全画面平均輝度との差分とをそれぞれ順次算出する。差分算出部207は差分の絶対値をとり、差分値として出力する。   The difference calculation unit 207 includes a block average luminance held by the block average luminance holding unit 202, a line average luminance held by the line average luminance holding unit 204, and a full screen held by the full screen average luminance holding unit 206. The average luminance is input. The difference calculation unit 207 sequentially calculates a difference between the block average luminance and the entire screen average luminance, and a difference between the line average luminance and the entire screen average luminance. The difference calculation unit 207 takes the absolute value of the difference and outputs it as a difference value.

差分算出部207によって算出されたそれぞれの差分値は、フラッシュ判定部208に入力される。フラッシュ判定部208は、ライン平均輝度と全画面平均輝度との差分値が設定された閾値(閾値1)以上であるか否かを判定する。フラッシュ判定部208は、ライン平均輝度と全画面平均輝度との差分値が閾値以上の場合には、それぞれのブロック平均輝度と全画面平均輝度との差分値が設定された閾値(閾値2)以上であるか否かを判定する。閾値1と閾値2とは異なる値であってよい。閾値1と閾値2とは異なる値とする場合には、閾値1よりも閾値2の値を大きくすることが好ましい。   Each difference value calculated by the difference calculation unit 207 is input to the flash determination unit 208. The flash determination unit 208 determines whether or not the difference value between the line average luminance and the entire screen average luminance is equal to or greater than a set threshold (threshold 1). When the difference value between the line average luminance and the entire screen average luminance is equal to or greater than the threshold, the flash determination unit 208 is equal to or greater than the threshold (threshold 2) in which the difference value between the respective block average luminance and the entire screen average luminance is set. It is determined whether or not. The threshold value 1 and the threshold value 2 may be different values. When the threshold value 1 and the threshold value 2 are different from each other, it is preferable to make the value of the threshold value 2 larger than the threshold value 1.

フラッシュ判定部208は、ラインごとの差分値が閾値1以上であり、ブロックごとの差分値が閾値2以上である状態が予め設定したライン数以上継続するか否かを判定する。フラッシュ判定部208は、それぞれの差分値が閾値1,2以上である状態が予め設定したライン数以上継続したと判定した場合に、フラッシュの発光によって画像の明るさが不連続となったと検出する。   The flash determination unit 208 determines whether or not the state where the difference value for each line is equal to or greater than the threshold value 1 and the difference value for each block is equal to or greater than the threshold value 2 continues for a predetermined number of lines or more. The flash determination unit 208 detects that the brightness of the image has become discontinuous due to flash emission when it is determined that the state where the respective difference values are the threshold values 1 and 2 or more continues for a preset number of lines. .

フラッシュ判定部208は、フラッシュが発光したと判定した場合には、フラッシュの発光の開始時点である、ライン平均輝度と全画面平均輝度との差分値が閾値1以上であり、かつそれぞれのブロック平均輝度と全画面平均輝度との差分値が閾値2以上となった最初のライン番号を示すデータと、ライン平均輝度と全画面平均輝度との差分値が閾値1以上と、それぞれのブロック平均輝度と全画面平均輝度との差分値が閾値2以上との少なくとも一方の条件を満たさなくなった最初のライン番号を示すデータとを出力する。フラッシュ判定部208は、フラッシュが発光したことを示す検出信号も出力する。   If the flash determination unit 208 determines that the flash is emitted, the difference value between the line average luminance and the entire screen average luminance, which is the start point of flash emission, is equal to or greater than the threshold 1, and each block average The data indicating the first line number for which the difference value between the luminance and the entire screen average luminance is equal to or greater than the threshold 2, the difference value between the line average luminance and the entire screen average luminance is equal to or greater than the threshold 1, and the respective block average luminances Data indicating the first line number that does not satisfy at least one of the conditions that the difference value with respect to the entire screen average luminance is not less than the threshold value 2 is output. The flash determination unit 208 also outputs a detection signal indicating that the flash has emitted light.

第2実施形態においては、図3に示すステップS3のフラッシュ検出・補正処理を図7に示すステップS3とする。図7を用いて、ステップS3のフラッシュ検出・補正処理の詳細について説明する。図7において、フラッシュ検出部20は、ステップS321にて、有効ラインにおける各ブロックの有効画素の画素値を加算する処理を有効ラインごとに順次実行する。フラッシュ検出部20は、ステップS322にて、ステップS321にて得た各ブロックの画素値の加算値をブロック内の有効画素数で除算してブロック平均輝度を算出し、ブロック平均輝度を保持する。 In the second embodiment, the step S3 2 shown in FIG flash detection and correction in the step S3 shown in FIG. With reference to FIG. 7, details of the flash detection and correction in the step S3 2. In FIG. 7, in step S321, the flash detection unit 20 sequentially executes a process of adding the pixel values of the effective pixels of each block in the effective line for each effective line. In step S322, the flash detection unit 20 calculates the block average luminance by dividing the addition value of the pixel values of each block obtained in step S321 by the number of effective pixels in the block, and holds the block average luminance.

フラッシュ検出部20は、ステップS323にて、1ライン内のブロック平均輝度を加算し、ステップS324にて、ブロック平均輝度の加算値をブロック数で除算してライン平均輝度を算出し、ライン平均輝度を保持する。フラッシュ検出部20は、ステップS325にて、ライン平均輝度を順次加算する処理を実行する。フラッシュ検出部20は、ステップS326にて、ステップS322で算出したブロック平均輝度と1画面前の全画面平均輝度との差分演算と、ステップS324で算出したライン平均輝度と1画面前の全画面平均輝度との差分演算とのそれぞれの処理を実行する。ステップS326における差分演算処理は、ステップS324でライン平均輝度を算出するたびに実行される。   In step S323, the flash detection unit 20 adds the block average luminance in one line, and in step S324, calculates the line average luminance by dividing the added value of the block average luminance by the number of blocks. Hold. In step S325, the flash detection unit 20 executes a process of sequentially adding the line average luminance. In step S326, the flash detection unit 20 calculates a difference between the block average luminance calculated in step S322 and the entire screen average luminance of the previous screen, and the line average luminance calculated in step S324 and the entire screen average of the previous screen. Each process of difference calculation with luminance is executed. The difference calculation process in step S326 is executed every time the line average luminance is calculated in step S324.

フラッシュ検出部20は、ステップS327にて、ライン平均輝度と全画面平均輝度との差分値が閾値(閾値1)以上のラインを検出したか否かを判定する。ライン平均輝度と全画面平均輝度との差分値が閾値以上のラインを検出したと判定されれば(YES)、フラッシュ検出部20は、処理をステップS328に移行させ、ライン平均輝度と全画面平均輝度との差分値が閾値以上のラインを検出したと判定されなければ(NO)、フラッシュ検出部20は、処理をステップS337に移行させる。ライン平均輝度と全画面平均輝度との差分値が閾値以上のラインを検出しなければ、フラッシュは発光していないということである。   In step S327, the flash detection unit 20 determines whether or not a line having a difference value between the line average luminance and the entire screen average luminance equal to or greater than a threshold (threshold 1) is detected. If it is determined that a line whose difference value between the line average luminance and the entire screen average luminance is equal to or greater than the threshold is detected (YES), the flash detection unit 20 moves the process to step S328, and the line average luminance and the entire screen average. If it is not determined that a line having a difference value with respect to the luminance is not less than the threshold value (NO), the flash detection unit 20 shifts the process to step S337. If a line having a difference value between the line average brightness and the full screen average brightness of a threshold value or more is not detected, the flash is not emitting light.

フラッシュ検出部20は、ライン平均輝度と全画面平均輝度との差分値が閾値以上のラインを検出した場合、さらに、ステップS328にて、そのライン内のそれぞれのブロック平均輝度と全画面平均輝度との差分値が閾値(閾値2)以上であるか否かを判定する。フラッシュ検出部20は、それぞれのブロック平均輝度と全画面平均輝度との差分値が閾値以上であると判定されれば(YES)、フラッシュ検出部20は、処理をステップS329に移行させる。なお、この際、フラッシュ検出部2は、検出したラインがフレームの最初のラインから何ライン目かを示す検出ライン情報を記憶しておく。記憶する検出ライン情報はラインが連続して検出される場合は最初の1ライン目のみでよい。   If the flash detection unit 20 detects a line whose difference value between the line average luminance and the full screen average luminance is equal to or greater than the threshold value, the flash detection unit 20 further calculates the block average luminance and the full screen average luminance in the line in step S328. It is determined whether or not the difference value is equal to or greater than a threshold value (threshold value 2). If the flash detection unit 20 determines that the difference value between each block average luminance and the entire screen average luminance is equal to or greater than the threshold (YES), the flash detection unit 20 shifts the processing to step S329. At this time, the flash detection unit 2 stores detected line information indicating the number of detected lines from the first line of the frame. The detected line information to be stored may be only the first line when the lines are continuously detected.

一方、それぞれのブロック平均輝度と全画面平均輝度との差分値が閾値以上であると判定されなければ(NO)、フラッシュ検出部20は、既に検出ライン情報を記憶している場合は、それを消去するとともに、処理をステップS337に移行させる。   On the other hand, if it is not determined that the difference value between each block average luminance and the entire screen average luminance is equal to or greater than the threshold (NO), the flash detection unit 20 stores the detected line information if it is already stored. While deleting, the process proceeds to step S337.

フラッシュ検出部20は、ステップS329にて、ライン平均輝度と全画面平均輝度との差分値が閾値以上であり、それぞれのブロック平均輝度と全画面平均輝度との差分値が閾値以上であるという2つの条件を満たすラインが所定ライン数以上継続したか否かを判定する。所定ライン数以上継続したと判定されれば(YES)、フラッシュ検出部20は処理をステップS330に移行させ、所定ライン数以上継続したと判定されなければ(NO)、フラッシュ検出部20は処理をステップS337に移行させる。   In step S329, the flash detection unit 20 determines that the difference value between the line average luminance and the entire screen average luminance is greater than or equal to the threshold, and the difference value between each block average luminance and the entire screen average luminance is greater than or equal to the threshold. It is determined whether or not the number of lines that satisfy one condition continues for a predetermined number of lines or more. If it is determined that the predetermined number of lines or more have been continued (YES), the flash detection unit 20 moves the process to step S330. If it is not determined that the predetermined number of lines or more has been continued (NO), the flash detection unit 20 performs the process. The process proceeds to step S337.

第2実施形態においては、上記の2つの条件を満たすラインが所定ライン数以上継続したとき、フラッシュが発光したと判定する。仮に、ライン平均輝度と全画面平均輝度との差分値が閾値以上である状態が所定ライン数以上継続する状態が発生しても、ライン内のそれぞれのブロック平均輝度と全画面平均輝度との差分値が閾値以上であるという条件を満たさない場合には、フラッシュは発光していないと判定されることになる。この理由については後述する。   In the second embodiment, when the number of lines that satisfy the above two conditions continues for a predetermined number of lines or more, it is determined that the flash has emitted. Even if a state in which the difference between the line average luminance and the entire screen average luminance is equal to or greater than the threshold value continues for a predetermined number of lines or more, the difference between each block average luminance in the line and the entire screen average luminance. If the condition that the value is greater than or equal to the threshold value is not satisfied, it is determined that the flash is not emitting light. The reason for this will be described later.

フラッシュ検出部20は、上記の2つの条件を満たすラインが所定ライン数以上継続したら、ステップS330にて、フラッシュが発光していないことを示す検出信号“0”からフラッシュが発光したことを示す検出信号“1”へと切り換え、この切り換えた検出信号と、記憶している検出ライン情報とをフラッシュ補正部8に供給するとともに、検出ライン情報を消去する。フラッシュ検出部20及びフラッシュ補正部8は、ステップS331にて、設定されているモードが低遅延モードであるか否かを判定する。低遅延モードであると判定されれば(YES)、フラッシュ補正部8は、処理をステップS332に移行させる。低遅延モードであると判定されなければ(NO)、フラッシュ検出部20は、処理をステップS339に移行させる。   When the number of lines that satisfy the above two conditions continues for a predetermined number of lines or more, the flash detection unit 20 detects that the flash is emitted from the detection signal “0” indicating that the flash is not emitted in step S330. The signal is switched to the signal “1”, and the detected signal thus switched and the stored detection line information are supplied to the flash correction unit 8 and the detection line information is deleted. In step S331, the flash detection unit 20 and the flash correction unit 8 determine whether or not the set mode is the low delay mode. If it is determined that the mode is the low delay mode (YES), the flash correction unit 8 shifts the process to step S332. If it is not determined that the mode is the low delay mode (NO), the flash detection unit 20 shifts the process to step S339.

フラッシュ補正部8は、ステップS332にて、供給された検出ライン情報が示す、1画面前のラインへの置換を開始する。フラッシュ検出部20は、ステップS333にて、ライン平均輝度と全画面平均輝度との差分値が閾値未満であるか、または、それぞれのブロック平均輝度と全画面平均輝度との差分値が閾値未満であるラインを検出したか否かを判定する。即ち、フラッシュ検出部20は、ステップS333にて、上記の2つの条件の少なくとも一方を満たさないラインが現れたか否かを判定する。上記の2つの条件の少なくとも一方を満たさないラインが現れたと判定されれば(YES)、フラッシュ検出部20は処理をステップS334に移行させる。   In step S332, the flash correction unit 8 starts replacement with the previous line indicated by the supplied detection line information. In step S333, the flash detection unit 20 determines that the difference value between the line average luminance and the entire screen average luminance is less than the threshold value, or the difference value between each block average luminance and the entire screen average luminance is less than the threshold value. It is determined whether or not a certain line has been detected. That is, the flash detection unit 20 determines whether or not a line that does not satisfy at least one of the above two conditions appears in step S333. If it is determined that a line that does not satisfy at least one of the two conditions has appeared (YES), the flash detection unit 20 moves the process to step S334.

なお、この際、フラッシュ検出部20は、検出したラインがフレームの最初のラインから何ライン目かを示す検出ライン情報を記憶しておく。記憶する検出ライン情報はラインが連続して検出される場合は最初の1ライン目のみでよい。   At this time, the flash detection unit 20 stores detection line information indicating the number of detected lines from the first line of the frame. The detected line information to be stored may be only the first line when the lines are continuously detected.

一方、上記の2つの条件の少なくとも一方を満たさないラインが現れたと判定されなければ(NO)、フラッシュ検出部20は、記憶していた検出ライン情報を消去するとともに、処理をステップS337に移行させる。   On the other hand, if it is not determined that a line that does not satisfy at least one of the above two conditions has appeared (NO), the flash detection unit 20 deletes the stored detection line information and shifts the process to step S337. .

フラッシュ検出部20は、ステップS334にて、上記の2つの条件の少なくとも一方を満たさない状態が所定ライン数以上継続したか否かを判定する。所定ライン数以上継続したと判定されれば(YES)、フラッシュ検出部20は処理をステップS335に移行させ、所定ライン数以上継続したと判定されなければ(NO)、フラッシュ検出部20は処理をステップS337に移行させる。   In step S334, the flash detection unit 20 determines whether or not a state in which at least one of the above two conditions is not satisfied continues for a predetermined number of lines or more. If it is determined that the predetermined number of lines or more have been continued (YES), the flash detection unit 20 proceeds to step S335. If it is not determined that the predetermined number of lines or more has been continued (NO), the flash detection unit 20 performs the process. The process proceeds to step S337.

フラッシュ検出部20は、ステップS335にて、検出信号“1”を検出信号“0”へと切り換え、この切り換えた検出信号と、記憶している検出ライン情報とをフラッシュ補正部8に供給するとともに検出ライン情報を消去する。フラッシュ補正部8は、ステップS336にて、供給された検出ライン情報が示す、1画面前のラインへの置換を終了し、フラッシュ検出部20は、処理をステップS337に移行させる。フラッシュ検出部20は、ステップS337にて、全有効ラインに対する判定が終了したか否かを判定する。全有効ラインに対する判定が終了したと判定されれば(YES)、フラッシュ検出部20は、処理をステップS338に移行させ、全有効ラインが終了したと判定されなければ(NO)、フラッシュ検出部20は、処理をステップS327に戻してステップS327以降を繰り返す。   In step S335, the flash detection unit 20 switches the detection signal “1” to the detection signal “0”, and supplies the switched detection signal and the stored detection line information to the flash correction unit 8. Delete detection line information. In step S336, the flash correction unit 8 ends the replacement with the previous line indicated by the supplied detection line information, and the flash detection unit 20 shifts the process to step S337. In step S337, the flash detection unit 20 determines whether the determination for all active lines has been completed. If it is determined that the determination for all active lines is completed (YES), the flash detection unit 20 shifts the process to step S338. If it is not determined that all effective lines are completed (NO), the flash detection unit 20 Returns the process to step S327 and repeats step S327 and subsequent steps.

フラッシュ検出部20は、ステップS338にて、ライン平均輝度の加算値を有効ライン数で除算して全画面平均輝度を算出し、全画面平均輝度を保持して、図3のステップS5へと移行させる。   In step S338, the flash detection unit 20 divides the added value of the line average luminance by the number of effective lines to calculate the entire screen average luminance, holds the entire screen average luminance, and proceeds to step S5 in FIG. Let

一方、ステップS331にて低遅延モードであると判定されなかった(即ち、画面単位切換モードであると判定された)場合、フラッシュ検出部20はステップS316〜S319と同じであり、説明を省略する。   On the other hand, if it is not determined in step S331 that the mode is the low delay mode (that is, it is determined that the screen unit switching mode is selected), the flash detection unit 20 is the same as steps S316 to S319, and a description thereof is omitted. .

第2実施形態によれば、第1実施形態よりもフラッシュが発光したか否かの検出精度を向上させることができる。図8を用いて、検出精度を向上させることができる理由について説明する。図8は、画面内に部分的に矩形状の高輝度領域Arhが含まれる画像Imiの例を示している。ハッチングを付した高輝度領域Arhは例えば白レベルであるとする。高輝度領域Arhは矩形状でなくてもよい。有効ラインLneにおいては、ライン平均輝度は比較的高い値となる。有効ラインLne以外のラインでも高輝度領域Arhが存在している垂直方向の範囲では同様である。従って、第1実施形態においては、高輝度領域Arhが存在している垂直方向の範囲でフラッシュが発光したと誤判定する可能性がある。   According to the second embodiment, it is possible to improve the detection accuracy as to whether or not the flash has emitted, compared to the first embodiment. The reason why the detection accuracy can be improved will be described with reference to FIG. FIG. 8 shows an example of an image Imi that includes a rectangular high-intensity area Arh partially in the screen. The hatched high luminance area Arh is assumed to have a white level, for example. The high brightness area Arh may not be rectangular. In the effective line Lne, the line average luminance is a relatively high value. The same applies to a range other than the effective line Lne in the vertical range where the high luminance area Arh exists. Therefore, in the first embodiment, there is a possibility that the flash is erroneously determined to emit light in the vertical range where the high luminance area Arh exists.

図8では、1ラインを4つのブロックB1〜B4に分割した例を示している。ブロック平均値算出部201で算出されるブロック平均輝度は、ブロックB1ではさほど高い値とはならない。ブロック平均輝度はブロックB2,B3では高い値となり、ブロックB4ではブロックB2,B3よりも小さな値となる。有効ラインLneにおいて、図7のステップS327にて、ライン平均輝度と全画面平均輝度との差分値が閾値以上であると判定されたとしても、ステップS328にて、少なくともブロックB1で、ブロック平均輝度と全画面平均輝度との差分値が閾値以上であると判定されない。   FIG. 8 shows an example in which one line is divided into four blocks B1 to B4. The block average brightness calculated by the block average value calculation unit 201 is not so high in the block B1. The block average luminance is a high value in the blocks B2 and B3, and a smaller value in the block B4 than in the blocks B2 and B3. Even if it is determined in step S327 in FIG. 7 that the difference value between the line average luminance and the entire screen average luminance is greater than or equal to the threshold value in the effective line Lne, in step S328, at least the block average luminance in block B1. Is not determined to be greater than or equal to the threshold value.

従って、第2実施形態によれば、図8の例のように部分的な高輝度領域Arhを含む画像Imiであっても、フラッシュが発光したと誤判定する可能性を大幅に低減させることができる。   Therefore, according to the second embodiment, it is possible to greatly reduce the possibility of erroneously determining that the flash has emitted even in the case of the image Imi including the partial high brightness area Arh as in the example of FIG. it can.

<第3実施形態>
第3実施形態の画像処理装置の構成は、図1に示す第1実施形態のビデオカメラ101または図6に示す第2実施形態のビデオカメラ102と同様であり、フラッシュ補正部8での画像データの補正処理が第1及び第2実施形態とは異なっている。図9〜図11を用いて、第3実施形態における画像データの補正処理について説明する。第3実施形態においては、図3に示すステップS3のフラッシュ検出・補正処理を図9に示すステップS3とする。図9を用いて、ステップS3のフラッシュ検出・補正処理の詳細について説明する。
<Third Embodiment>
The configuration of the image processing apparatus of the third embodiment is the same as that of the video camera 101 of the first embodiment shown in FIG. 1 or the video camera 102 of the second embodiment shown in FIG. This correction process is different from those in the first and second embodiments. Image data correction processing according to the third embodiment will be described with reference to FIGS. In the third embodiment, the flash detection / correction process in step S3 shown in FIG. 3 is referred to as step S33 shown in FIG. With reference to FIG. 9, it will be described in detail flash detection and correction in the step S3 3.

図9は、画像処理装置の構成を、フラッシュ検出部2を有する図1のビデオカメラ101とした場合を例にしている。特に図示しないが、フラッシュ検出部20を有する図6のビデオカメラ102においても、図9のステップS3と同様の処理を行うことが可能である。図9において、図4と同一のステップには同一の符号を付し、その説明を適宜省略する。 FIG. 9 shows an example in which the configuration of the image processing apparatus is the video camera 101 of FIG. 1 having the flash detection unit 2. Although not shown particularly, in the video camera 102 in FIG. 6 having a flash detection unit 20, it is possible to perform the same processing as Step S3 3 in FIG. 9, the same steps as those in FIG. 4 are denoted by the same reference numerals, and the description thereof is omitted as appropriate.

図9において、ステップS304以前は図4と同じであり、図示を省略している。図9のステップS307までは図4と同じである。フラッシュ検出部2がステップS307にてフラッシュが発光していないことを示す検出信号“0”からフラッシュが発光したことを示す検出信号“1”へと切り換え、この切り換えた検出信号と、記憶している検出ライン情報とをフラッシュ補正部8に供給したら、フラッシュ補正部8は、ステップS351にて、供給された検出ライン情報が示すフラッシュ開始ラインよりも上方に位置し、フラッシュ開始ラインに隣接する隣接領域を設定する。   9, the steps before step S304 are the same as those in FIG. 4, and are not shown. Steps up to step S307 in FIG. 9 are the same as those in FIG. In step S307, the flash detection unit 2 switches from the detection signal “0” indicating that the flash is not emitted to the detection signal “1” indicating that the flash is emitted, and stores the switched detection signal. In step S351, the flash correction unit 8 is located above the flash start line indicated by the supplied detection line information and is adjacent to the flash start line. Set the area.

具体的には、図10の(a)に示すように、フラッシュ補正部8は、供給された検出ライン情報が示す最初のフラッシュ検出ラインであるフラッシュ開始ラインLnfsに隣接する複数ラインの隣接領域Aadjsを設定する。隣接領域Aadjsは例えば5〜10ライン程度でよい。   Specifically, as illustrated in FIG. 10A, the flash correction unit 8 includes a plurality of adjacent areas Aadjs adjacent to the flash start line Lnfs which is the first flash detection line indicated by the supplied detection line information. Set. The adjacent area Aadjs may be about 5 to 10 lines, for example.

フラッシュ補正部8は、低遅延モードであると判定されたとき、ステップS352にて、隣接領域Aadjsにおいて、現在の画面のラインと1画面前の画面のラインとを混合して隣接領域Aadjsの新たなラインを生成し、隣接領域Aadjs内のラインを新たなラインに置換する。フラッシュ補正部8は、ステップS353にて、フラッシュ開始ラインLnfs以降、1画面前のラインへの置換を開始する。   When it is determined that the low-delay mode is set, the flash correction unit 8 mixes the current screen line with the previous screen line in the adjacent area Aadjs in step S352, and creates a new adjacent area Aadjs. A new line is generated, and the line in the adjacent area Aadjs is replaced with a new line. In step S353, the flash correction unit 8 starts replacement with the previous line after the flash start line Lnfs.

フラッシュ検出部2がステップS312にて検出信号“1”を検出信号“0”へと切り換え、この切り換えた検出信号と、記憶している検出ライン情報とをフラッシュ補正部8に供給したら、フラッシュ補正部8は、ステップS354にて、供給された検出ライン情報が示すフラッシュ終了ライン(ステップS310にて検出したフラッシュ発光終了後の最初のラインの1ライン前のライン)下方に位置し、フラッシュ終了ラインに隣接する隣接領域を設定する。具体的には、図10の(b)に示すように、フラッシュ補正部8は、フラッシュ終了ラインLnfeに隣接する複数ラインの隣接領域Aadjeを設定する。隣接領域Aadjeも例えば5〜10ライン程度でよい。   When the flash detection unit 2 switches the detection signal “1” to the detection signal “0” in step S312, and supplies the switched detection signal and stored detection line information to the flash correction unit 8, flash correction is performed. The unit 8 is located below the flash end line indicated by the supplied detection line information in step S354 (the line one line before the first line after the end of flash emission detected in step S310), and the flash end line. An adjacent area adjacent to is set. Specifically, as shown in FIG. 10B, the flash correction unit 8 sets a plurality of adjacent areas Aadje adjacent to the flash end line Lnfe. The adjacent area Aadje may be about 5 to 10 lines, for example.

フラッシュ補正部8は、ステップS313にて、1画面前のラインへの置換を終了し、ステップS355にて、隣接領域Aadjeにおいて、現在の画面のラインと1画面前の画面のラインとを混合して隣接領域Aadjeの新たなラインを生成し、隣接領域Aadje内のラインを新たなラインに置換する。他のステップによる処理は図4で説明した通りである。   In step S313, the flash correction unit 8 finishes replacing the previous line with the screen, and in step S355, mixes the current screen line and the previous screen line in the adjacent area Aadje. Then, a new line of the adjacent area Aadje is generated, and the line in the adjacent area Aadje is replaced with a new line. The processing by other steps is as described in FIG.

図10の(a)において、隣接領域Aadjsの最初のラインをLS、隣接領域Aadjsの最後のラインをLEとし、隣接領域Aadjsの画素位置をLf(i,j)とすると、現在の画面の画像データの合成重み付け係数Wf(i,j)と、1画面前の画面の画像データの合成重み付け係数Wb(i,j)は式(1)となる。図9のステップS352では、式(1)に基づいて現在の画面のラインと1画面前の画面のラインとを混合して隣接領域Aadjsの新たなラインを生成する。式(1)では、画素位置Lf(i,j)としているが、1画面前の画面の画像データと現在の画面の画像データとはライン単位で混合するので、画像の水平方向の位置を示すiの情報はなくてもよい。   In FIG. 10A, assuming that the first line of the adjacent area Aadjs is LS, the last line of the adjacent area Aadjs is LE, and the pixel position of the adjacent area Aadjs is Lf (i, j), the current screen image The composite weighting coefficient Wf (i, j) of data and the composite weighting coefficient Wb (i, j) of the image data of the screen one screen before are expressed by Expression (1). In step S352 in FIG. 9, a new line in the adjacent area Aadjs is generated by mixing the line on the current screen and the line on the previous screen based on Expression (1). In Expression (1), the pixel position Lf (i, j) is used, but the image data of the previous screen and the image data of the current screen are mixed in units of lines, and thus indicate the horizontal position of the image. There is no need for i information.

Figure 0005757472
Figure 0005757472

図10の(b)において、隣接領域Aadjeの最初のラインをLS、隣接領域Aadjeの最後のラインをLEとし、隣接領域Aadjeの画素位置をLf(i,j)とすると、現在の画面の画像データの合成重み付け係数Wf(i,j)と、1画面前の画面の画像データの合成重み付け係数Wb(i,j)は式(2)となる。同様に、式(2)では、画素位置Lf(i,j)としているが、1画面前の画面の画像データと現在の画面の画像データとはライン単位で混合するので、画像の水平方向の位置を示すiの情報はなくてもよい。   In FIG. 10B, assuming that the first line of the adjacent area Aadje is LS, the last line of the adjacent area Aadje is LE, and the pixel position of the adjacent area Aadje is Lf (i, j), the image of the current screen The composition weighting coefficient Wf (i, j) of data and the composition weighting coefficient Wb (i, j) of the image data of the screen one screen before are expressed by Expression (2). Similarly, in the expression (2), the pixel position Lf (i, j) is used. However, since the image data of the previous screen and the image data of the current screen are mixed in line units, There is no need for i information indicating the position.

Figure 0005757472
Figure 0005757472

式(1)による現在の画面のラインと1画面前の画面のラインとを混合特性は図11の(a)となる。図11の(a)において、実線は現在の画面のラインの混合率を示し、破線は1画面前の画面のラインの混合率を示している。図11の(a)に示すように、図10の(a)に示す画像Im2の場合には、画面の上端側から隣接領域Aadjsの手前までは現在の画面のラインのみである。ステップS352によって、隣接領域Aadjsの最初のラインLSから最後のラインLEまで現在の画面のラインの混合率が順次減少していく一方、1画面前の画面のラインの混合率が順次増加していく。最後のラインLE以降、ステップS353によって1画面前の画面のラインのみとなる。なお、フラッシュ開始ラインLnfsと最後のラインLEとを同一のラインとしてもよい。   FIG. 11A shows the mixing characteristics of the current screen line and the previous screen line according to the equation (1). In FIG. 11A, the solid line indicates the mixing ratio of the lines on the current screen, and the broken line indicates the mixing ratio of the lines on the previous screen. As shown in FIG. 11 (a), in the case of the image Im2 shown in FIG. 10 (a), only the current screen line extends from the upper end side of the screen to before the adjacent area Aadjs. In step S352, the mixing ratio of the lines on the current screen is sequentially decreased from the first line LS to the last line LE of the adjacent area Aadjs, while the mixing ratio of the lines on the screen one screen before is sequentially increased. . After the last line LE, only the line of the previous screen is displayed in step S353. Note that the flash start line Lnfs and the last line LE may be the same line.

式(2)による現在の画面のラインと1画面前の画面のラインとを混合特性は図11の(b)となる。図11の(b)において、実線は現在の画面のラインの混合率を示し、破線は1画面前の画面のラインの混合率を示している。図11の(b)に示すように、図10の(b)に示す画像Im3の場合には、画面の上端側から隣接領域Aadjeの手前までは1画面前の画面のラインのみである。ステップS356によって、隣接領域Aadjeの最初のラインLSから最後のラインLEまで1画面前の画面のラインの混合率が順次減少していく一方、現在の画面のラインの混合率が順次増加していく。最後のラインLE以降、現在の画面のラインのみとなる。なお、フラッシュ終了ラインLnfeと最初のラインLSとを同一のラインとしてもよい。   FIG. 11B shows the mixing characteristics of the current screen line and the previous screen line according to the equation (2). In FIG. 11B, the solid line indicates the mixing ratio of the lines on the current screen, and the broken line indicates the mixing ratio of the lines on the previous screen. As shown in FIG. 11 (b), in the case of the image Im3 shown in FIG. 10 (b), the line from the upper end side of the screen to the front of the adjacent area Aadje is only the screen line of the previous screen. In step S356, the line mixing ratio of the previous screen from the first line LS to the last line LE of the adjacent area Aadje is sequentially decreased, while the line mixing ratio of the current screen is sequentially increased. . After the last line LE, there are only lines on the current screen. The flush end line Lnfe and the first line LS may be the same line.

第3実施形態によれば、図2に示す画像Im2のように画面の途中から高輝度となっている場合には、フラッシュ開始ラインLnfsに対して上方に位置するフラッシュの影響を受けていない隣接領域Aadjsにおいて、最初のラインLSから最後のラインLEに進行するに従って1画面前の画面のラインに徐々に切り替わっていく。従って、現在の画面の画像データと1画面前の画面の画像データとを混合する不自然さが低減される。   According to the third embodiment, when the brightness is high from the middle of the screen as in the image Im2 shown in FIG. 2, the adjacent to the flash start line Lnfs is not affected by the flash located above. In the area Aadjs, the screen line is gradually switched to the screen on the previous screen as it progresses from the first line LS to the last line LE. Therefore, the unnaturalness of mixing the image data of the current screen and the image data of the previous screen is reduced.

また、第3実施形態によれば、図2に示す画像Im3のように画面の途中まで高輝度で途中から正常な画像となっている場合には、フラッシュ終了ラインLnfeに対して下方に位置するフラッシュの影響を受けていない隣接領域Aadjeにおいて、最初のラインLSから最後のラインLEに進行するに従って現在の画面のラインに徐々に切り替わっていく。従って、現在の画面の画像データと1画面前の画面の画像データとを混合する不自然さが低減される。   In addition, according to the third embodiment, when the image is high-brightness and normal from the middle like the image Im3 shown in FIG. 2, it is positioned below the flash end line Lnfe. In the adjacent area Aadje that is not affected by the flash, the line is gradually switched to the line on the current screen as it proceeds from the first line LS to the last line LE. Therefore, the unnaturalness of mixing the image data of the current screen and the image data of the previous screen is reduced.

上述した式(1),(2)の代わりに、式(3)を用いて画素単位で現在の画面の画像データと1画面前の画面の画像データとを混合してもよい。式(3)において、Mf(i,j)は画素の明るさであり、ThH,ThLはThH>ThLを満たす明るさの閾値である。この場合には、フラッシュ検出部2,20で検出したそれぞれの有効画素の明るさをフラッシュ補正部8に入力すればよい。   Instead of the above formulas (1) and (2), the image data of the current screen and the image data of the previous screen may be mixed in units of pixels using the formula (3). In Expression (3), Mf (i, j) is the brightness of the pixel, and ThH and ThL are brightness thresholds that satisfy ThH> ThL. In this case, the brightness of each effective pixel detected by the flash detection units 2 and 20 may be input to the flash correction unit 8.

Figure 0005757472
Figure 0005757472

式(3)によれば、隣接領域Aadjs及び隣接領域Aadjeにおいて、それぞれの画素の明るさMf(i,j)が小さい方の値の閾値ThLよりも小さければ、現在の画面の画像データの合成重み付け係数Wf(i,j)が1となり、1画面前の画面の画像データの合成重み付け係数Wb(i,j)が0となる。即ち、画素の明るさMf(i,j)が閾値ThLよりも小さいということはフラッシュの発光による影響を受けていない可能性が高く、現在の画面の画素データのみとする。   According to the equation (3), in the adjacent area Aadjs and the adjacent area Aadje, if the brightness Mf (i, j) of each pixel is smaller than the threshold value ThL of the smaller value, the composition of the image data of the current screen The weighting coefficient Wf (i, j) becomes 1, and the composite weighting coefficient Wb (i, j) of the image data of the screen one screen before becomes 0. That is, if the pixel brightness Mf (i, j) is smaller than the threshold ThL, there is a high possibility that the pixel is not affected by the flash emission, and only the pixel data of the current screen is used.

また、それぞれの画素の明るさMf(i,j)が大きい方の閾値ThHよりも大きければ、現在の画面の画像データの合成重み付け係数Wf(i,j)が0となり、1画面前の画面の画像データの合成重み付け係数Wb(i,j)が1となる。即ち、画素の明るさMf(i,j)が閾値ThHよりも大きいということはフラッシュの発光による影響を受けている可能性が高く、1画面前の画面の画素データのみとする。   If the brightness Mf (i, j) of each pixel is larger than the larger threshold value ThH, the composite weighting coefficient Wf (i, j) of the image data of the current screen becomes 0, and the screen one screen before The composite weighting coefficient Wb (i, j) of the image data is 1. That is, if the pixel brightness Mf (i, j) is larger than the threshold value ThH, there is a high possibility that it is affected by the light emission of the flash, and only the pixel data of the previous screen is used.

それぞれの画素の明るさMf(i,j)が閾値ThL以上閾値ThH以下であれば、式(3)の特性で現在の画面の画素データと1画面前の画面の画素データとが適応的に混合されることになる。   If the brightness Mf (i, j) of each pixel is greater than or equal to the threshold ThL and less than or equal to the threshold ThH, the pixel data of the current screen and the pixel data of the previous screen are adaptively represented by the characteristic of Equation (3). Will be mixed.

<第4実施形態>
第4実施形態の画像処理装置の構成は、図1に示す第1実施形態のビデオカメラ101と同様である。第1実施形態においては、図3及び図4で説明したように、フラッシュ検出部2によってフラッシュの発光が検出された場合には、フラッシュ補正部8によって補正した画像データを表示部7に表示させるとともに、記録再生部11に記録させるように構成している。
<Fourth embodiment>
The configuration of the image processing apparatus of the fourth embodiment is the same as that of the video camera 101 of the first embodiment shown in FIG. In the first embodiment, as described with reference to FIGS. 3 and 4, when flash emission is detected by the flash detection unit 2, the image data corrected by the flash correction unit 8 is displayed on the display unit 7. At the same time, the recording / reproducing unit 11 is configured to record.

第4実施形態は、表示部7に表示させる画像データが遅延しないよう、フラッシュの発光によって部分的に高輝度となったとしても画像データを補正せず記録再生部11に記録させ、記録再生部11に記録された画像データの再生時に画像データを補正するように構成している。   In the fourth embodiment, in order to prevent the image data to be displayed on the display unit 7 from being delayed, even if the brightness of the flash is partially increased, the image data is not corrected but is recorded in the recording / reproducing unit 11. 11 is configured to correct the image data at the time of reproducing the image data recorded in the image data 11.

図12を用いて、第4実施形態によるビデオカメラの動作について説明する。図12において、図3と同一部分には同一符号を付し、その説明を適宜省略することとする。図12のステップS1,S2,S4は、図3のステップS1,S2,S4と同じである。図12に示す第4実施形態では、図3のステップS3のフラッシュ検出・補正処理の代わりに、ステップS30のフラッシュ検出処理を設けている。制御部9は、ステップS30にて、フラッシュ検出部2によるフラッシュ検出処理を実行させる。即ち、ステップS30では、フラッシュ補正部8によるフラッシュ補正処理を実行させない。ステップS30のフラッシュ検出処理の詳細については後述する。   The operation of the video camera according to the fourth embodiment will be described with reference to FIG. 12, the same parts as those in FIG. 3 are denoted by the same reference numerals, and the description thereof will be omitted as appropriate. Steps S1, S2, and S4 in FIG. 12 are the same as steps S1, S2, and S4 in FIG. In the fourth embodiment shown in FIG. 12, a flash detection process in step S30 is provided instead of the flash detection / correction process in step S3 in FIG. In step S30, the control unit 9 causes the flash detection unit 2 to execute flash detection processing. That is, in step S30, the flash correction process by the flash correction unit 8 is not executed. Details of the flash detection processing in step S30 will be described later.

図12のステップS5〜S9は、図3のステップS5〜S9と同じである。但し、ステップS5にて、表示部7に表示される画像はフラッシュの発光による影響を受けた画像であっても補正されずそのまま表示される。   Steps S5 to S9 in FIG. 12 are the same as steps S5 to S9 in FIG. However, in step S5, the image displayed on the display unit 7 is displayed as it is without being corrected even if the image is affected by the flash emission.

制御部9は、ステップS9に続き、ステップS11にて、操作スイッチ12によって、記録再生部11に記録された所定の画像データの再生を開始する指示があったか否かを判定する。再生開始の指示があったと判定されれば(YES)、制御部9は、ステップS12にて、記録再生部11に記録された画像データ(符号化データ)を再生させる。記録再生部11から読み出された符号化データは、圧縮伸張処理部5によって伸張処理され、バッファメモリ4に入力されて保持される。再生開始の指示があったと判定されなければ(NO)、制御部9は、処理をステップS10に移行させる。   Following step S9, the control unit 9 determines in step S11 whether or not there has been an instruction to start reproduction of predetermined image data recorded in the recording / reproducing unit 11 by the operation switch 12. If it is determined that there is an instruction to start reproduction (YES), the control unit 9 reproduces the image data (encoded data) recorded in the recording / reproducing unit 11 in step S12. The encoded data read from the recording / reproducing unit 11 is decompressed by the compression / decompression processing unit 5 and input to the buffer memory 4 to be held. If it is not determined that there is an instruction to start reproduction (NO), the control unit 9 shifts the process to step S10.

制御部9は、ステップS13にて、フラッシュ検出領域があるか否かを判定する。フラッシュ検出領域とは、再生する画像データ内でフラッシュの発光によって高輝度となっていることが検出された領域である。画像データにおけるどの部分がフラッシュ検出領域であるかは、後述するように、符号化データに付加したメタデータ(付加情報)を参照することによって判別することができる。   In step S13, the controller 9 determines whether there is a flash detection area. The flash detection area is an area in which high brightness is detected by flash emission in the image data to be reproduced. As will be described later, which part of the image data is the flash detection area can be determined by referring to metadata (additional information) added to the encoded data.

フラッシュ検出領域があると判定されれば(YES)、制御部9は、ステップS14にて、フラッシュ補正部8によるフラッシュ補正処理を実行させる。制御部9は、ステップS15にて、ステップS14にて補正された画像データを表示部7に表示させる。   If it is determined that there is a flash detection area (YES), the control unit 9 causes the flash correction unit 8 to execute flash correction processing in step S14. In step S15, the control unit 9 causes the display unit 7 to display the image data corrected in step S14.

この場合、バッファメモリ4に保持された伸張処理後の画像データがフラッシュ補正部8へと入力され、ステップS14によるフラッシュ補正処理が実行される。補正された画像データはバッファメモリ4に入力されて保持され、出力処理部6を介して表示部7へと供給される。   In this case, the decompressed image data held in the buffer memory 4 is input to the flash correction unit 8, and the flash correction process in step S14 is executed. The corrected image data is input and held in the buffer memory 4 and supplied to the display unit 7 through the output processing unit 6.

ステップS13にてフラッシュ検出領域があると判定されなければ(NO)、制御部9は、処理をステップS15に移行させる。制御部9は、ステップS15にて、ステップS12にて再生された画像データをそのまま表示部7に表示させる。この場合、バッファメモリ4に保持された伸張処理後の画像データは、バッファメモリ4から出力処理部6へとそのまま出力され、表示部7へと供給される。   If it is not determined in step S13 that there is a flash detection area (NO), the control unit 9 shifts the process to step S15. In step S15, the control unit 9 causes the display unit 7 to display the image data reproduced in step S12 as it is. In this case, the decompressed image data held in the buffer memory 4 is directly output from the buffer memory 4 to the output processing unit 6 and supplied to the display unit 7.

制御部9は、ステップS16にて、再生停止の指示があったか否かを判定する。再生停止の指示があったと判定されれば(YES)、制御部9は、ステップS17にて、画像データの再生を停止させて、処理をステップS10に移行させる。再生停止の指示があったと判定されなければ(NO)、制御部9は処理をステップS12に戻してステップS12以降を繰り返す。ステップS10は図3で説明した通りである。   In step S16, the controller 9 determines whether or not an instruction to stop reproduction has been issued. If it is determined that there is an instruction to stop reproduction (YES), the control unit 9 stops reproduction of the image data in step S17, and shifts the processing to step S10. If it is not determined that there has been an instruction to stop playback (NO), the control unit 9 returns the process to step S12 and repeats step S12 and subsequent steps. Step S10 is as described in FIG.

図13を用いて、図12に示すステップS30のフラッシュ検出処理の詳細について説明する。第4実施形態におけるステップS30をステップS30とする。以下の各ステップは、制御部9による制御に基づいてフラッシュ検出部2によって実行される。図13において、フラッシュ検出部2は、ステップS3001にて、有効ラインにおける有効画素の画素値を加算する処理を有効ラインごとに順次実行する。フラッシュ検出部2は、ステップS3002にて、ステップS3001にて得た画素値の加算値を有効画素数で除算してライン平均輝度を算出し、ライン平均輝度を保持する。 The details of the flash detection process in step S30 shown in FIG. 12 will be described with reference to FIG. The step S30 in the fourth embodiment and Step S30 4. The following steps are executed by the flash detection unit 2 based on control by the control unit 9. In FIG. 13, in step S3001, the flash detection unit 2 sequentially executes a process of adding pixel values of effective pixels in the effective line for each effective line. In step S3002, the flash detection unit 2 calculates the line average luminance by dividing the addition value of the pixel values obtained in step S3001 by the number of effective pixels, and holds the line average luminance.

フラッシュ検出部2は、ステップS3003にて、ライン平均輝度を順次加算する処理を実行する。フラッシュ検出部2は、ステップS3004にて、ステップS3002で算出したライン平均輝度と1画面前の全画面平均輝度との差分演算処理を実行する。ステップS3004における差分演算処理は、ステップS3002でライン平均輝度を算出するたびに実行される。図13のステップS3001〜ステップS3004の処理は図4のステップS301〜ステップS304と同じである。   In step S3003, the flash detection unit 2 executes a process of sequentially adding line average luminance. In step S3004, the flash detection unit 2 executes a difference calculation process between the line average luminance calculated in step S3002 and the entire screen average luminance one screen before. The difference calculation process in step S3004 is executed every time the line average luminance is calculated in step S3002. The processing from step S3001 to step S3004 in FIG. 13 is the same as step S301 to step S304 in FIG.

フラッシュ検出部2は、ステップS3005にて、フラッシュの発光を検出していない通常状態であるか否かを判定する。通常状態であると判定されれば(YES)、フラッシュ検出部2は、ステップS3006にて、差分値が閾値以上のラインを検出したか否かを判定する。差分値が閾値以上のラインを検出したと判定されれば(YES)、フラッシュ検出部2は、処理をステップS3007に移行させる。この際、フラッシュ検出部2は、検出したラインがフレームの最初のラインから何ライン目かを示す検出ライン情報を記憶しておく。   In step S3005, the flash detection unit 2 determines whether or not it is a normal state in which flash emission is not detected. If it is determined that the current state is the normal state (YES), the flash detection unit 2 determines whether or not a line having a difference value equal to or larger than the threshold value is detected in step S3006. If it is determined that a line having a difference value equal to or greater than the threshold value is detected (YES), the flash detection unit 2 moves the process to step S3007. At this time, the flash detection unit 2 stores detection line information indicating how many lines are detected from the first line of the frame.

一方、差分値が閾値以上のラインを検出したと判定されなければ(NO)、フラッシュ検出部2は、既に検出ライン情報を記憶している場合は、それを消去するとともに、処理をステップS3011に移行させる。   On the other hand, if it is not determined that a line having a difference value equal to or larger than the threshold value is detected (NO), the flash detection unit 2 deletes the detected line information if it has already been stored, and the process proceeds to step S3011. Transition.

フラッシュ検出部2は、ステップS3007にて、差分値が閾値以上である状態が所定ライン数以上継続したか否かを判定する。所定ライン数以上継続したと判定されれば(YES)、フラッシュ検出部2は、処理をステップS3008に移行させ、所定ライン数以上継続したと判定されなければ(NO)、フラッシュ検出部2は、処理をステップS3011に移行させる。   In step S3007, the flash detection unit 2 determines whether or not the state where the difference value is equal to or greater than the threshold value continues for a predetermined number of lines or more. If it is determined that the predetermined number of lines or more have been continued (YES), the flash detecting unit 2 shifts the process to step S3008. If it is not determined that the predetermined number of lines or more has been continued (NO), the flash detecting unit 2 The process proceeds to step S3011.

ステップS3005にて通常状態であると判定され、ステップS3006にて差分値が閾値以上のラインが検出され、ステップS3007にて差分値が閾値以上である状態が所定ライン数以上継続したと判定された場合は、フラッシュの発光の影響を受けていない状態からフラッシュの発光の影響を受けて高輝度の状態へと変化したことを検出したということである。   In step S3005, the normal state is determined. In step S3006, a line having a difference value equal to or greater than the threshold value is detected. In step S3007, it is determined that the state in which the difference value is equal to or greater than the threshold value continues for a predetermined number of lines. In this case, it is detected that the state has changed from a state not affected by the light emission of the flash to a state of high brightness due to the light emission of the flash.

そこで、フラッシュ検出部2は、ステップS3008にて、フラッシュの発光を検出していない状態からフラッシュの発光を検出した状態へとフラッシュ検出状態を変更する。第4実施形態においては、フラッシュ検出部2は、フラッシュ発光の開始ラインを示す検出ライン情報を制御部9に供給し、記憶した検出ライン情報を消去する。   Accordingly, in step S3008, the flash detection unit 2 changes the flash detection state from a state in which flash emission is not detected to a state in which flash emission is detected. In the fourth embodiment, the flash detection unit 2 supplies detection line information indicating a flash emission start line to the control unit 9 and erases the stored detection line information.

図13のステップS3006,S3007は図4のステップS305,S306と同じである。図13においてステップS3007からステップS3008へと移行した場合のステップS3008は図4のステップS307と実質的に同じである。   Steps S3006 and S3007 in FIG. 13 are the same as steps S305 and S306 in FIG. In FIG. 13, step S3008 when the process proceeds from step S3007 to step S3008 is substantially the same as step S307 of FIG.

一方、ステップS3005にて通常状態であると判定されなければ(NO)、フラッシュ検出部2は、ステップS3009にて、差分値が閾値未満のラインを検出したか否かを判定する。差分値が閾値未満のラインを検出したと判定されれば(YES)、フラッシュ検出部2は、処理をステップS3010に移行させる。この際、フラッシュ検出部2は、検出したラインがフレームの最初のラインから何ライン目かを示す検出ライン情報を記憶しておく。   On the other hand, if it is not determined in step S3005 that the current state is normal (NO), the flash detection unit 2 determines in step S3009 whether a line having a difference value less than the threshold is detected. If it is determined that a line having a difference value less than the threshold value is detected (YES), the flash detection unit 2 shifts the process to step S3010. At this time, the flash detection unit 2 stores detection line information indicating how many lines are detected from the first line of the frame.

フラッシュ検出部2は、ステップS3010にて、差分値が閾値未満である状態が所定ライン数以上継続したか否かを判定する。所定ライン数以上継続したと判定されれば(YES)、フラッシュ検出部2は、処理をステップS3008に移行させ、所定ライン数以上継続したと判定されなければ(NO)、フラッシュ検出部2は、処理をステップS3011に移行させる。   In step S3010, the flash detection unit 2 determines whether or not the state where the difference value is less than the threshold value continues for a predetermined number of lines or more. If it is determined that the predetermined number of lines or more have been continued (YES), the flash detecting unit 2 shifts the process to step S3008. If it is not determined that the predetermined number of lines or more has been continued (NO), the flash detecting unit 2 The process proceeds to step S3011.

ステップS3005にて通常状態ではないと判定され、ステップS3009にて差分値が閾値未満のラインが検出され、ステップS3010にて差分値が閾値未満である状態が所定ライン数以上継続したと判定された場合は、フラッシュの発光の影響を受けて高輝度の状態からフラッシュの発光の影響を受けていない状態へと変化したことを検出したということである。   In step S3005, it is determined that the current state is not the normal state. In step S3009, a line whose difference value is less than the threshold value is detected. In step S3010, it is determined that the state where the difference value is less than the threshold value continues for a predetermined number of lines or more. In this case, it is detected that the state has changed from a high brightness state to a state not affected by the light emission of the flash under the influence of the light emission of the flash.

そこで、フラッシュ検出部2は、ステップS3008にて、フラッシュの発光を検出している状態からフラッシュの発光を検出していない状態へとフラッシュ検出状態を変更する。第4実施形態においては、フラッシュ検出部2は、フラッシュ発光の終了ラインを示す検出ライン情報を制御部9に供給し、記憶した検出ライン情報を消去する。   Therefore, in step S3008, the flash detection unit 2 changes the flash detection state from the state in which the flash emission is detected to the state in which the flash emission is not detected. In the fourth embodiment, the flash detection unit 2 supplies detection line information indicating the end line of flash emission to the control unit 9 and erases the stored detection line information.

図13のステップS30096,S3010は図4のステップS310,S311と同じである。図13においてステップS3010からステップS3008へと移行した場合のステップS3008は図4のステップS312と実質的に同じである。   Steps S30096 and S3010 in FIG. 13 are the same as steps S310 and S311 in FIG. In FIG. 13, step S3008 when the process proceeds from step S3010 to step S3008 is substantially the same as step S312 of FIG.

フラッシュ検出部2は、ステップS3011にて、全有効ラインに対する判定が終了したか否かを判定する。全有効ラインに対する判定が終了したと判定されなければ(NO)、フラッシュ検出部2は、処理をステップS3001に戻し、ステップS3001以降の処理を繰り返す。全有効ラインに対する判定が終了したと判定されれば(YES)、フラッシュ補正部8は、ライン平均輝度の加算値を有効ライン数で除算して全画面平均輝度を算出し、全画面平均輝度を保持する。   In step S3011, the flash detection unit 2 determines whether the determination for all active lines is completed. If it is not determined that the determination for all the active lines has been completed (NO), the flash detection unit 2 returns the process to step S3001 and repeats the processes after step S3001. If it is determined that the determination for all the effective lines is completed (YES), the flash correction unit 8 calculates the total screen average luminance by dividing the added value of the line average luminance by the number of effective lines, and calculates the total screen average luminance. Hold.

制御部9は、図12のステップS7にて、圧縮伸張処理部5より出力された符号化データを記録再生部11に記録させる際に、フラッシュ検出部2で検出したフラッシュ発光の開始ライン及び終了ラインを示す検出ライン情報を符号化データに付加するメタデータとして記録させる。   In step S7 of FIG. 12, the control unit 9 causes the recording / reproducing unit 11 to record the encoded data output from the compression / decompression processing unit 11, and the flash emission start line and end detected by the flash detection unit 2. Detection line information indicating a line is recorded as metadata to be added to the encoded data.

図14を用いて、図12に示すステップS14のフラッシュ補正処理の詳細について説明する。第4実施形態におけるステップS14をステップS14とする。以下の各ステップは、制御部9による制御に基づいてフラッシュ補正部8によって実行される。制御部9は、符号化データに付加されているメタデータに基づいてフラッシュ補正部8によるフラッシュ補正処理を実行させる。 Details of the flash correction processing in step S14 shown in FIG. 12 will be described with reference to FIG. Step S14 in the fourth embodiment and Step S14 4. The following steps are executed by the flash correction unit 8 based on control by the control unit 9. The control unit 9 causes the flash correction unit 8 to execute flash correction processing based on the metadata added to the encoded data.

図14において、フラッシュ補正部8は、ステップS1401にて、画面単位切換モードであるか否かを判定する。画面単位切換モードであると判定されれば(YES)、フラッシュ補正部8は、ステップS1402にて、2画面にわたるフラッシュであるか否かを判定する。   In FIG. 14, the flash correction unit 8 determines whether or not the screen unit switching mode is set in step S1401. If it is determined that the screen unit switching mode is set (YES), the flash correction unit 8 determines whether or not the flash is for two screens in step S1402.

2画面にわたるフラッシュであると判定されれば(YES)、フラッシュ補正部8は、ステップS1403にて、2画面目であるか否かを判定する。2画面目であると判定されれば(YES)、フラッシュ補正部8は、ステップS1404にて、1画面後の画面に置換する。ステップS1402にて2画面にわたるフラッシュであると判定されなければ(NO)、また、ステップS1403にて2画面目であると判定されなければ(NO)、フラッシュ補正部8は、ステップS1405にて、1画面前の画面に置換する。   If it is determined that the flash covers two screens (YES), the flash correction unit 8 determines whether or not the screen is the second screen in step S1403. If it is determined that the screen is the second screen (YES), the flash correction unit 8 replaces the screen after the first screen in step S1404. If it is not determined in step S1402 that the flash extends over two screens (NO), or if it is not determined in step S1403 that the second screen is in flash (NO), the flash correction unit 8 determines in step S1405, Replace with the previous screen.

図15において、(a)は補正前の画像Im1,Im2,Im3,Im4…を示している。図2,図5と同様、ハッチングを付した部分がフラッシュの発光によって高輝度となっている部分である。図15の(b)に示すように、高輝度の部分を有する1画面目の画像Im2は、ステップS1405にて、1画面前の画像Im1に置換され、高輝度の部分を有する2画面目の画像Im3は、ステップS1404にて、1画面後の画像Im4に置換される。   15A shows images Im1, Im2, Im3, Im4,... Before correction. Like FIG. 2 and FIG. 5, the hatched portion is a portion where high brightness is obtained by flash emission. As shown in FIG. 15B, the image Im2 of the first screen having the high luminance portion is replaced with the image Im1 of the previous screen in step S1405, and the second screen having the high luminance portion. In step S1404, the image Im3 is replaced with the image Im4 after one screen.

一方、ステップS1401にて画面単位切換モードであると判定されなければ(NO)、フラッシュ補正部8は、ステップS1406〜S1408の低遅延モードに設定されている場合の処理を実行する。フラッシュ補正部8は、ステップS1406にて、1画面を複数の領域に分割する。   On the other hand, if it is not determined in step S1401 that the screen unit switching mode is set (NO), the flash correction unit 8 executes processing in the case where the low delay mode is set in steps S1406 to S1408. In step S1406, the flash correction unit 8 divides one screen into a plurality of areas.

具体的には、フラッシュ補正部8は、図10の(a),(b)で説明したように、ステップS30のフラッシュ検出処理において検出した検出ライン情報が示すフラッシュ開始ラインよりも上方に位置し、フラッシュ開始ラインに隣接する隣接領域と、検出ライン情報が示すフラッシュ終了ライン下方に位置し、フラッシュ終了ラインに隣接する隣接領域を設定する。隣接領域は5〜10ライン程度でよい。このように、フラッシュ補正部8は、フラッシュの影響を受けていない正常な部分と、フラッシュの発光によって高輝度となっている部分と、高輝度となっている部分の上方側または下方側に隣接する隣接領域とに領域に分割する。 Specifically, the flash correction unit 8 of FIG. 10 (a), as described in (b), positioned above the flash start line indicating the detection line information detected in the flash detection processing in step S30 4 Then, an adjacent area adjacent to the flash start line and an adjacent area adjacent to the flash end line are set below the flash end line indicated by the detection line information. The adjacent region may be about 5 to 10 lines. As described above, the flash correction unit 8 is adjacent to a normal part that is not affected by the flash, a part that is bright due to flash emission, and an upper side or a lower side of the part that is high brightness. The area is divided into adjacent areas.

フラッシュ補正部8は、ステップS1407にて、合成比率を生成する。具体的には、フラッシュ補正部8は、図11の(a),(b)で説明したように、式(1),(2)を用いて現在の画面のラインと1画面前の画面のラインとの合成比率(混合率)を生成するか、式(3)を用いて画素単位で現在の画面の画像データと1画面前の画面の画像データとの合成比率(混合率)を生成する。フラッシュ補正部8は、ステップS1408にて、ステップS1407で生成した合成比率によって現在の画面のライン(画素)と1画面前の画面のライン(画素)とを合成して領域置換処理を実行する。   In step S1407, the flash correction unit 8 generates a composition ratio. Specifically, as described in FIGS. 11A and 11B, the flash correction unit 8 uses the formulas (1) and (2) to calculate the current screen line and the previous screen. Generate a composition ratio (mixing ratio) with the line, or use Expression (3) to generate a composition ratio (mixing ratio) between the image data of the current screen and the image data of the previous screen in pixel units. . In step S1408, the flash correction unit 8 combines the current screen line (pixel) and the previous screen line (pixel) by the combination ratio generated in step S1407, and executes region replacement processing.

図14に示すステップS14においては、ステップS1401を画面単位切換モードであるか否かの判定としているが、低遅延モードであるか否かの判定としてもよい。 In Step S14 4 shown in FIG. 14, step S1401 has been a determination of whether a screen unit selection mode may be determined whether the low latency mode.

第4実施形態では、フラッシュ補正部8は、記録再生部11によって画像データを再生する際に、フラッシュ検出部2によって対象画面がフラッシュの発光によって高輝度となっていることが検出されたラインを含む場合には、高輝度となっているラインが再生されないように画像データを補正する再生補正部として動作している。   In the fourth embodiment, when the recording / reproducing unit 11 reproduces the image data, the flash correcting unit 8 detects a line in which the flash detecting unit 2 detects that the target screen is bright due to flash emission. If included, it operates as a reproduction correction unit that corrects the image data so that lines with high luminance are not reproduced.

以上のようにして、第4実施形態においては、記録再生部11に記録された画像データの再生時に、フラッシュの発光によって高輝度となった部分が補正され、補正された画像データが、表示部7やビデオカメラに接続された外部機器としての表示装置に表示される。第4実施形態によれば、表示部7に表示させる画像データの遅延をなくすことができる。また、第4実施形態によれば、画像データは補正されていない状態で記録再生部11に記録されており、画像データの再生時にフラッシュの発光を誤検出したとしても、記録されている画像データには影響を与えない。   As described above, in the fourth embodiment, when the image data recorded in the recording / reproducing unit 11 is reproduced, a portion that has become bright due to flash emission is corrected, and the corrected image data is displayed on the display unit. 7 or a display device as an external device connected to the video camera. According to the fourth embodiment, the delay of the image data displayed on the display unit 7 can be eliminated. According to the fourth embodiment, the image data is recorded in the recording / reproducing unit 11 in an uncorrected state, and the recorded image data is detected even if the flash emission is erroneously detected during the reproduction of the image data. Has no effect.

<第5実施形態>
第5実施形態の画像処理装置の構成は、図1に示す第1実施形態のビデオカメラ101と同様である。第5実施形態は、記録再生部11に記録された画像データを再生する際に用いる再生リスト(プレイリスト)を修正することによって、フラッシュの発光によって高輝度となった部分を補正するように構成している。第5実施形態においては、画像データをフラッシュ補正8ではなく、制御部9によって補正する。
<Fifth Embodiment>
The configuration of the image processing apparatus of the fifth embodiment is the same as that of the video camera 101 of the first embodiment shown in FIG. The fifth embodiment is configured to correct a portion that has become bright due to flash emission by correcting a reproduction list (playlist) used when reproducing image data recorded in the recording / reproducing unit 11. doing. In the fifth embodiment, the image data is corrected not by the flash correction 8 but by the control unit 9.

図16を用いて、第5実施形態によるビデオカメラの動作について説明する。図16において、図12と同一部分には同一符号を付し、その説明を適宜省略することとする。制御部9は、ステップS6〜S9の一連の処理によって記録再生部11に記録する画像データに対応させて再生リストを生成して、記録再生部11に併せて記録する。制御部9は、再生リスト生成部である。   The operation of the video camera according to the fifth embodiment will be described with reference to FIG. In FIG. 16, the same parts as those in FIG. 12 are denoted by the same reference numerals, and the description thereof is omitted as appropriate. The control unit 9 generates a reproduction list corresponding to the image data to be recorded in the recording / reproducing unit 11 through a series of processes in steps S <b> 6 to S <b> 9 and records the reproduction list together with the recording / reproducing unit 11. The control unit 9 is a playlist generation unit.

図17を用いて再生リストについて説明する。ビデオカメラによって撮影されて記録される撮影コンテンツには、それぞれの撮影コンテンツを識別するための識別符号が付される。図17は、識別符号“001”が付された撮影コンテンツC001を再生するための再生リストP001を概念的に示している。再生リストP001は、撮影コンテンツC001を再生開始時刻Tmsで再生を開始し、再生終了時刻Tmeで再生を終了することを示している。撮影コンテンツC001は、ハッチングを付した部分がフラッシュの発光によって高輝度となっているとする。   The reproduction list will be described with reference to FIG. An identification code for identifying each photographed content is attached to the photographed content photographed and recorded by the video camera. FIG. 17 conceptually shows a reproduction list P001 for reproducing the photographed content C001 with the identification code “001”. The reproduction list P001 indicates that reproduction of the photographed content C001 starts at the reproduction start time Tms and ends at the reproduction end time Tme. In the photographed content C001, it is assumed that the hatched portion has high brightness due to flash emission.

制御部9は、ステップS11にて、操作スイッチ12によって、記録再生部11に記録された所定の画像データの再生を開始する指示があったか否かを判定する。再生開始の指示があったと判定されれば(YES)、制御部9は、ステップS13にて、フラッシュ検出領域があるか否かを判定する。フラッシュ検出領域があると判定されれば(YES)、制御部9は、ステップS18にて、再生リストを修正する。ステップS18の再生リストの修正についての詳細は後述する。   In step S <b> 11, the control unit 9 determines whether or not there has been an instruction to start reproduction of predetermined image data recorded in the recording / reproducing unit 11 by the operation switch 12. If it is determined that there is an instruction to start reproduction (YES), the control unit 9 determines whether or not there is a flash detection area in step S13. If it is determined that there is a flash detection area (YES), the control unit 9 corrects the reproduction list in step S18. Details of the correction of the reproduction list in step S18 will be described later.

制御部9は、ステップS12にて、ステップS18で修正された再生リストに基づいて画像データ(符号化データ)を再生させる。図16のステップS15〜S17,S10は図12のステップS15〜S17,S10と同じである。   In step S12, the control unit 9 reproduces image data (encoded data) based on the reproduction list modified in step S18. Steps S15 to S17 and S10 in FIG. 16 are the same as steps S15 to S17 and S10 in FIG.

図17を用いて、ステップS18における再生リストの修正について説明する。図17において、(a)は、再生リストP001に基づいて再生される撮影コンテンツC001の一連のフレームのうち、フラッシュの発光によって高輝度となった部分を含むフレームF2,F3とその前後のフレームF1,F4を示している。図17の(a)はステップS18で修正される前の状態である。なお、図17に示すフレームF1〜F4は、図5の画像Im1〜Im4と実質的に同じであり、ここではフレームと称している。   With reference to FIG. 17, the correction of the playlist in step S18 will be described. In FIG. 17, (a) shows frames F2 and F3 including a portion that has become bright due to flash emission and a frame F1 before and after that in a series of frames of the photographed content C001 reproduced based on the reproduction list P001. , F4. FIG. 17A shows a state before correction in step S18. Note that the frames F1 to F4 shown in FIG. 17 are substantially the same as the images Im1 to Im4 of FIG. 5 and are referred to as frames here.

図17において、(b)は、再生リストP001の修正方法の第1の例によって再生される撮影コンテンツC001のフレームを示している。第1の例では、フレームF1の次にフレームF4を再生するよう、フラッシュの発光によって高輝度となった部分を含むフレームF2,F3をスキップさせるよう再生リストP001を修正する。この場合、撮影コンテンツC001を再生開始時刻Tmsで再生を開始し、フレームF1に続けてフレームF4を再生し、再生終了時刻Tmeで再生を終了するように再生リストP001を修正すればよい。第1の例では、撮影コンテンツC001の再生時間は、フレームF2,F3をスキップさせる分だけ短くなる。   In FIG. 17, (b) shows a frame of the photographed content C001 reproduced by the first example of the method for correcting the reproduction list P001. In the first example, the play list P001 is modified so that the frames F2 and F3 including the portion that has become bright due to the flash emission are skipped so that the frame F4 is played after the frame F1. In this case, the reproduction list P001 may be modified such that the reproduction of the photographed content C001 is started at the reproduction start time Tms, the frame F4 is reproduced after the frame F1, and the reproduction is terminated at the reproduction end time Tme. In the first example, the playback time of the captured content C001 is shortened by skipping frames F2 and F3.

図17において、(c)は、再生リストP001の修正方法の第2の例によって再生される撮影コンテンツC001のフレームを示している。第2の例では、フレームF1の次のフレームF2,F3のタイミングでフレームF1を連続して再生し、その次にフレームF4を再生するよう再生リストP001を修正する。これによって、フレームF2,F3をスキップさせる。第2の例では、撮影コンテンツC001の再生時間は、図17の(a)に示す再生リストP001を修正していない場合と同じである。   In FIG. 17, (c) shows a frame of the photographed content C001 reproduced by the second example of the method of correcting the reproduction list P001. In the second example, the playback list P001 is modified so that the frame F1 is continuously played back at the timing of the frames F2 and F3 next to the frame F1, and then the frame F4 is played back. As a result, the frames F2 and F3 are skipped. In the second example, the reproduction time of the photographed content C001 is the same as that when the reproduction list P001 shown in FIG.

図17において、(d)は、再生リストP001の修正方法の第3の例によって再生される撮影コンテンツC001のフレームを示している。第3の例では、フレームF1の次のフレームF2のタイミングでフレームF1を連続して再生し、フレームF3のタイミングでフレームF4を再生し、その次にフレームF4を再生するよう再生リストP001を修正する。これによって、フレームF2,F3をスキップさせる。第3の例では、撮影コンテンツC001の再生時間は、図17の(a)に示す再生リストP001を修正していない場合と同じである。   In FIG. 17, (d) shows a frame of the photographed content C001 reproduced by the third example of the method of correcting the reproduction list P001. In the third example, the play list P001 is corrected so that the frame F1 is continuously played back at the timing of the frame F2 next to the frame F1, the frame F4 is played back at the timing of the frame F3, and then the frame F4 is played back. To do. As a result, the frames F2 and F3 are skipped. In the third example, the reproduction time of the photographed content C001 is the same as when the reproduction list P001 shown in FIG.

以上のようにして、第5実施形態においては、記録再生部11に記録された画像データを再生リストに基づいて再生する際に、フラッシュの発光によって高輝度となったフレームをスキップさせるよう再生リストが修正され、修正された再生リストに基づいて画像データが再生される。修正された再生リストを記録再生部11に記録してもよい。図16では、ステップS18にて再生リストを修正しているが、ステップS9までに再生リストを修正してもよい。   As described above, in the fifth embodiment, when the image data recorded in the recording / reproducing unit 11 is reproduced based on the reproduction list, the reproduction list is made to skip the frame that has become bright due to flash emission. Is corrected, and the image data is reproduced based on the corrected reproduction list. The corrected reproduction list may be recorded in the recording / reproducing unit 11. In FIG. 16, the playlist is modified in step S18, but the playlist may be modified by step S9.

また、第5実施形態では、ビデオカメラで画像データを再生する際に再生リストを修正することによってフラッシュの発光によって高輝度となったフレームをスキップさせる構成を示しているが、ビデオカメラ以外の再生機器で画像データを再生する場合にも、修正した再生リストに基づいて、フラッシュの発光によって高輝度となったフレームをスキップさせて再生することも可能である。   The fifth embodiment shows a configuration in which a frame that has become bright due to flash emission is skipped by correcting a playlist when playing back image data with a video camera. Even when image data is played back by the device, it is possible to skip and play back frames that have become bright due to flash emission based on the corrected playback list.

第5実施形態では、制御部9は、記録再生部11によって画像データを再生する際に、フラッシュ検出部2によって対象画面がフラッシュの発光によって高輝度となっていることが検出されたラインを含む場合には、高輝度となっているラインが再生されないように画像データを補正する再生補正部として動作している。上記のように制御部9は再生リスト生成部である。制御部9は、画像データの再生時に、高輝度のラインを含む対象画面をスキップさせるよう再生リストを修正する再生リスト修正部としても機能している。また、制御部9は、画像データの再生時に、高輝度のラインを含む対象画面を、フラッシュの発光による影響を受けていない対象画面よりも過去または未来の画面に置換するよう再生リストを修正する再生リスト修正部としても機能している。   In the fifth embodiment, the control unit 9 includes a line in which when the image data is reproduced by the recording / reproducing unit 11, the flash detecting unit 2 detects that the target screen is bright due to flash emission. In such a case, it operates as a reproduction correction unit that corrects image data so that a line with high luminance is not reproduced. As described above, the control unit 9 is a playlist generation unit. The control unit 9 also functions as a playlist correction unit that corrects the playlist so that a target screen including a high-luminance line is skipped during playback of image data. In addition, when the image data is reproduced, the control unit 9 corrects the reproduction list so that the target screen including the high-luminance line is replaced with a screen that is past or future than the target screen that is not affected by the flash emission. It also functions as a playlist correction unit.

第5実施形態によれば、表示部7に表示させる画像データの遅延をなくすことができる。また、第5実施形態によれば、画像データは補正されていない状態で記録再生部11に記録されており、画像データの再生時にフラッシュの発光を誤検出したとしても、記録されている画像データには影響を与えない。   According to the fifth embodiment, the delay of the image data displayed on the display unit 7 can be eliminated. According to the fifth embodiment, the image data is recorded in the recording / reproducing unit 11 in an uncorrected state, and the recorded image data is recorded even if the flash emission is erroneously detected during the reproduction of the image data. Has no effect.

<第6実施形態>
第6実施形態の画像処理装置の構成は、図1に示す第1実施形態のビデオカメラ101と同様である。第6実施形態は、表示部7に表示させる画像データが遅延しないよう、フラッシュの発光によって部分的に高輝度となったとしても画像データを補正しない状態で表示部7に表示させる一方で、フラッシュ補正部8によって補正された画像データを記録再生部(記録部)11に記録させるように構成している。
<Sixth Embodiment>
The configuration of the image processing apparatus of the sixth embodiment is the same as that of the video camera 101 of the first embodiment shown in FIG. In the sixth embodiment, the image data to be displayed on the display unit 7 is displayed on the display unit 7 in a state where the image data is not corrected even when the luminance of the flash is partially increased so that the image data displayed on the display unit 7 is not delayed. The recording / playback unit (recording unit) 11 is configured to record the image data corrected by the correction unit 8.

図19を用いて、第6実施形態によるビデオカメラの動作について説明する。図19において、図3または図12と同一部分には同一符号を付し、その説明を適宜省略することとする。図19のステップS1,S2,S4,S5,S30は、図12のステップS1,S2,S4,S5,S30と同じである。第6実施形態においては、図19に示すように、制御部9は、ステップS6に続き、ステップS13にて、フラッシュ検出領域があるか否かを判定する。   The operation of the video camera according to the sixth embodiment will be described with reference to FIG. 19, the same parts as those in FIG. 3 or FIG. 12 are denoted by the same reference numerals, and the description thereof will be omitted as appropriate. Steps S1, S2, S4, S5 and S30 in FIG. 19 are the same as steps S1, S2, S4, S5 and S30 in FIG. In the sixth embodiment, as shown in FIG. 19, the control unit 9 determines whether or not there is a flash detection area in step S13 following step S6.

フラッシュ検出領域があると判定されれば(YES)、制御部9は、ステップS14にて、フラッシュ補正部8によるフラッシュ補正処理を実行させて、処理をステップS7に移行させる。フラッシュ検出領域があると判定されなければ(NO)、制御部9は、処理をステップS7に移行させる。制御部9は、ステップS7にて、圧縮伸張処理部5より出力された符号化データを記録再生部11に記録させる。図19のステップS8〜S10は、図3のステップS8〜S10と同じである。   If it is determined that there is a flash detection area (YES), the control unit 9 causes the flash correction unit 8 to execute flash correction processing in step S14, and shifts the processing to step S7. If it is not determined that there is a flash detection area (NO), the controller 9 shifts the process to step S7. In step S7, the control unit 9 causes the recording / reproducing unit 11 to record the encoded data output from the compression / decompression processing unit 5. Steps S8 to S10 in FIG. 19 are the same as steps S8 to S10 in FIG.

図20を用いて、図19に示すステップS14のフラッシュ補正処理の詳細について説明する。第6実施形態におけるステップS14をステップS14とする。図20に示すステップS14において、図14に示すステップS14と同一部分には同一符号を付し、その説明を適宜省略することとする。図20のステップS1401〜S1403,S1405〜S1408は、図14のステップS1401〜S1403,S1405〜S1408と同じである。 The details of the flash correction processing in step S14 shown in FIG. 19 will be described with reference to FIG. Step S14 in the sixth embodiment and Step S14 6. In Step S14 6 shown in FIG. 20, the same reference numeral is given to the step S14 4 the same parts as shown in FIG. 14, and explanation thereof will be omitted as occasion demands. Steps S1401 to S1403 and S1405 to S1408 in FIG. 20 are the same as steps S1401 to S1403 and S1405 to S1408 in FIG.

第6実施形態においては、図20に示すように、ステップS1403にて2画面目であると判定された場合には、フラッシュ補正部8は、ステップS1409にて、2画面前の画面に置換する。   In the sixth embodiment, as shown in FIG. 20, when it is determined in step S1403 that the screen is the second screen, the flash correction unit 8 replaces the screen two screens before in step S1409. .

図21において、(a)は補正前の画像Im1,Im2,Im3,Im4…を示している。図2,図5,図15と同様、ハッチングを付した部分がフラッシュの発光によって高輝度となっている部分である。図21の(b)に示すように、高輝度の部分を有する1画面目の画像Im2は、ステップS1405にて、1画面前の画像Im1に置換され、高輝度の部分を有する2画面目の画像Im3も、ステップS1409にて、1画面前の画像Im1に置換される。   21A shows images Im1, Im2, Im3, Im4,... Before correction. Similar to FIGS. 2, 5, and 15, the hatched portion is a portion with high brightness due to flash emission. As shown in FIG. 21B, the image Im2 of the first screen having the high brightness portion is replaced with the image Im1 of the previous screen in step S1405, and the second screen having the high brightness portion. The image Im3 is also replaced with the previous image Im1 in step S1409.

第6実施形態では、フラッシュ補正部8は、フラッシュ検出部2によって対象画面内のラインがフラッシュの発光によって高輝度となっていることが検出された場合には、対象画面における高輝度となっているラインを保持部であるバッファメモリ4に保持された過去の画面のラインに置換することにより画像データを補正する。このとき、フラッシュ補正部8は、対象画面の全体を、フラッシュの発光による影響を受けていない過去の画面に置換してもよい。   In the sixth embodiment, when the flash detection unit 2 detects that the line in the target screen has high luminance due to flash emission, the flash correction unit 8 has high luminance in the target screen. The image data is corrected by replacing the existing line with the line of the past screen held in the buffer memory 4 as the holding unit. At this time, the flash correction unit 8 may replace the entire target screen with a past screen that is not affected by the flash emission.

第6実施形態では、制御部9は、フラッシュ補正部8によって補正された画像データを記録再生部11に記録させる。一方で、制御部9は、出力信号処理部6によって、フラッシュ補正部8によって補正されていない状態の画像データを、ビデオカメラ内蔵の表示部7または外部の表示部に表示させる。   In the sixth embodiment, the control unit 9 causes the recording / playback unit 11 to record the image data corrected by the flash correction unit 8. On the other hand, the control unit 9 causes the output signal processing unit 6 to display the image data that has not been corrected by the flash correction unit 8 on the display unit 7 built in the video camera or an external display unit.

以上のようにして、第6実施形態においては、フラッシュの発光によって部分的に高輝度となったとしても、画像データは補正されない状態で表示部7やビデオカメラに接続された外部機器としての表示部である表示装置に表示される。記録再生部11には、フラッシュ補正部8によって補正された画像データ(符号化データ)が記録される。第6実施形態によれば、表示部7に表示させる画像データの遅延をなくすことができ、記録再生部11にはフラッシュの発光によって高輝度となった部分が補正された正常な画像データを記録することができる。   As described above, in the sixth embodiment, even when the brightness of the flash is partially increased, the image data is not corrected and displayed as an external device connected to the display unit 7 or the video camera. Displayed on the display device. The recording / playback unit 11 records image data (encoded data) corrected by the flash correction unit 8. According to the sixth embodiment, the delay of the image data to be displayed on the display unit 7 can be eliminated, and normal image data in which the high brightness portion is corrected by the flash emission is recorded in the recording / reproducing unit 11. can do.

<第7実施形態>
第7実施形態の画像処理装置の構成は、図6に示す第2実施形態のビデオカメラ102と同様である。第7実施形態は、図6に示すビデオカメラ102の構成で、図12の第4実施形態と同様に、フラッシュの発光によって部分的に高輝度となったとしても画像データを補正せず記録再生部11に記録させ、記録再生部11に記録された画像データの再生時に画像データを補正するように構成したものである。即ち、第7実施形態は、フラッシュ検出部2によって実行される図12のステップS30を、図6のフラッシュ検出部20によって実行されるステップS30に置換したものに相当する。
<Seventh embodiment>
The configuration of the image processing apparatus of the seventh embodiment is the same as that of the video camera 102 of the second embodiment shown in FIG. In the seventh embodiment, the configuration of the video camera 102 shown in FIG. 6 is similar to the fourth embodiment shown in FIG. 12, and even if the brightness is partially increased by flash emission, image data is not corrected and recorded and reproduced. The image data is recorded in the unit 11 and the image data is corrected when the image data recorded in the recording / reproducing unit 11 is reproduced. That is, the seventh embodiment corresponds to the step S30 executed by the flash detection unit 2 in FIG. 12 replaced with the step S30 executed by the flash detection unit 20 shown in FIG.

第7実施形態におけるステップS30をステップS30とし、図22を用いて第7実施形態におけるステップS30について説明する。以下の各ステップは、制御部9による制御に基づいてフラッシュ検出部20によって実行される。図22において、フラッシュ検出部20は、ステップS3701にて、有効ラインにおける各ブロックの有効画素の画素値を加算する処理を有効ラインごとに順次実行する。フラッシュ検出部20は、ステップS3702にて、ステップS3701にて得た各ブロックの画素値の加算値をブロック内の有効画素数で除算してブロック平均輝度を算出し、ブロック平均輝度を保持する。 The step S30 in the seventh embodiment and the step S30 7, step S30 7 will be described in the seventh embodiment with reference to FIG. 22. The following steps are executed by the flash detection unit 20 based on control by the control unit 9. In FIG. 22, in step S3701, the flash detection unit 20 sequentially executes the process of adding the pixel values of the effective pixels of each block in the effective line for each effective line. In step S3702, the flash detection unit 20 calculates the block average luminance by dividing the addition value of the pixel values of each block obtained in step S3701 by the number of effective pixels in the block, and holds the block average luminance.

フラッシュ検出部20は、ステップS3703にて、ステップS3702で算出したブロック平均輝度と1画面前の全画面平均輝度との差分演算の処理を実行する。ステップS3703における差分演算処理は、ステップS3702でブロック平均輝度を算出するたびに実行される。フラッシュ検出部20は、ステップS3704にて、1ライン内のブロック平均輝度を加算し、ステップS3705にて、ブロック平均輝度の加算値をブロック数で除算してライン平均輝度を算出し、ライン平均輝度を保持する。   In step S3703, the flash detection unit 20 performs a difference calculation process between the block average luminance calculated in step S3702 and the average luminance of the entire screen one screen before. The difference calculation process in step S3703 is executed every time the block average luminance is calculated in step S3702. In step S3704, the flash detection unit 20 adds the block average luminance in one line, and in step S3705, calculates the line average luminance by dividing the added value of the block average luminance by the number of blocks. Hold.

フラッシュ検出部20は、ステップS3706にて、ライン平均輝度を順次加算する処理を実行する。フラッシュ検出部20は、ステップS3707にて、ステップS3705で算出したライン平均輝度と1画面前の全画面平均輝度との差分演算の処理を実行する。ステップS3707における差分演算処理は、ステップS3705でライン平均輝度を算出するたびに実行される。   In step S3706, the flash detection unit 20 performs a process of sequentially adding line average luminance. In step S3707, the flash detection unit 20 executes a difference calculation process between the line average luminance calculated in step S3705 and the average average luminance of the previous screen. The difference calculation process in step S3707 is executed every time the line average luminance is calculated in step S3705.

フラッシュ検出部20は、ステップS3708にて、フラッシュの発光を検出していない通常状態であるか否かを判定する。通常状態であると判定されれば(YES)、フラッシュ検出部20は、ステップS3709にて、ライン平均輝度と全画面平均輝度との差分値が閾値(閾値1)以上のラインを検出したか否かを判定する。   In step S3708, the flash detection unit 20 determines whether or not it is a normal state in which flash emission is not detected. If it is determined that the current state is the normal state (YES), in step S3709, the flash detection unit 20 detects whether a line whose difference value between the line average luminance and the entire screen average luminance is equal to or greater than a threshold (threshold 1). Determine whether.

ライン平均輝度と全画面平均輝度との差分値が閾値以上のラインを検出したと判定されれば(YES)、フラッシュ検出部20は、処理をステップS3710に移行させ、ライン平均輝度と全画面平均輝度との差分値が閾値以上のラインを検出したと判定されなければ(NO)、フラッシュ検出部20は、処理をステップS3715に移行させる。ライン平均輝度と全画面平均輝度との差分値が閾値以上のラインを検出しなければ、フラッシュは発光していないということである。   If it is determined that a line whose difference value between the line average luminance and the entire screen average luminance is equal to or greater than the threshold is detected (YES), the flash detection unit 20 shifts the process to step S3710, and the line average luminance and the entire screen average. If it is not determined that a line having a difference value with respect to the luminance is not less than the threshold value (NO), the flash detection unit 20 moves the process to step S3715. If a line having a difference value between the line average brightness and the full screen average brightness of a threshold value or more is not detected, the flash is not emitting light.

フラッシュ検出部20は、ライン平均輝度と全画面平均輝度との差分値が閾値以上のラインを検出した場合、さらに、ステップS3710にて、そのライン内のそれぞれのブロック平均輝度と全画面平均輝度との差分値が閾値(閾値2)以上であるか否かを判定する。フラッシュ検出部20は、それぞれのブロック平均輝度と全画面平均輝度との差分値が閾値以上であると判定されれば(YES)、フラッシュ検出部20は、処理をステップS3711に移行させる。なお、この際、フラッシュ検出部2は、検出したラインがフレームの最初のラインから何ライン目かを示す検出ライン情報を記憶しておく。   If the flash detection unit 20 detects a line whose difference value between the line average luminance and the entire screen average luminance is equal to or larger than the threshold, the flash detection unit 20 further determines each block average luminance and the entire screen average luminance in the line in step S3710. It is determined whether or not the difference value is equal to or greater than a threshold value (threshold value 2). If the flash detection unit 20 determines that the difference value between each block average luminance and the entire screen average luminance is equal to or greater than the threshold (YES), the flash detection unit 20 shifts the processing to step S3711. At this time, the flash detection unit 2 stores detected line information indicating the number of detected lines from the first line of the frame.

一方、それぞれのブロック平均輝度と全画面平均輝度との差分値が閾値以上であると判定されなければ(NO)、フラッシュ検出部20は、既に検出ライン情報を記憶している場合は、それを消去するとともに、処理をステップS3715に移行させる。   On the other hand, if it is not determined that the difference value between each block average luminance and the entire screen average luminance is equal to or greater than the threshold (NO), the flash detection unit 20 stores the detected line information if it is already stored. While erasing, the process proceeds to step S3715.

フラッシュ検出部20は、ステップS3711にて、ライン平均輝度と全画面平均輝度との差分値が閾値以上であり、それぞれのブロック平均輝度と全画面平均輝度との差分値が閾値以上であるという2つの条件を満たすラインが所定ライン数以上継続したか否かを判定する。所定ライン数以上継続したと判定されれば(YES)、フラッシュ検出部20は処理をステップS3714に移行させ、所定ライン数以上継続したと判定されなければ(NO)、フラッシュ検出部20は処理をステップS3715に移行させる。   In step S <b> 3711, the flash detection unit 20 determines that the difference value between the line average luminance and the entire screen average luminance is equal to or greater than the threshold, and the difference value between each block average luminance and the entire screen average luminance is equal to or greater than the threshold. It is determined whether or not the number of lines that satisfy one condition continues for a predetermined number of lines or more. If it is determined that the predetermined number of lines or more have been continued (YES), the flash detection unit 20 shifts the process to step S3714. If it is not determined that the predetermined number of lines or more has been continued (NO), the flash detection unit 20 performs the process. The process proceeds to step S3715.

フラッシュ検出部20は、ステップS3714にて、フラッシュの発光を検出していない状態からフラッシュの発光を検出した状態へとフラッシュ検出状態を変更する。また、フラッシュ検出部20は、記憶している検出ライン情報をフラッシュ補正部8に供給し、検出ライン情報を消去する。   In step S3714, the flash detection unit 20 changes the flash detection state from a state in which flash emission is not detected to a state in which flash emission is detected. In addition, the flash detection unit 20 supplies the stored detection line information to the flash correction unit 8 and erases the detection line information.

一方、ステップS3708にて通常状態であると判定されなければ(NO)、フラッシュ検出部20は、ステップS3712にて、ライン平均輝度と全画面平均輝度との差分値が閾値未満であるか、または、それぞれのブロック平均輝度と全画面平均輝度との差分値が閾値未満であるラインを検出したか否かを判定する。少なくとも一方を満たさないラインが現れたと判定されれば(YES)、フラッシュ検出部20は処理をステップS3713に移行させる。この際、フラッシュ検出部20は、検出したラインがフレームの最初のラインから何ライン目かを示す検出ライン情報を記憶しておく。   On the other hand, if it is not determined in step S3708 that the current state is normal (NO), the flash detection unit 20 determines in step S3712 that the difference value between the line average brightness and the full screen average brightness is less than the threshold value, or Then, it is determined whether or not a line in which the difference value between each block average luminance and the entire screen average luminance is less than the threshold is detected. If it is determined that a line that does not satisfy at least one appears (YES), the flash detection unit 20 moves the process to step S3713. At this time, the flash detection unit 20 stores detection line information indicating the number of detected lines from the first line of the frame.

少なくとも一方を満たさないラインが現れたと判定されなければ(NO)、フラッシュ検出部20は、処理をステップS3715に移行させる。   If it is not determined that a line that does not satisfy at least one appears (NO), the flash detection unit 20 moves the process to step S3715.

フラッシュ検出部20は、ステップS3713にて、上記の2つの条件の少なくとも一方を満たさない状態が所定ライン数以上継続したか否かを判定する。所定ライン数以上継続したと判定されれば(YES)、フラッシュ検出部20は処理をステップS3714に移行させ、所定ライン数以上継続したと判定されなければ(NO)、フラッシュ検出部20は処理をステップS3715に移行させる。   In step S3713, the flash detection unit 20 determines whether or not a state in which at least one of the above two conditions is not satisfied continues for a predetermined number of lines or more. If it is determined that the predetermined number of lines or more have been continued (YES), the flash detection unit 20 shifts the process to step S3714. If it is not determined that the predetermined number of lines or more has been continued (NO), the flash detection unit 20 performs the process. The process proceeds to step S3715.

フラッシュ検出部20は、ステップS3714にて、フラッシュの発光を検出した状態からフラッシュの発光を検出していない状態へとフラッシュ検出状態を変更する。また、フラッシュ検出部20は、記憶している検出ライン情報をフラッシュ補正部8に供給し、検出ライン情報を消去する。   In step S3714, the flash detection unit 20 changes the flash detection state from the state where the flash emission is detected to the state where the flash emission is not detected. In addition, the flash detection unit 20 supplies the stored detection line information to the flash correction unit 8 and erases the detection line information.

フラッシュ検出部20は、ステップS3715にて、全有効ラインに対する判定が終了したか否かを判定する。全有効ラインに対する判定が終了したと判定されれば(YES)、フラッシュ検出部20は、処理をステップS3716に移行させ、全有効ラインが終了したと判定されなければ(NO)、フラッシュ検出部20は、処理をステップS3701に戻してステップS3701以降を繰り返す。フラッシュ検出部20は、ステップS3716にて、ライン平均輝度の加算値を有効ライン数で除算して全画面平均輝度を算出し、全画面平均輝度を保持する。   In step S3715, the flash detection unit 20 determines whether the determination for all active lines is completed. If it is determined that the determination for all the effective lines is completed (YES), the flash detection unit 20 shifts the processing to step S3716. If it is not determined that all the effective lines are completed (NO), the flash detection unit 20 Returns the process to step S3701 and repeats step S3701 and subsequent steps. In step S3716, the flash detection unit 20 calculates the total screen average brightness by dividing the added value of the line average brightness by the number of effective lines, and holds the total screen average brightness.

<第8実施形態>
図6に示す第2実施形態のビデオカメラ102と同様の構成の画像処理装置とし、第5実施形態と同様に、記録再生部11に記録された画像データを再生する際に用いる再生リストを修正することによって、フラッシュの発光によって高輝度となった部分を補正するように構成することができる。
<Eighth Embodiment>
The image processing apparatus having the same configuration as that of the video camera 102 according to the second embodiment shown in FIG. 6 is used, and the reproduction list used when reproducing the image data recorded in the recording / reproducing unit 11 is corrected as in the fifth embodiment. By doing so, it is possible to correct the portion that has become bright due to the flash emission.

<第9実施形態>
図6に示す第2実施形態のビデオカメラ102と同様の構成の画像処理装置とし、第6実施形態と同様に、フラッシュの発光によって部分的に高輝度となった画像データを補正しない状態で表示部7に表示させ、フラッシュ補正部8によって補正された画像データを記録再生部11に記録させるように構成することができる。
<Ninth Embodiment>
An image processing apparatus having the same configuration as that of the video camera 102 of the second embodiment shown in FIG. 6 is displayed in a state where image data partially increased in brightness due to flash emission is not corrected, as in the sixth embodiment. The image data displayed on the unit 7 and corrected by the flash correction unit 8 can be configured to be recorded on the recording / playback unit 11.

本発明は以上説明した各実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々変更可能である。各実施形態ではビデオカメラを例としたが、画像データを扱う任意の電子機器において本発明の画像処理装置、画像処理方法、画像処理プログラムを用いることができる。例えば、画像表示装置やコンピュータ等の情報処理装置において各実施形態の画像処理装置を搭載し、画面の一部が高輝度となっている画像データを画像表示装置や情報処理装置の内部で補正するようにしてもよい。   The present invention is not limited to the embodiments described above, and various modifications can be made without departing from the scope of the present invention. In each embodiment, a video camera is taken as an example. However, the image processing apparatus, the image processing method, and the image processing program of the present invention can be used in any electronic device that handles image data. For example, the image processing apparatus according to each embodiment is mounted on an information processing apparatus such as an image display apparatus or a computer, and image data in which part of the screen has high brightness is corrected inside the image display apparatus or information processing apparatus. You may do it.

また、各実施形態においては、画像信号処理部3での処理を終了した映像データを補正する構成を示したが、画像信号処理部3で処理する前の映像データを補正してもよい。各実施形態においては、画像信号処理部3や圧縮伸張処理部5とは独立して設けたバッファメモリ4を用いる構成を示したが、画像信号処理部3や圧縮伸張処理部5で使用するバッファメモリを用いてもよく、回路(ブロック)構成は適宜に変更が可能である。   Moreover, in each embodiment, although the structure which correct | amends the video data which completed the process in the image signal processing part 3 was shown, you may correct | amend the video data before processing by the image signal processing part 3. FIG. In each embodiment, the configuration using the buffer memory 4 provided independently of the image signal processing unit 3 and the compression / decompression processing unit 5 has been described. However, the buffer used in the image signal processing unit 3 and the compression / decompression processing unit 5 is described. A memory may be used, and the circuit (block) configuration can be changed as appropriate.

本発明の画像処理プログラムを記録媒体に記録して提供してもよく、インターネット等の通信回線にて画像処理プログラムを配信してもよい。記録媒体に記録された画像処理プログラムや通信回線にて配信された画像処理プログラムを画像処理装置に記憶させて、上述した画像処理方法を実行させるようにしてもよい。   The image processing program of the present invention may be provided by being recorded on a recording medium, or the image processing program may be distributed through a communication line such as the Internet. An image processing program recorded on a recording medium or an image processing program distributed via a communication line may be stored in an image processing apparatus to execute the above-described image processing method.

1 撮像部
1s CMOSセンサ
2,20 フラッシュ検出部
3 画像信号処理部
4 バッファメモリ(保持部)
5 圧縮伸張処理部
6 出力信号処理部
7 表示部
8 フラッシュ補正部(再生補正部)
9 制御部(再生補正部,再生リスト生成部,再生リスト修正部,コンピュータ)
10 メモリ
11 記録再生部(記録部)
12 操作スイッチ
21,203 ライン平均輝度算出部
23,205 全画面平均輝度算出部
25,207 差分算出部
26,208 フラッシュ判定部
101,102 ビデオカメラ
201 ブロック平均輝度算出部
DESCRIPTION OF SYMBOLS 1 Image pick-up part 1s CMOS sensor 2,20 Flash detection part 3 Image signal processing part 4 Buffer memory (holding part)
5 Compression / Expansion Processing Unit 6 Output Signal Processing Unit 7 Display Unit 8 Flash Correction Unit (Reproduction Correction Unit)
9 Control unit (playback correction unit, playlist creation unit, playlist modification unit, computer)
10 memory 11 recording / reproducing unit (recording unit)
12 operation switches 21, 203 line average luminance calculation unit 23, 205 full screen average luminance calculation unit 25, 207 difference calculation unit 26, 208 flash determination unit 101, 102 video camera 201 block average luminance calculation unit

Claims (7)

フラッシュの発光によって高輝度となっているラインを含むか否かの検出対象となっている画像データ内の対象画面におけるそれぞれのラインのライン平均輝度と、前記対象画面の少なくとも1画面前の画面である過去の画面の全画面平均輝度とを算出し、それぞれのラインの前記ライン平均輝度と前記全画面平均輝度とを比較することによって、前記対象画面内のラインがフラッシュの発光によって高輝度となっているか否かを検出するフラッシュ検出部と、
前記画像データの前記過去の画面を保持する保持部と、
前記フラッシュ検出部によって前記対象画面内のラインがフラッシュの発光によって高輝度となっていることが検出された場合には、前記対象画面における高輝度となっているラインを前記保持部に保持された前記過去の画面のラインに置換することにより画像データを補正するフラッシュ補正部と、
前記フラッシュ補正部によって補正された前記画像データを記録する記録部と、
前記フラッシュ補正部によって補正されていない状態の前記画像データを表示部に表示させるよう前記表示部に出力する出力信号処理部と、
を備えることを特徴とする画像処理装置。
The line average brightness of each line in the target screen in the image data to be detected whether or not it includes a line having high brightness due to flash emission, and at least one screen before the target screen By calculating the total screen average brightness of a past screen and comparing the line average brightness of each line with the total screen average brightness, the lines in the target screen become high brightness by flash emission. A flash detector for detecting whether or not
A holding unit for holding the past screen of the image data;
When the flash detection unit detects that the line in the target screen has high luminance due to flash emission, the high luminance line in the target screen is held in the holding unit. A flash correction unit that corrects image data by replacing the line with the past screen;
A recording unit for recording the image data corrected by the flash correction unit;
An output signal processing unit that outputs to the display unit the image data that has not been corrected by the flash correction unit to be displayed on the display unit;
An image processing apparatus comprising:
前記フラッシュ補正部は、前記対象画面の全体を、フラッシュの発光による影響を受けていない前記過去の画面に置換することを特徴とする請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the flash correction unit replaces the entire target screen with the past screen that is not affected by flash emission. 前記フラッシュ検出部は、フラッシュの発光によって高輝度となっている最初のラインであるフラッシュ開始ラインと最後のラインであるフラッシュ終了ラインとを検出し、
前記フラッシュ補正部は、前記フラッシュ開始ラインよりも上方に位置し、前記フラッシュ開始ラインに隣接する第1の隣接領域と、前記フラッシュ終了ラインよりも下方に位置し、前記フラッシュ終了ラインに隣接する第2の隣接領域とをそれぞれ設定し、前記第1の隣接領域では、前記第1の隣接領域の最初のラインから最後のラインに進行するに従って前記対象画面の画像データを順次減少させ、前記過去の画面の画像データを順次増加させるように両者の画像データを混合し、前記第2の隣接領域では、前記第2の隣接領域の最初のラインから最後のラインに進行するに従って前記過去の画面の画像データを順次減少させ、前記対象画面の画像データを順次増加させるように両者の画像データを混合する
ことを特徴とする請求項1記載の画像処理装置。
The flash detection unit detects a flash start line and a flash end line that are the first line that has become bright due to flash emission, and the last line,
The flash correction unit is positioned above the flash start line, adjacent to the flash start line, positioned below the flash end line, and adjacent to the flash end line. 2 adjacent areas are set, and in the first adjacent area, the image data of the target screen is sequentially decreased as the first line advances from the first line to the last line of the first adjacent area, and the past The image data of both is mixed so that the image data of the screen is sequentially increased, and in the second adjacent area, the image of the past screen is progressed from the first line to the last line of the second adjacent area. The both image data are mixed so that the data is sequentially decreased and the image data of the target screen is sequentially increased. The image processing apparatus described.
前記フラッシュ検出部は、フラッシュの発光によって高輝度となっている最初のラインであるフラッシュ開始ラインと最後のラインであるフラッシュ終了ラインとを検出し、
前記フラッシュ補正部は、前記フラッシュ開始ラインよりも上方に位置し、前記フラッシュ開始ラインに隣接する第1の隣接領域と、前記フラッシュ終了ラインよりも下方に位置し、前記フラッシュ終了ラインに隣接する第2の隣接領域とをそれぞれ設定し、前記第1及び第2の隣接領域では、前記第1及び第2の隣接領域内のそれぞれの画素の明るさが第1の閾値より小さければ前記対象画面の画素データのみとし、前記第1の閾値より大きい値である第2の閾値より大きければ前記過去の画面の画素データのみとし、前記第1の閾値以上前記第2の閾値以下であれば前記対象画面の画素データと前記過去の画面の画素データとを混合する
ことを特徴とする請求項1記載の画像処理装置。
The flash detection unit detects a flash start line and a flash end line that are the first line that has become bright due to flash emission, and the last line,
The flash correction unit is positioned above the flash start line, adjacent to the flash start line, positioned below the flash end line, and adjacent to the flash end line. 2 adjacent regions, and if the brightness of each pixel in the first and second adjacent regions is smaller than a first threshold in the first and second adjacent regions, Only the pixel data is set, and if it is larger than the second threshold value, which is larger than the first threshold value, only the past screen pixel data is set. If it is not less than the first threshold value and not more than the second threshold value, the target screen is set. The image processing apparatus according to claim 1, wherein the pixel data and the pixel data of the past screen are mixed.
前記フラッシュ検出部は、
前記対象画面におけるラインを複数のブロックに分割したそれぞれのブロックのブロック平均輝度を算出するブロック平均輝度算出部と、
前記ブロック平均輝度算出部で算出された1ラインにおけるブロック平均輝度に基づいて、前記対象画面におけるそれぞれのラインのライン平均輝度を算出するライン平均輝度算出部と、
前記ライン平均輝度算出部で算出された1画面におけるそれぞれのラインのライン平均輝度に基づいて、前記過去の画面の全画面平均輝度を算出する全画面平均輝度算出部と、
前記ブロック平均輝度と前記全画面平均輝度との差分と、前記ライン平均輝度と前記全画面平均輝度との差分とをそれぞれ算出する差分算出部と、
前記ライン平均輝度と前記全画面平均輝度との差分が第1の閾値以上であり、前記ブロック平均輝度と前記全画面平均輝度との差分が第2の閾値以上である条件が所定ライン以上継続した場合にフラッシュの発光によって高輝度となっていると判定するフラッシュ判定部と、
を有することを特徴とする請求項1〜4のいずれか1項に記載の画像処理装置。
The flash detection unit
A block average luminance calculating unit for calculating a block average luminance of each block obtained by dividing a line in the target screen into a plurality of blocks;
A line average luminance calculating unit that calculates a line average luminance of each line in the target screen based on the block average luminance in one line calculated by the block average luminance calculating unit;
A full-screen average luminance calculating unit that calculates the full-screen average luminance of the past screen based on the line average luminance of each line in one screen calculated by the line-average luminance calculating unit;
A difference calculating unit for calculating a difference between the block average luminance and the full screen average luminance, and a difference between the line average luminance and the full screen average luminance, respectively;
The condition that the difference between the line average luminance and the full screen average luminance is equal to or greater than a first threshold and the difference between the block average luminance and the full screen average luminance is equal to or greater than a second threshold continues for a predetermined line or more. A flash determination unit that determines that the brightness is high due to flash emission,
The image processing apparatus according to claim 1, wherein the image processing apparatus includes:
フラッシュの発光によって高輝度となっているラインを含むか否かの検出対象となっている画像データ内の対象画面におけるそれぞれのラインのライン平均輝度を算出し、
前記対象画面の少なくとも1画面前の画面である過去の画面の全画面平均輝度を算出し、
それぞれのラインの前記ライン平均輝度と前記全画面平均輝度とを比較することによって、前記対象画面内のラインがフラッシュの発光によって高輝度となっているか否かを検出し、
前記画像データの前記過去の画面を保持部に保持し、
前記対象画面内のラインがフラッシュの発光によって高輝度となっていることが検出された場合には、前記対象画面における高輝度となっているラインを前記保持部に保持された前記過去の画面のラインに置換することにより前記画像データを補正し、
補正された前記画像データを記録部に記録し、
補正されていない状態の前記画像データを表示部に表示させる
ことを特徴とする画像処理方法。
Calculate the line average brightness of each line in the target screen in the image data that is the target of detection whether or not it includes a line that is bright due to flash emission,
Calculating a total screen average brightness of a past screen which is a screen at least one screen before the target screen;
By comparing the line average brightness of each line and the entire screen average brightness, it is detected whether the line in the target screen is high brightness due to flash emission,
Holding the past screen of the image data in a holding unit;
When it is detected that a line in the target screen has high luminance due to flash emission, a line having high luminance in the target screen is stored in the past screen held in the holding unit. Correct the image data by replacing it with a line,
Record the corrected image data in a recording unit,
An image processing method, comprising: displaying the image data in an uncorrected state on a display unit.
コンピュータに、
フラッシュの発光によって高輝度となっているラインを含むか否かの検出対象となっている画像データ内の対象画面におけるそれぞれのラインのライン平均輝度を算出する機能と、
前記対象画面の少なくとも1画面前の画面である過去の画面の全画面平均輝度を算出する機能と、
それぞれのラインの前記ライン平均輝度と前記全画面平均輝度とを比較することによって、前記対象画面内のラインがフラッシュの発光によって高輝度となっているか否かを検出する機能と、
前記画像データの前記過去の画面を保持部に保持させる機能と、
前記対象画面内のラインがフラッシュの発光によって高輝度となっていることが検出された場合には、前記対象画面における高輝度となっているラインを前記保持部に保持された前記過去の画面のラインに置換することにより前記画像データを補正する機能と、
補正された前記画像データを記録部に記録させる機能と、
補正されていない状態の前記画像データを表示部に表示させる機能と、
を実現させることを特徴とする画像処理プログラム。
On the computer,
A function for calculating the line average brightness of each line in the target screen in the image data that is the target of detection whether or not it includes a line that is bright due to flash emission;
A function of calculating a total screen average brightness of a past screen which is a screen at least one screen before the target screen;
A function of detecting whether or not the line in the target screen has a high luminance due to flash emission by comparing the line average luminance of each line and the whole screen average luminance;
A function for holding the past screen of the image data in a holding unit;
When it is detected that a line in the target screen has high luminance due to flash emission, a line having high luminance in the target screen is stored in the past screen held in the holding unit. A function of correcting the image data by replacing with a line;
A function of causing the recording unit to record the corrected image data;
A function of causing the display unit to display the image data in an uncorrected state;
An image processing program characterized by realizing the above.
JP2012090107A 2012-04-11 2012-04-11 Image processing apparatus, image processing method, and image processing program Active JP5757472B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012090107A JP5757472B2 (en) 2012-04-11 2012-04-11 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012090107A JP5757472B2 (en) 2012-04-11 2012-04-11 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2013219658A JP2013219658A (en) 2013-10-24
JP5757472B2 true JP5757472B2 (en) 2015-07-29

Family

ID=49591279

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012090107A Active JP5757472B2 (en) 2012-04-11 2012-04-11 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP5757472B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6494351B2 (en) * 2015-03-20 2019-04-03 キヤノン株式会社 Image processing apparatus, image processing method, program, and storage medium

Also Published As

Publication number Publication date
JP2013219658A (en) 2013-10-24

Similar Documents

Publication Publication Date Title
JP5144481B2 (en) Imaging apparatus and imaging method
WO2009098877A1 (en) Image processing device and image processing method
US9185294B2 (en) Image apparatus, image display apparatus and image display method
JP2017022610A (en) Image processing apparatus and image processing method
JP2006245999A (en) Imaging apparatus and program
JP5928319B2 (en) Image processing apparatus and method
JP2013192200A (en) Image processing apparatus, image processing method, and image processing program
JP4952574B2 (en) Image composition apparatus and program
JP5413625B2 (en) Image composition apparatus and program
JP2012075082A (en) Moving image playback system and image capturing apparatus
US20130208144A1 (en) Image processing device, image processing method, image processing program
JP2004072550A (en) Imaging device and picture reproducing device
JP2010021710A (en) Imaging device, image processor, and program
JP5757472B2 (en) Image processing apparatus, image processing method, and image processing program
JP5900278B2 (en) Image processing apparatus and method
JP5757471B2 (en) Image processing apparatus, image processing method, and image processing program
JP5910613B2 (en) Image composition apparatus and program
JP5900217B2 (en) Image processing apparatus and method
JP6075829B2 (en) IMAGING DEVICE, CAMERA SYSTEM, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP5928290B2 (en) Image processing apparatus, image processing method, and image processing program
JP4985716B2 (en) Imaging apparatus, method for setting focus evaluation area, and program
JP4964062B2 (en) Electronic camera
JP4827811B2 (en) Electronic camera
JP5208295B2 (en) Imaging apparatus and control method thereof
JP2006148456A (en) Electronic camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140829

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150413

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

R150 Certificate of patent or registration of utility model

Ref document number: 5757472

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150524