JP2009297133A - Apparatus and method for processing endoscope image - Google Patents
Apparatus and method for processing endoscope image Download PDFInfo
- Publication number
- JP2009297133A JP2009297133A JP2008152716A JP2008152716A JP2009297133A JP 2009297133 A JP2009297133 A JP 2009297133A JP 2008152716 A JP2008152716 A JP 2008152716A JP 2008152716 A JP2008152716 A JP 2008152716A JP 2009297133 A JP2009297133 A JP 2009297133A
- Authority
- JP
- Japan
- Prior art keywords
- image
- gradation
- matrix
- endoscope
- endoscopic
- 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.)
- Withdrawn
Links
Images
Landscapes
- Endoscopes (AREA)
Abstract
Description
本発明は、内視鏡を用いて撮影した内視鏡画像から分光推定画像を生成する内視鏡画像処理装置および方法に関するものである。 The present invention relates to an endoscopic image processing apparatus and method for generating a spectral estimation image from an endoscopic image photographed using an endoscope.
近年、固体撮像素子を用いた電子内視鏡装置では、消化器官(胃粘膜等)における分光反射率に基づき、狭帯域バンドパスフィルタを組み合わせた分光イメージング、すなわち狭帯域フィルタ内蔵電子内視鏡装置(Narrow Band Imaging-NBl)が注目されている。この装置は、面順次式のR(赤),G(緑),B(青)の回転フィルタの代わりに、3つの狭(波長)帯域のバンドパスフィルタを設け、これら狭帯域バンドパスフィルタを介して照明光を順次出力し、これらの照明光で得られた3つの信号に対しそれぞれの重み付けを変えながらR,G,B(RGB)信号の場合と同様の処理を行うことにより、分光画像を形成するものである。このような分光画像によれば、胃、大腸等の消化器において、従来では得られなかった微細構造等が抽出される。 In recent years, in an electronic endoscope apparatus using a solid-state image sensor, spectral imaging combined with a narrow band-pass filter based on a spectral reflectance in a digestive organ (such as gastric mucosa), that is, an electronic endoscope apparatus incorporating a narrow band filter. (Narrow Band Imaging-NBl) is drawing attention. This device is provided with three narrow (wavelength) band-pass filters instead of the surface sequential R (red), G (green), and B (blue) rotary filters. By sequentially performing the same processing as in the case of the R, G, B (RGB) signals while changing the respective weights for the three signals obtained with these illumination lights, the spectral image is output. Is formed. According to such a spectral image, in the digestive organs such as the stomach and the large intestine, a fine structure or the like that has not been obtained conventionally is extracted.
一方、上記の狭帯域バンドパスフィルタを用いる面順次式のものではなく、特許文献1に示されるように、固体撮像素子に微小モザイクの色フィルタを配置する同時式において、白色光で得られた画像信号を基に、演算処理にて分光画像を形成することが提案されている。これは、RGBのそれぞれのカラー感度特性を数値データ化したものと、特定の狭帯域バンドパスの分光特性を数値データ化したものとの関係をマトリクスデータ(係数セット)として求め、このマトリクスデータとRGB信号との演算により狭帯域バンドパスフィルタを介して得られる分光画像を推定した分光画像信号を得るものである。このような演算によって分光画像を形成する場合は、所望の波長域に対応した複数のフィルタを用意する必要がなく、またこれらの交換配置が不要となるので、装置の大型化が避けられ、低コスト化を図ることができる。
しかし、通常観察画像の各RGB成分の信号値によっては、上述したマトリクス演算を行うことにより、分光推定画像に白飛びや黒つぶれ等が発生し分光推定画像の画質が劣化する場合がある。たとえば通常観察画像における各RGB成分の信号値が最大階調表現数(たとえば255)内に収まっている場合であっても、マトリクス演算をしたときに分光推定画像の最大階調表現数を超えてしまう場合がある。最大階調表現数を超えた画素の信号値はすべて255になるため、結果として画質が劣化することになる。 However, depending on the signal value of each RGB component of the normal observation image, performing the above-described matrix calculation may cause overexposure, blackout, or the like in the spectrally estimated image, thereby degrading the image quality of the spectrally estimated image. For example, even when the signal value of each RGB component in the normal observation image is within the maximum gradation expression number (for example, 255), the maximum gradation expression number of the spectral estimation image is exceeded when the matrix operation is performed. May end up. Since the signal values of the pixels exceeding the maximum number of gradation representations are all 255, the image quality deteriorates as a result.
また、通常観察画像において、光源のハレーション等により、既に、白飛びが発生して255を超えている場合があるが、分光推定画像にすると、白飛びの領域が増え、画質がさらに劣化することがある。 Further, in a normal observation image, there is a case where the whiteout has already occurred and exceeds 255 due to the halation of the light source, etc. However, when the spectral estimation image is used, the whiteout region increases and the image quality further deteriorates. There is.
そこで、本発明は、マトリクス演算による分光推定画像の画質の劣化を防止することができる内視鏡画像処理装置および方法を提供することを目的とするものである。 Therefore, an object of the present invention is to provide an endoscopic image processing apparatus and method that can prevent deterioration in image quality of a spectrally estimated image due to matrix calculation.
本発明の内視鏡画像処理装置は、内視鏡により取得された内視鏡画像に対しマトリクスパラメータを用いてマトリクス演算を施すことにより分光推定画像を生成する内視鏡画像処理装置であって、マトリクス演算に用いるマトリクスパラメータを設定するパラメータ設定手段と、パラメータ設定手段により設定されたマトリクスパラメータに応じて内視鏡画像の階調を調整する画像調整手段と、画像調整手段により調整された内視鏡画像に対しマトリクス演算を施すことにより分光推定画像を生成する分光画像生成手段とを備えたことを特徴とするものである。 An endoscopic image processing apparatus according to the present invention is an endoscopic image processing apparatus that generates a spectral estimation image by performing matrix calculation using matrix parameters on an endoscopic image acquired by an endoscope. A parameter setting means for setting matrix parameters used for matrix calculation, an image adjusting means for adjusting the gradation of the endoscopic image in accordance with the matrix parameters set by the parameter setting means, and an inner part adjusted by the image adjusting means Spectral image generation means for generating a spectral estimation image by performing a matrix operation on the endoscopic image is provided.
本発明の内視鏡画像処理方法は、内視鏡により取得された内視鏡画像に対しマトリクスパラメータを用いてマトリクス演算を施すことにより分光推定画像を生成する内視鏡画像処理方法であって、マトリクス演算に用いるマトリクスパラメータを設定し、設定したマトリクスパラメータに応じて内視鏡画像の階調を調整し、調整した内視鏡画像に対しマトリクス演算を施すことにより分光推定画像を生成することを特徴とするものである。 An endoscopic image processing method according to the present invention is an endoscopic image processing method for generating a spectral estimation image by performing a matrix operation on an endoscopic image acquired by an endoscope using matrix parameters. Setting a matrix parameter used for matrix calculation, adjusting the gradation of the endoscopic image according to the set matrix parameter, and generating a spectral estimation image by performing matrix calculation on the adjusted endoscopic image It is characterized by.
ここで、内視鏡画像は、面順次方式により各RGB画像を別々に取得した後にこれらの成分画像を用いて取得されたものであってもよいし、同時方式により取得されたものであってもよい。 Here, the endoscopic image may be acquired using these component images after acquiring each RGB image separately by the frame sequential method, or acquired by the simultaneous method. Also good.
また、パラメータ設定手段は、マトリクス演算に用いるマトリクスパラメータを設定するものであればその設定方法を問わず、たとえば分光推定画像のRGB成分に対しそれぞれ所定の波長が選択されたとき、波長に応じたマトリクスパラメータを設定するものであってもよいし、入力部からの入力に基づきマトリクスパラメータを設定するものであってもよい。 In addition, the parameter setting means can set the matrix parameter used for the matrix calculation, regardless of the setting method. For example, when a predetermined wavelength is selected for each of the RGB components of the spectral estimation image, the parameter setting unit corresponds to the wavelength. A matrix parameter may be set, or a matrix parameter may be set based on an input from an input unit.
また、画像調整手段は、マトリクスパラメータに応じて内視鏡画像の階調を調整するものであればその方法は問わない。たとえば内視鏡画像処理装置は内視鏡画像から階調の調整に用いる基準画素値を検出する基準値検出手段をさらに備え、画像調整手段が、基準値検出手段において検出された基準画素値をパラメータ設定手段において設定されたマトリクスパラメータを用いてマトリクス演算したときの基準演算値が設定値に飽和し、飽和している画素数が分光推定画像を生成する前よりも増えているとき、内視鏡画像の階調を調整するものであってもよい。 The image adjusting means may be any method as long as it adjusts the gradation of the endoscopic image according to the matrix parameter. For example, the endoscope image processing apparatus further includes reference value detection means for detecting a reference pixel value used for gradation adjustment from the endoscope image, and the image adjustment means uses the reference pixel value detected by the reference value detection means. When the reference calculation value when matrix calculation is performed using the matrix parameter set in the parameter setting means is saturated with the set value, and the number of saturated pixels is larger than before the spectral estimation image is generated, You may adjust the gradation of a mirror image.
特に、基準値検出手段が基準画素値として内視鏡画像内の最大画素値を検出するものであり、画像調整手段が、最大画素値をマトリクスパラメータを用いてマトリクス演算したときの最大演算値が設定値として設定された最大階調表現数に飽和し、飽和している画素数が内視鏡画像よりも増えているとき、内視鏡画像の階調を調整するものであってもよい。なお、内視鏡画像の最大画素値に基づいて階調を調整する場合について言及しているが、内視鏡画像の最小画素値もしくは平均値に基づいて階調を調整するようにしてもよい。なお、「内視鏡画像よりも増えている」とは、分光推定画像を生成する前の元に成った通常観察画像に比べて増えているとの意味である。 In particular, the reference value detection means detects the maximum pixel value in the endoscopic image as the reference pixel value, and the maximum calculation value when the image adjustment means performs matrix calculation on the maximum pixel value using the matrix parameter is When the maximum gradation expression number set as the set value is saturated and the number of saturated pixels is larger than that of the endoscope image, the gradation of the endoscope image may be adjusted. Note that although the case where the gradation is adjusted based on the maximum pixel value of the endoscopic image is mentioned, the gradation may be adjusted based on the minimum pixel value or the average value of the endoscope image. . Note that “increased from the endoscopic image” means that it has increased compared to the normal observation image that was formed before the generation of the spectral estimation image.
さらに、画像調整手段は、内視鏡画像の階調を調整するものであればその方法を問わず、階調の調整量が設定された階調変換テーブルを有するものであり、調整係数を用いて階調変換テーブルの階調変換特性を調整する階調調整手段を備えたものであってもよい。このとき、内視鏡画像の階調の調整は、マトリクスパラメータに応じて調整係数を変化させることにより階調変換特性の変化量を変化させることにより行われることになる。 Furthermore, the image adjustment means has a gradation conversion table in which the adjustment amount of the gradation is set regardless of the method as long as it adjusts the gradation of the endoscope image, and uses the adjustment coefficient. In this case, a gradation adjustment unit that adjusts gradation conversion characteristics of the gradation conversion table may be provided. At this time, the adjustment of the gradation of the endoscopic image is performed by changing the change amount of the gradation conversion characteristic by changing the adjustment coefficient in accordance with the matrix parameter.
あるいは、画像調整手段は、内視鏡画像からボケマスク画像を生成し、ボケマスク画像に重み付け係数を乗じた後に内視鏡画像に加算するダイナミックレンジ圧縮を施す圧縮処理手段を備えたものであってもよい。このとき、内視鏡画像の階調の調整は、マトリクスパラメータに応じて重み付け係数を変化させることにより行われることになる。 Alternatively, the image adjustment unit may include a compression processing unit that generates a blur mask image from the endoscopic image, performs a dynamic range compression that is added to the endoscopic image after multiplying the blur mask image by a weighting coefficient. Good. At this time, the adjustment of the gradation of the endoscopic image is performed by changing the weighting coefficient according to the matrix parameter.
また、本発明の内視鏡画像処理装置は、内視鏡により取得された通常観察画像に対しマトリクスパラメータを用いてマトリクス演算を施すことにより分光推定画像を生成する分光画像生成手段と、分光画像生成手段により生成された分光推定画像と内視鏡画像とを重み付け加算した合成画像を生成する画像合成手段と、マトリクスパラメータに応じて重み付けを変化させることにより、画像合成手段において生成される合成画像の階調を調整する画像調整手段とを備えたことを特徴とするものである。 Further, the endoscope image processing apparatus of the present invention includes a spectral image generation unit that generates a spectral estimation image by performing matrix calculation using a matrix parameter on a normal observation image acquired by an endoscope, and a spectral image An image composition unit that generates a composite image obtained by weighted addition of the spectral estimation image generated by the generation unit and the endoscopic image, and a composite image that is generated by the image composition unit by changing the weight according to the matrix parameter And image adjusting means for adjusting the gradation of the image.
本発明の内視鏡画像処理装置および方法によれば、内視鏡により取得された内視鏡画像に対しマトリクスパラメータを用いてマトリクス演算を施すことにより分光推定画像を生成する際に、マトリクス演算に用いるマトリクスパラメータを設定し、設定したマトリクスパラメータに応じて内視鏡画像の階調を調整し、調整した内視鏡画像に対しマトリクス演算を施し分光推定画像を生成することにより、設定されたマトリクスパラメータを用いたマトリクス演算による画素値の変化予め予測して内視鏡画像の階調を調整した後に分光推定画像の生成が行われるため、どのような内視鏡画像が取得されどのようなマトリクスパラメータが設定されたとしても分光推定画像の画質の劣化が生じるのを防止することができる。 According to the endoscopic image processing apparatus and method of the present invention, when generating a spectral estimation image by performing matrix calculation on an endoscopic image acquired by an endoscope using matrix parameters, matrix calculation is performed. The matrix parameter to be used is set, the gradation of the endoscopic image is adjusted according to the set matrix parameter, and a matrix calculation is performed on the adjusted endoscopic image to generate a spectral estimation image. Changes in pixel values due to matrix computation using matrix parameters Predicted in advance and adjusted the gradation of the endoscopic image, the spectral estimated image is generated, so what endoscopic image is acquired and what Even if the matrix parameter is set, it is possible to prevent the deterioration of the image quality of the spectrally estimated image.
なお、内視鏡画像処理装置は内視鏡画像から階調の調整に用いる基準画素値を検出する基準値検出手段をさらに備え、画像調整手段が、基準値検出手段において検出された基準画素値をパラメータ設定手段において設定されたマトリクスパラメータを用いてマトリクス演算したときの基準演算値が設定値に飽和し、飽和した画素数が内視鏡画像よりも増えているとき、内視鏡画像の階調を調整するものであるとき、内視鏡画像の特性に合わせた階調の調整を行い分光推定画像の画質の劣化が生じるのを防止することができる。 The endoscopic image processing apparatus further includes reference value detection means for detecting a reference pixel value used for gradation adjustment from the endoscope image, and the image adjustment means detects the reference pixel value detected by the reference value detection means. When the matrix calculation using the matrix parameter set in the parameter setting means is saturated with the set value, and the number of saturated pixels is larger than that of the endoscopic image, the level of the endoscopic image When adjusting the tone, it is possible to prevent the deterioration of the image quality of the spectrally estimated image by adjusting the gradation in accordance with the characteristics of the endoscopic image.
また、画像調整手段が階調の変更量が設定された階調変換テーブルを有するものであり、調整係数を用いて階調変換テーブルの階調変換特性を調整する階調調整手段を備えたものであって、マトリクスパラメータに応じて調整係数を変化させることにより内視鏡画像の階調変換特性の変化量を調整する、もしくは内視鏡画像からボケマスク画像を生成し、ボケマスク画像に重み付け係数を乗じた後に内視鏡画像に加算するダイナミックレンジ圧縮を施す圧縮処理手段を備えたものであり、マトリクスパラメータに応じて重み付け係数を変化させることにより内視鏡画像の階調を調整するものであれば、従来の内視鏡画像処理装置において内視鏡画像に施している階調処理もしくは圧縮処理における各種係数を調整することにより、新たな構成を加えることなく効率的に分光推定画像の画質の劣化を防止することができる。 Further, the image adjusting means has a gradation conversion table in which the gradation change amount is set, and has gradation adjustment means for adjusting the gradation conversion characteristics of the gradation conversion table using the adjustment coefficient. The adjustment coefficient is changed according to the matrix parameter to adjust the amount of change in the gradation conversion characteristics of the endoscopic image, or the blur mask image is generated from the endoscopic image, and the weighting coefficient is applied to the blur mask image. It is provided with compression processing means for performing dynamic range compression to be added to the endoscopic image after multiplication, and to adjust the gradation of the endoscopic image by changing the weighting coefficient according to the matrix parameter. For example, by adjusting various coefficients in gradation processing or compression processing applied to an endoscopic image in a conventional endoscopic image processing apparatus, a new configuration It is possible to prevent deterioration in the image quality of the efficient spectral estimation image without adding.
また、本発明の内視鏡画像処理装置は、内視鏡により取得された通常観察画像に対しマトリクスパラメータを用いてマトリクス演算を施すことにより分光推定画像を生成する分光画像生成手段と、分光画像生成手段により生成された分光推定画像と前記内視鏡画像とを重み付け加算した合成画像を生成する画像合成手段と、マトリクスパラメータに応じて重み付けを変化させることにより、画像合成手段において生成される合成画像の階調を調整する画像調整手段とを備えたことにより、マトリクスパラメータの大きさによって変化する合成画像の画素値を予め予測して重み付けを決定することができるため、合成画像に画質の劣化が生じるのを防止することができる。 Further, the endoscope image processing apparatus of the present invention includes a spectral image generation unit that generates a spectral estimation image by performing matrix calculation using a matrix parameter on a normal observation image acquired by an endoscope, and a spectral image An image composition unit that generates a composite image obtained by weighting and adding the spectral estimation image generated by the generation unit and the endoscopic image, and a composite image generated by the image composition unit by changing the weight according to the matrix parameter Since the image adjustment means for adjusting the gradation of the image is provided, the pixel value of the composite image that changes according to the size of the matrix parameter can be predicted in advance, and the weight can be determined. Can be prevented from occurring.
以下、図面を参照して本発明の実施形態を詳細に説明する。図1は、本発明の内視鏡画像処理装置が用いられた内視鏡システム1の基本構成を示すものである。内視鏡システム1は、光源ユニット10、スコープ20、内視鏡画像処理装置30を備えている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 shows a basic configuration of an
光源ユニット10は内視鏡による観察を行うための光を射出するものであって、光Lを射出するキセノンランプ等を備えている。光源ユニット10はスコープ20のライトガイド15に光学的に接続されており、光源ユニット10から射出された光Lはライトガイド15内に入射され観察窓16から被写体に照射される。
The
スコープ20は、結像光学系21、撮像素子22、CDS/AGC回路23、A/D変換器24、CCD駆動部25、レンズ駆動部26等を有しており、各構成要素はスコープコントローラ27により制御されている。撮像素子22はたとえばCCDやCMOS等からなり、結像光学系21により結像された被写体像を光電変換して内視鏡画像P0を取得するものである。この撮像素子22としては、例えば撮像面にMg(マゼンタ),Ye(イエロー),Cy(シアン),G(グリーン)の色フィルタを有する補色型、あるいはRGBの色フィルタを有する原色型が用いられる。なお、撮像素子22の動作はCCD駆動部25により制御されている。撮像素子22が画像(映像)信号を取得したとき、CDS/AGC(相関二重サンプリング/自動利得制御)回路23がサンプリングして増幅し、A/D変換器24がCDS/AGC回路17から出力された内視鏡画像をA/D変換し、内視鏡画像処理装置30に出力される。
The
内視鏡画像処理装置30は、スコープ20から出力された内視鏡画像P0の画像処理を行うものであって、画像取得手段31、ガンマ補正手段32、画像調整手段40、分光画像生成手段50、表示制御手段60等を備えており、各構成の動作は装置コントローラ70により制御されている。
The endoscopic image processing apparatus 30 performs image processing of the endoscopic image P0 output from the
画像取得手段31は、たとえばDSP(デジタルシグナルプロセッサ)等からなり、スコープ20の撮像素子22により撮像された内視鏡画像Pを取得するものである。なお、撮像素子22がMg(マゼンタ),Ye(イエロー),Cy(シアン),G(グリーン)からなる内視鏡画像P0を取得したとき、RGBからなる内視鏡画像P0に色変換する機能を有している。撮像素子22がRGB成分からなる内視鏡画像Pが取得されたとき上記色変換処理は不要である。
The image acquisition means 31 is made up of, for example, a DSP (digital signal processor) or the like, and acquires an endoscopic image P imaged by the
ガンマ補正手段32は、画像取得手段31において取得された内視鏡画像P0に対しガンマ曲線に基づいて内視鏡画像P0の各画素値を補正して内視鏡画像P1を出力するものである。同時化処理手段33は、面順次方式により取得された内視鏡画像P1における各RGB成分の色成分画像を用いて1枚の内視鏡画像P2を生成するものである。なお、RGB各色の光を異なるタイミングで照射するいわゆる面順次方式と呼ばれる方法により内視鏡画像Pを取得した場合には上記同時化処理が不要になるが、白色光を用いたいわゆる同時式と呼ばれる方法により内視鏡画像P0を取得した場合には同時化処理は必要である。
The
画像調整手段40は、逆ガンマ補正しリニアな信号P3’に戻す機能、P3’に対しダイナミックレンジ圧縮処理を施す機能と、階調調整処理を施す機能を有しており、階調調整された通常観察画像P5を出力するものである(後述する図2参照)。 The image adjustment means 40 has a function of performing inverse gamma correction and returning to a linear signal P3 ′, a function of performing dynamic range compression processing on P3 ′, and a function of performing gradation adjustment processing, and gradation adjustment is performed. A normal observation image P5 is output (see FIG. 2 described later).
分光画像生成手段50は、通常観察画像P5に対しマトリクスパラメータを用いてマトリクス演算を行うことにより分光推定画像SPを生成するものである。なお、分光画像生成手段50の動作例の詳細については特開2003−93336号公報に記載されている。 The spectral image generation means 50 generates a spectral estimation image SP by performing matrix calculation on the normal observation image P5 using matrix parameters. Note that details of an operation example of the spectral image generation means 50 are described in JP-A-2003-93336.
具体的には、分光画像生成手段50は、用いて下記式(1)に示すマトリクス演算を行うことにより分光推定画像SPを生成する。
なお、式(1)において、SPr、SPg、SPbは分光推定画像SPの各RGB成分、Pr、Pg、Pbは通常観察画像P5の各RGB成分、M00〜M22からなる3×3行の行列はマトリクス演算を行うためのマトリクスパラメータMをそれぞれ示している。
Specifically, the spectral image generation means 50 generates a spectral estimation image SP by performing a matrix calculation represented by the following formula (1).
In Expression (1), SPr, SPg, and SPb are RGB components of the spectral estimated image SP, and Pr, Pg, and Pb are RGB components of the normal observation image P5, and 3 × 3 rows including M 00 to M 22 . The matrix indicates a matrix parameter M for performing a matrix operation.
表示制御手段60は、分光画像生成手段50において生成された分光推定画像SPを液晶表示装置やCRT等からなる表示装置3に表示するものである。なお、表示制御手段37は、たとえば逆ガンマ変換、鏡像処理、各種画像からマスク画像を生成して表示する処理、上記各種画像に関する情報をキャラクタ情報として表示する処理を行い、これらを分光推定画像SPと同時に表示する機能を有している。さらに、表示制御手段60は、通常観察P5、分光推定画像SPを表示装置3に表示する機能を有している。
The
図2は画像調整手段40および装置コントローラ70の構成の一例を示すブロック図であり、図1と図2を参照して画像調整手段40および装置コントローラ70について説明する。画像調整手段40は、上述したように逆ガンマ変換手段40a、圧縮処理手段41と階調調整手段42を備えている。逆ガンマ変換手段40aは、ガンマ補正部32においてガンマ変換された内視鏡画像P2に対し逆ガンマ変換を施すものである。
FIG. 2 is a block diagram showing an example of the configuration of the image adjusting means 40 and the
圧縮処理手段41は、内視鏡画像Pに対しダイナミックレンジ圧縮処理を施すものである。具体的には、圧縮処理手段41は、内視鏡画像P3’のボケ画像YLを生成するボケ画像生成手段41aと、ボケ画像YLを用いてボケマスク画像(YL−Y0)を生成するマスク画像生成手段41bと、ボケマスク画像(YL−Y0)と内視鏡画像P3’とを加算する画像加算手段41cとを備えている。ここで、画像加算手段41cは、下記式(2)に示すように、ボケマスク画像(YL−Y0)に重み付け係数kを乗じて内視鏡画像P3に加算する。
P4=P3’+k(YL−Y0) ・・・(2)
ここで、Y0はダイナミックレンジ圧縮の基準となる信号値で、P3’が10ビット幅に設計した場合、Y0=512が例示される。
The compression processing means 41 performs dynamic range compression processing on the endoscope image P. Specifically, the
P4 = P3 ′ + k (YL−Y0) (2)
Here, Y0 is a signal value serving as a reference for dynamic range compression, and when P3 ′ is designed to be 10 bits wide, Y0 = 512 is exemplified.
したがって、圧縮処理手段41は内視鏡画像P2中の高濃度部あるいは低濃度部領域の信号を観察可能な濃度領域に持ち上げる処理を施すことになる。なお、図2において重み付け係数kは予め設定された所定の値に設定される。kは負値に設定したとき、ダイナミックレンジ圧縮効果が得られる。 Therefore, the compression processing means 41 performs a process of lifting the signal of the high density portion or the low density portion area in the endoscopic image P2 to an observable density area. In FIG. 2, the weighting coefficient k is set to a predetermined value set in advance. When k is set to a negative value, a dynamic range compression effect is obtained.
階調調整手段42は、圧縮処理手段41においてダイナミックレンジ圧縮処理が施された内視鏡画像P4の各RGB成分に対しそれぞれ調整係数α、β、γを乗ずることにより、内視鏡画像P4の各RGB成分の階調を調整した内視鏡画像(通常観察画像)P5を生成するものである。そして、分光画像生成手段50は、階調調整手段42により階調が調整された通常観察画像P5を用いて分光推定画像SPを生成する。
The
ここで、P0〜P5、P3’、SPのビット幅について例示すると、たとえばP0:10ビット(A/D変換後のビット数)、P1:10ビット、P2:8ビット、P3:8ビット、P3’:10ビット、P4:10ビット、P5:8ビット、SP:8ビットからなる。ここで、階調調整手段42は、内視鏡画像P4(10ビット)から通常観察画像P5(8ビット)に変換する際、予め用意されている階調の調整量が設定された階調変換テーブルを用いて階調の調整を行う。図3は予め設定されている階調変換テーブルの一例を示すグラフである。図3において、内視鏡画像P4の下限しきい値GCminより小さいG信号が階調調整手段42に入力されたとき、通常観察画像P5において黒潰れが発生することを示している。また、内視鏡画像P4の上限しきい値GCmaxよりも大きいG信号が入力されたとき、通常観察画像P5において白飛びが発生することを示している。この階調特性に対して、後述の調整係数α、β、γで補正がなされる。なお、図3においてはG信号について例示しているが、R信号、B信号についても同様である。なお、階調調整手段42は、ダイナミックレンジ圧縮された内視鏡画像P4に対しガンマ補正を施した通常観察画像P5を出力する。
Here, the bit widths of P0 to P5, P3 ′, and SP are exemplified. For example, P0: 10 bits (number of bits after A / D conversion), P1: 10 bits, P2: 8 bits, P3: 8 bits, P3 ': 10 bits, P4: 10 bits, P5: 8 bits, SP: 8 bits. Here, the
一方、装置コントローラ70は、チャンネル取得手段71、パラメータ設定手段72、基準値検出手段73、変更量算出手段74等を備えている。チャンネル取得手段71は、入力部2から入力されたチャンネルCH1〜CH8に基づいて、分光推定画像SPを生成する際の波長λ1,λ2,λ3および階調調整手段42において使用する設定ゲイン係数Rg、Gg、BgをチャンネルデータベースCDBから取得するものである。
On the other hand, the
ここで、図4はチャンネルデータベースCDBの一例を示す表である。チャンネルデータベースCDBには、波長セットとして、例えば(λ1,λ2,λ3)=(400,500,600)の標準セットCH1、血管を描出するための(λ1,λ2,λ3)=(470,500,670)もしくは(475,510,685)の血管セットCH2、CH3、特定組織を描出するための(λ1,λ2,λ3)=(440,480,520)もしくは(480,510,580)の組織セットCH5、オキシヘモグロビンとデオキシヘモグロビンとの差を描出するための(λ1,λ2,λ3)=(400,430,475)のヘモグロビンセットCH6、血液とカロテンとの差を描出するための(λ1,λ2,λ3)=(415,450,500)の血液‐カロテンセットCH7、血液と細胞質の差を描出するための(λ1,λ2,λ3)=(420,550,600)の血液‐細胞質セットCH8の8つの波長セットが記憶されている。さらに、チャンネルデータベースCDBには、各チャンネルCH1〜CH8に対応したゲイン係数Rg、Gg、Bgが記憶されている。そして、チャンネル取得手段71は、チャンネルデータベースCDBから入力されたチャンネルCH1〜CH8に関連づけされた波長情報λ1〜λ3および設定ゲイン係数Rg、Gg、Bgを取得する。 FIG. 4 is a table showing an example of the channel database CDB. In the channel database CDB, as a wavelength set, for example, a standard set CH1 of (λ1, λ2, λ3) = (400, 500, 600), (λ1, λ2, λ3) = (470,500, 670) or (475, 510, 685) blood vessel set CH2, CH3, (λ1, λ2, λ3) = (440, 480, 520) or (480, 510, 580) tissue set for rendering a specific tissue CH5, hemoglobin set CH6 of (λ1, λ2, λ3) = (400, 430, 475) for depicting the difference between oxyhemoglobin and deoxyhemoglobin, (λ1, λ2) for depicting the difference between blood and carotene , Λ3) = (415,450,500) blood-carotene set CH7, (λ1, λ2) for depicting the difference between blood and cytoplasm , Λ3) = (420,550,600), eight wavelength sets of blood-cytoplasm set CH8 are stored. Further, the channel database CDB stores gain coefficients Rg, Gg, and Bg corresponding to the channels CH1 to CH8. Then, the channel acquisition means 71 acquires wavelength information λ1 to λ3 and set gain coefficients Rg, Gg, and Bg associated with the channels CH1 to CH8 input from the channel database CDB.
図2のパラメータ設定手段72は、チャンネル取得手段71により取得された波長情報(λ1、λ2、λ3)に基づいて分光推定画像SPを生成する際に使用されるマトリクスパラメータMを設定するものである。具体的は、パラメータ設定手段72は、波長セット(λ1、λ2、λ3)に対応したマトリクスパラメータM0をパラメータデータベースPDBから取得する。
The
図5はパラメータデータベースPDBの一例を示す表である。パラメータデータベースPDBにはたとえば400nmから700nmの波長域を5nm間隔で分けた波長域毎にパラメータPi=(M0j0,M0j1,M0j2)(i=1〜61、j=0〜2)が記憶されている。そして、パラメータ設定手段72は、チャンネル取得手段71において選択された波長情報λ1、λ2、λ3毎にそれぞれマトリクスパラメータM0i=(M0j0,M0j1,M0j2)をパラメータデータベースPDBの中からそれぞれ抽出し、上記式(1)のマトリクスパラメータM0を設定する。
FIG. 5 is a table showing an example of the parameter database PDB. In the parameter database PDB, for example, parameters P i = (M0 j0 , M0 j1 , M0 j2 ) (i = 1 to 61, j = 0 to 2) are provided for each wavelength range obtained by dividing the wavelength range from 400 nm to 700 nm at 5 nm intervals. It is remembered. Then, the
図2の基準値検出手段73は、内視鏡画像P0の各RGB成分のうち基準画素値として最大画素値RHL、GHL、BHLを検出するものであって、たとえば図6に示すような内視鏡画像P0の各RGB成分毎にそれぞれヒストグラムRh、Gh、Bhを算出し、ヒストグラムRh、Gh、Bhから最大画素値RHL、GHL、BHLを検出する機能を有している。 2 detects the maximum pixel values R HL , G HL , and B HL as reference pixel values among the RGB components of the endoscopic image P0. For example, as shown in FIG. The histogram Rh, Gh, Bh is calculated for each RGB component of the endoscope image P0, and the maximum pixel values R HL , G HL , B HL are detected from the histograms Rh, Gh, Bh. .
図2の変更量算出手段74は、パラメータ設定手段72により設定されたマトリクスパラメータM0と、基準値検出手段73により検出された最大画素値RHL、GHL、BHLに基づいて、階調調整手段42において用いる調整係数α、β、γを算出するものである。ここで、入力部2において所定のチャンネルCH1〜CH8が指定されたとき、各RGB成分の設定ゲイン係数Rg、Gg、BgとマトリクスパラメータM0が決定する。ゲイン係数Rg、Gg、BgとマトリクスパラメータM0とは下式(1’)のように統合され、新たなマトリクスMが生成される。
よって、分光推定画像SPの画素値SPr、SPg、SPbは、内視鏡画像P4の各RGB成分の画素値をPr、Pg、Pbとすると下記式(3−1)〜(3−3)のように表すことができる。
SPr = M00Pr + M01Pg + M02Pb・・・(3-1)
SPg = M10Pr + M11Pg + M12Pb・・・(3-2)
SPb = M20Pr + M21Pg + M22Pb・・・(3-3)
Therefore, the pixel values SPr, SPg, and SPb of the spectral estimation image SP are expressed by the following equations (3-1) to (3-3) when the pixel values of the RGB components of the endoscope image P4 are Pr, Pg, and Pb. Can be expressed as:
SPr = M 00 Pr + M 01 Pg + M 02 Pb ... (3-1)
SPg = M 10 Pr + M 11 Pg + M 12 Pb (3-2)
SPb = M 20 Pr + M 21 Pg + M 22 Pb ... (3-3)
上記式(3−1)〜(3−3)により分光推定画像SPの各画素値SPr、SPg、SPbを算出したとき、分光推定画像SPの最大階調表現数(たとえば255)を超えてしまう場合がありこれが白飛びの原因になる。そこで、まず基準値検出手段73が最大画素値RHL、GHL、BHLを検出する。ここで最大値の検出は、実際には、ノイズの影響を除くために、累積ヒストグラム99%を使用した方が安定した検出を行うことができる。その後、予め用意されている初期設定の階調変換テーブルを用いて階調調整されたときの最大画素値をRHL’、GHL’、BHL’を得る。これらを、上記式(3−1)〜(3−3)に代入し、最大画素値RHL’、GHL’、BHL’が分光推定画像SPに変換されたときの各RGB成分の最大演算値SPrmax、SPgmax、SPbmaxを算出し、基準演算値とする。
SPrmax = M00RHL’+ M01GHL’+ M02BHL’ ・・・(4-1)
SPgmax = M10RHL’+ M11GHL’+ M12BHL’ ・・・(4-2)
SPbmax = M20RHL’+ M21GHL’+ M22BHL’ ・・・(4-3)
When the pixel values SPr, SPg, and SPb of the spectral estimation image SP are calculated by the above formulas (3-1) to (3-3), the maximum number of gradation representations (for example, 255) of the spectral estimation image SP is exceeded. In some cases, this causes overexposure. Therefore, first, the reference
SPr max = M 00 R HL '+ M 01 G HL ' + M 02 B HL '(4-1)
SPg max = M 10 R HL '+ M 11 G HL ' + M 12 B HL '(4-2)
SPb max = M 20 R HL '+ M 21 G HL ' + M 22 B HL '(4-3)
図6A、図7Aは内視鏡画像P0におけるG成分のヒストグラム、図6B、図7Bは通常観察画像P5のヒストグラム、図6Cと図6Dおよび図7Cと図7Dはそれぞれ異なるパラメータでマトリクス演算したときの分光推定画像SPのG成分SPgのヒストグラムをそれぞれ示している。図6A、Bに示すように、通常観察画像P5において白飛びが発生していないときであっても、図6Cのように分光推定画像SPgにおいて白飛びが発生していない場合と、図6Dのように分光推定画像SPgにおいて白飛びが発生する場合とがある。特に図6Dにおいては、通常観察画像P5に比べて白飛びしている画素数が増えているということができ、分光画像生成時に画質が劣化したということができる。 6A and 7A are histograms of the G component in the endoscopic image P0, FIGS. 6B and 7B are histograms of the normal observation image P5, and FIGS. 6C and 6D and FIGS. 7C and 7D are matrix calculations with different parameters, respectively. The histograms of the G component SPg of the spectral estimation image SP are respectively shown. As shown in FIGS. 6A and 6B, even when whiteout does not occur in the normal observation image P5, when whiteout does not occur in the spectral estimated image SPg as shown in FIG. 6C, As described above, whiteout may occur in the spectral estimation image SPg. In particular, in FIG. 6D, it can be said that the number of whiteout pixels is increased compared to the normal observation image P5, and it can be said that the image quality is deteriorated when the spectral image is generated.
また図7A、Bに示すように、既に内視鏡画像P0および通常観察画像P5において白飛びが発生しているとき、図7Cのように分光推定画像SPgにおいて白飛びしている画素数が多くなる場合と、図7Dのように分光推定画像SPgにおいて白飛びしている画素が少なくなる場合とがある。特に図7Cにおいては、通常観察画像P5に比べて白飛びしている画素数が増えているため、分光画像生成時に画質が劣化したということができる。 Further, as shown in FIGS. 7A and 7B, when whiteout has already occurred in the endoscopic image P0 and the normal observation image P5, the number of whiteout pixels in the spectral estimation image SPg is large as shown in FIG. 7C. In some cases, as shown in FIG. 7D, the number of whiteout pixels in the spectral estimated image SPg is reduced. In particular, in FIG. 7C, since the number of whiteout pixels is increased compared to the normal observation image P5, it can be said that the image quality is deteriorated when the spectral image is generated.
つまり、図6、図7に示すように、「分光推定画像が白飛びしている」が1つの条件になる。これは、基準演算値SPrmax、SPgmax、SPbmaxが、設定値Cmax=255に飽和していることに相当する。もう1つの条件は、ヒストグラムから飽和している画素数を算出することにより、飽和している画素が分光形成する前よりも増えたことである。そして、2つの条件を両方とも満たしているとき、調整係数α、β、γが算出される。 That is, as shown in FIGS. 6 and 7, one condition is that “the spectrally estimated image is whiteout”. This corresponds to the fact that the reference calculation values SPr max , SPg max and SPb max are saturated to the set value Cmax = 255. Another condition is that by calculating the number of saturated pixels from the histogram, the number of saturated pixels has increased from before the spectral formation. When both of the two conditions are satisfied, the adjustment coefficients α, β, and γ are calculated.
図6Dおよび図7Cの状態であると判定した場合、階調調整手段42は、変更量算出手段74において下記式(5−1)〜(5−3)により調整係数α、β、γを算出し、算出した調整係数α、β、γを用いて各RGB成分の階調を調整する。
α= Cmax/(M00RHL’+ M01GHL’+ M02BHL’) ・・・(5-1)
β= Cmax/(M10RHL’+ M11GHL’+ M12BHL’) ・・・(5-2)
γ= Cmax/(M20RHL’+ M21GHL’+ M22BHL’) ・・・(5-3)
P3’はP0をガンマ変換した後、逆ガンマ変換したものであるから、P3‘とP0との階調特性は同等であると考えることができ、P0を基準値検出手段73に与える構成としている。また、RGB毎にα、β、γの異なる調整値を求め、独立の調整をする代わりに、α、β、γの平均値や、1:2:1などの重み付き平均値を求め、RGB共通の調整を行ってもよい。
When it is determined that the state is that of FIGS. 6D and 7C, the
α = C max / (M 00 R HL '+ M 01 G HL ' + M 02 B HL ') (5-1)
β = C max / (M 10 R HL '+ M 11 G HL ' + M 12 B HL ') (5-2)
γ = C max / (M 20 R HL '+ M 21 G HL ' + M 22 B HL ') (5-3)
Since P3 ′ is obtained by performing gamma conversion on P0 and then inverse gamma conversion, it can be considered that the gradation characteristics of P3 ′ and P0 are equivalent, and P0 is supplied to the reference value detection means 73. . Further, different adjustment values of α, β, and γ are obtained for each RGB, and instead of performing independent adjustment, an average value of α, β, γ, or a weighted average value such as 1: 2: 1 is obtained, and RGB Common adjustments may be made.
次に、図1から図7を参照して本発明の内視鏡画像処理方法の一例について説明する。まず、入力部2によりチャンネルCH1〜CH8が指定されたとき、チャンネル取得手段71において選択されたチャンネルCH1〜CH8に応じた設定ゲイン係数Rg、Gg、Bgが決定されるとともにとともに波長情報λ1、λ2、λ3が決定される。すると、パラメータ設定手段72においてパラメータデータベースPDBから波長情報λ1,λ2、λ3に適合したパラメータ(M0j0,M0j1,M0j2)が抽出されマトリクスパラメータMが生成される。さらに、ゲイン係数Rg、Gg、BgとマトリクスパラメータM0は統合されて新たなマトリクスパラメータMが生成される。
Next, an example of the endoscopic image processing method of the present invention will be described with reference to FIGS. First, when channels CH1 to CH8 are designated by the
一方、撮像素子22により撮影された内視鏡画像P0が画像取得手段31において取得され、基準値検出手段73においてヒストグラムRh、Gh、Bhから内視鏡画像P0の最大画素値RHL、GHL、BHLが検出される。すると、変更量算出手段74において、RHL、GHL、BHLを階調調整手段40に通した値RHL’、GHL’、BHL’を得た後、上記式(4−1)〜(4−3)が算出され、分光推定画像SPr、SPg、SPbにおいて、最大階調表現数Cmaxに飽和する画素が存在するか否かが判断される。
On the other hand, an endoscopic image P0 photographed by the
分光推定画像SPr、SPg、SPbにおいて最大階調表現数Cmaxに飽和する画素が存在しないと判断された場合、階調調整手段42においてデフォルトの階調変換特性を用いて階調の調整が行われる。一方、最大階調表現数Cmaxに飽和する画素が存在するが、飽和した画素数が分光推定を行う前より増えていない場合も、階調調整手段42において予め用意されているデフォルトの階調変換テーブルを用いて階調の調整が行われる。
When it is determined that there is no pixel saturated in the maximum gradation expression number C max in the spectral estimation images SPr, SPg, SPb, the
一方、最大階調表現数Cmaxに飽和する画素が存在し、飽和した画素数が分光推定を行う前より増えている場合、変更量算出手段74において式(5−1)〜(5−3)を用いて係数α、β、γが算出される。そして、階調調整手段42において、デフォルトの階調特性を調整係数α、β、γで補正した特性(具体的には、傾きをα倍、β倍、γ倍する)を用いて階調の調整が行われる。
On the other hand, if there is a pixel that is saturated at the maximum gradation expression number C max and the number of saturated pixels is larger than before the spectral estimation, the change amount calculation means 74 uses the equations (5-1) to (5-3). ) To calculate the coefficients α, β, γ. Then, the
このように、マトリクス演算により分光推定画像SPを算出したときに、最大階調表現数Cmaxに飽和してしまう画素が存在するか否かおよび飽和した画素数が分光推定を行う前より増えているかどうかを予測して、内視鏡画像P4に対し階調の調整を行うことにより、内視鏡画像P0の画素値やマトリクスパラメータMの値によらず、常に分光推定画像SPについて白飛びの増加等の画質の劣化が生じるのを防止することができる。すなわち、図6、図7に示すようなヒストグラムGhのG成分を有する内視鏡画像P3に対し、上述した係数α、β、γを算出せずに設定ゲイン係数Rg、Gg、Bgを用いて階調調整した場合、G成分の分光推定画像SPgの画素値が大きい部分が最大階調表現数Cmaxに飽和してしまう。最大階調表現数Cmaxに飽和した画素はすべて画素値=255になるため白飛びになる。一方、上述したように調整係数α、β、γをマトリクスパラメータMに応じて変化させて階調の調整を行うことにより、分光推定画像SPにおける白飛びの増加等の画質の劣化が生じるのを防止することができる。 As described above, when the spectral estimation image SP is calculated by matrix calculation, whether or not there is a pixel that is saturated at the maximum gradation expression number C max and the number of saturated pixels is increased from before the spectral estimation. By adjusting the gradation of the endoscopic image P4 by predicting whether or not the spectroscopic estimated image SP is always overexposed, regardless of the pixel value of the endoscopic image P0 or the value of the matrix parameter M. It is possible to prevent image quality deterioration such as an increase. That is, for the endoscope image P3 having the G component of the histogram Gh as shown in FIGS. 6 and 7, the set gain coefficients Rg, Gg, and Bg are used without calculating the above-described coefficients α, β, and γ. When the gradation is adjusted, a portion where the pixel value of the G component spectral estimation image SPg is large is saturated to the maximum gradation expression number Cmax . All the pixels saturated to the maximum gradation expression number Cmax are overexposed because the pixel value = 255. On the other hand, by adjusting the gradation by changing the adjustment coefficients α, β, and γ according to the matrix parameter M as described above, image quality degradation such as an increase in whiteout in the spectral estimated image SP occurs. Can be prevented.
図8は本発明の内視鏡画像処理装置の第2の実施形態を示すブロック図であり、図8を参照して内視鏡画像処理装置について説明する。なお、図8の内視鏡画像処理装置において図2の内視鏡画像処理装置と同一の構成を有する部位には同一の符号を付してその説明を省略する。図8の内視鏡画像処理装置が図2の内視鏡画像処理装置と異なる点は、ダイナミックレンジ圧縮処理を施す際の重み付け係数kを変化させることにより、階調を調整する点である。なお、図8において、階調調整手段42はチャンネル取得手段71において選択されたチャンネルCH1〜CH8に対応した設定ゲイン係数Rg、Gg、Bgを用いて階調の変更が行われる。
FIG. 8 is a block diagram showing a second embodiment of the endoscopic image processing apparatus of the present invention. The endoscopic image processing apparatus will be described with reference to FIG. In the endoscopic image processing apparatus of FIG. 8, parts having the same configuration as those of the endoscopic image processing apparatus of FIG. The endoscope image processing apparatus in FIG. 8 is different from the endoscope image processing apparatus in FIG. 2 in that the gradation is adjusted by changing the weighting coefficient k when the dynamic range compression process is performed. In FIG. 8, the
変更量算出手段174は、最大画素値(基準画素値)RHL、GHL、BHLとマトリクスパラメータMとを用いて上記式(2)における重み付け係数kを変化させる機能を有している。ここで、上述したように所定のチャンネルCH1〜8が指定されたとき、分光推定画像SPの画素値SPr、SPg、SPbは上記式(3−1)〜(3−3)により計算される。
The change
RGBの階調修正のための調整係数α、β、γの算出までは、第1実施形態と同様である。例示するダイナミックレンジ圧縮において、RGBで共通の圧縮処理を行うので、α、β、γの平均値をとり、ηとする(η=(α+β+γ)/3)。これに限定されず、任意の重み付け加算などでもよい。ηから、ダイナミックレンジ圧縮の重み係数kを得るには、k=1−ηと設定する。ただし、ダイナミックレンジ圧縮はリニア領域、分光画像推定はガンマ補正後の領域で、処理空間が異なるため、常識で所望の効果が得られない場合がある。その場合は、k=f(η)の関数をLUT形式や関数近似により実現してもよい。 The processes up to calculation of adjustment coefficients α, β, and γ for correcting gradation of RGB are the same as in the first embodiment. In the illustrated dynamic range compression, since common compression processing is performed for RGB, the average value of α, β, and γ is taken as η (η = (α + β + γ) / 3). It is not limited to this, Arbitrary weighting addition etc. may be sufficient. To obtain a dynamic range compression weighting factor k from η, set k = 1−η. However, dynamic range compression is a linear region, and spectral image estimation is a region after gamma correction, and the processing space is different, so a desired effect may not be obtained with common sense. In that case, the function of k = f (η) may be realized by the LUT format or function approximation.
ここで、圧縮処理手段41においてダイナミックレンジ圧縮処理された内視鏡画像Pは、上記式(1)のように表すことができる。したがって、式(1)を式(3−1)〜(3−3)に代入すると、下記式(6−1)〜(6−3)のように表すことができる。
SPr = (M00+M01+M02)Rg・(Pr+kr(Pr-Y0r))・・・(6-1)
SPg = (M10+M11+M12)Gg・(Pg+kg(Pg-Y0g))・・・(6-2)
SPb = (M20+M21+M22)Bg・(Pb+kb(Pb-Y0b))・・・(6-3)
Here, the endoscopic image P that has been subjected to the dynamic range compression processing by the compression processing means 41 can be expressed as in the above equation (1). Therefore, when Expression (1) is substituted into Expressions (3-1) to (3-3), they can be expressed as the following Expressions (6-1) to (6-3).
SPr = (M 00 + M 01 + M 02 ) Rg ・ (Pr + kr (Pr-Y0r)) ... (6-1)
SPg = (M 10 + M 11 + M 12 ) Gg ・ (Pg + kg (Pg-Y0g)) ・ ・ ・ (6-2)
SPb = (M 20 + M 21 + M 22 ) Bg ・ (Pb + kb (Pb-Y0b)) ... (6-3)
ここで、分光推定画像SPの各画素値SPr、SPg、SPbを算出したときに、階調ビット数(たとえば0〜255)の範囲を超えてしまう場合がありこれが画質劣化の原因になる。そこで、変更量算出手段174は、基準値検出手段73により検出された最大画素値RHL、GHL、BHLを上記式(6−1)〜(6−3)に代入することにより、最大演算値SPrmax、SPgmax、SPbmaxを算出する。
SPrmax = (M00+M01+M02)Rg・(RHL +kr(RHL -Y0r)) ・・・(7-1)
SPgmax = (M10+M11+M12)Gg・(GHL +kg(GHL -Y0g)) ・・・(7-2)
SPbmax = (M20+M21+M22)Bg・(BHL +kb(BHL -Y0b)) ・・・(7-3)
Here, when the pixel values SPr, SPg, and SPb of the spectral estimation image SP are calculated, the range of the number of gradation bits (for example, 0 to 255) may be exceeded, which causes image quality degradation. Therefore, the change
SPr max = (M 00 + M 01 + M 02 ) Rg ・ (R HL + kr (R HL -Y0r)) (7-1)
SPg max = (M 10 + M 11 + M 12 ) Gg ・ (G HL + kg (G HL -Y0g)) (7-2)
SPb max = (M 20 + M 21 + M 22 ) Bg ・ (B HL + kb (B HL -Y0b)) (7-3)
SPrmax、SPgmax、SPbmaxの値が255を超えているとき、変更量算出手段174はSPrmax、SPgmax、SPbmaxの値が最大階調表現数Cmax(たとえば255、1023)になるようなダイナミックレンジ圧縮を施すように式(2)の重み付け係数kを変化させる。ここで、η=Cmax/(M00+M01+M02)とすると、上記式(7−1)〜(7−3)は
kr = (η/Rg-RHL)/(RHL-Y0r) ・・・(8-1)
kg = (η/Gg -GHL)/(GHL-Y0g) ・・・(8-2)
kb = (η/Bg -BHL)/(BHL-Y0b) ・・・(8-3)
となる。これは、図9に示すように、マトリクスパラメータMに応じて傾きkr、kg、kbを変化させていることを意味する。そして、圧縮処理手段41は、変更量算出手段174により変化した重み付け係数kを用いて内視鏡画像P3に対しダイナミックレンジ圧縮を施す。このように、各チャンネルCH1〜CH8毎に選択されるマトリクスパラメータMに応じて、階調調整手段42における階調の変更度を調整することにより、どのチャンネルCH1〜CH8の分光推定画像SPについても白飛び増加等の画質の劣化を防止することができる。
When SPr max, SPg max, the value of SPb max exceeds 255, the correction
kr = (η / Rg-R HL ) / (R HL -Y0r) (8-1)
kg = (η / Gg -G HL ) / (G HL -Y0g) (8-2)
kb = (η / Bg -B HL ) / (B HL -Y0b) (8-3)
It becomes. This means that the slopes kr, kg, kb are changed according to the matrix parameter M as shown in FIG. The compression processing means 41 performs dynamic range compression on the endoscope image P3 using the weighting coefficient k changed by the change amount calculation means 174. In this way, by adjusting the degree of gradation change in the gradation adjusting means 42 in accordance with the matrix parameter M selected for each channel CH1 to CH8, any spectral estimated image SP of any channel CH1 to CH8 is adjusted. Degradation of image quality such as increased whiteout can be prevented.
図10は本発明の内視鏡画像処理装置の第3の実施形態を示すブロック図であり、図10を参照して内視鏡画像処理装置について説明する。なお、図10の内視鏡画像処理装置において図2の内視鏡画像処理装置と同一の構成を有する部位には同一の符号を付してその説明を省略する。図10の内視鏡画像処理装置が図2の内視鏡画像処理装置と異なる点は、分光推定画像SPと内視鏡画像P4とを合成した合成画像P10を出力する点である。なお、図10における装置コントローラ270は、図2および図8と略同一の構成を有するものであるが、画像調整手段40の出力信号に対し所定の重み付け係数kを設定するものであり、変更量算出手段74、174は重み付け係数wを算出するものである。 FIG. 10 is a block diagram showing a third embodiment of the endoscopic image processing apparatus of the present invention. The endoscopic image processing apparatus will be described with reference to FIG. In the endoscopic image processing apparatus of FIG. 10, parts having the same configurations as those of the endoscopic image processing apparatus of FIG. The endoscope image processing apparatus in FIG. 10 is different from the endoscope image processing apparatus in FIG. 2 in that a composite image P10 obtained by combining the spectral estimation image SP and the endoscope image P4 is output. The apparatus controller 270 in FIG. 10 has substantially the same configuration as that in FIGS. 2 and 8, but sets a predetermined weighting coefficient k for the output signal of the image adjustment means 40, and the amount of change The calculating means 74 and 174 calculate the weighting coefficient w.
具体的には、内視鏡画像処理装置200は、分光推定画像SP重み付け係数wを乗じた画像と、内視鏡画像に重み付け係数(1−w)を乗じた画像とを合成した合成画像を生成する画像合成手段210を備えている。そして、装置コントローラ270は重み付け係数w、(1−w)をマトリクスパラメータMに応じて変化させる。ここで、階調調整後の内視鏡画像の画素値をP、分光推定画像の画素値をSPとしたとき、画像合成手段210から出力される合成画像P10は、
P10 = SP・w+P(1-w) ・・・(9)
と表せる。
Specifically, the endoscopic
P10 = SP ・ w + P (1-w) (9)
It can be expressed.
ここで、合成画像P10を生成したときに、合成画像P10の画素値が最大階調表現数Cmaxの範囲を超えてしまう場合がありこれが白飛びの原因になる。そこで、変更量算出手段74は内視鏡画像P0の最大画素値RHL、GHL、BHLと上記式(9)および式(3−1)〜(3−3)を用いて合成画像P10における最大画素値P10maxを各RGB成分毎に算出する。装置コントローラ270は最大画素値P10maxが最大階調表現数Cmaxで飽和しているか否かを判断し、最大画素値が最大階調表現数で飽和していると判断したとき、最大画素値が最大階調表現数Cmaxになるような重み付け係数wを算出する。そして、画像合成手段210は算出された重み付け係数wを用いて合成画像を生成する。これにより、内視鏡画像の種類およびマトリクスパラメータMの値によらず合成画像P10の画質の劣化を防止することができる。
Here, when the composite image P10 is generated, the pixel value of the composite image P10 may exceed the range of the maximum gradation expression number C max , which causes whiteout. Therefore, the change amount calculation means 74 uses the maximum pixel values R HL , G HL , B HL of the
なお、図10においてマトリクスパラメータMに応じて重み付け係数wを調整する場合について例示しているが、所定の値に設定された重み付け係数wを考慮して図2の実施形態および図8の実施形態の調整係数α、β、γもしくは重み付け係数kを決定するようにしてもよい。このとき、式(3−1)〜(3−3)もしくは(8−1)〜(8−3)の最大画素値RHL、GHL、BHLに式(9)が代入されることにより、合成画像P10の画素が最大階調表現数Cmax内に収まるように調整係数α、β、γもしくは重み付け係数kが調整されるようになる。 10 illustrates the case where the weighting coefficient w is adjusted according to the matrix parameter M, the embodiment of FIG. 2 and the embodiment of FIG. 8 are considered in consideration of the weighting coefficient w set to a predetermined value. The adjustment coefficients α, β, γ or the weighting coefficient k may be determined. At this time, the expression (9) is substituted into the maximum pixel values R HL , G HL , and B HL of the expressions (3-1) to (3-3) or (8-1) to (8-3). Then, the adjustment coefficients α, β, γ or the weighting coefficient k are adjusted so that the pixels of the composite image P10 fall within the maximum gradation expression number C max .
上記各実施の形態によれば、内視鏡により取得された内視鏡画像に対しマトリクスパラメータMを用いてマトリクス演算を施すことにより分光推定画像SPを生成する際に、マトリクス演算に用いるマトリクスパラメータMを設定し、設定したマトリクスパラメータMに応じて内視鏡画像の階調を調整し、調整した内視鏡画像に対しマトリクス演算を施すことにより分光推定画像SPを生成することにより、設定されたマトリクスパラメータを用いたマトリクス演算による画素値の変化予め予測して内視鏡画像の階調を調整した後に分光推定画像SPの生成が行われるため、どのような内視鏡画像が取得されどのようなマトリクスパラメータが設定されたとしても分光推定画像SPの画質の劣化が生じるのを防止することができる。 According to each of the above embodiments, the matrix parameter used for the matrix calculation when generating the spectral estimated image SP by performing the matrix calculation on the endoscopic image acquired by the endoscope using the matrix parameter M. M is set, the gradation of the endoscopic image is adjusted according to the set matrix parameter M, and the spectral estimated image SP is generated by performing a matrix operation on the adjusted endoscopic image. Change in pixel value due to matrix calculation using matrix parameters is performed in advance, and after adjusting the gradation of the endoscopic image, the spectral estimated image SP is generated, so what endoscopic image is acquired and which Even if such matrix parameters are set, it is possible to prevent the degradation of the image quality of the spectrally estimated image SP.
なお、内視鏡画像から階調の調整に用いる基準画素値を検出する基準値検出手段73をさらに備え、画像調整手段40が、基準値検出手段73において検出された基準画素値(最大画素値)RHL、GHL、BHLをパラメータ設定手段72において設定されたマトリクスパラメータMを用いてマトリクス演算したときの基準演算値(最大演算値)SPrmax、SPgmax、SPbmaxが設定値(最大階調表現数)Cmaxに飽和し、飽和している画素数が内視鏡画像よりも増えているとき、内視鏡画像の階調を調整するものであるとき、内視鏡画像の特性に合わせた階調の調整を行い分光推定画像SPの画質の劣化が生じるのを防止することができる。 Reference value detecting means 73 for detecting a reference pixel value used for gradation adjustment from the endoscopic image is further provided, and the image adjusting means 40 has a reference pixel value (maximum pixel value) detected by the reference value detecting means 73. ) Reference calculation values (maximum calculation values) SPr max , SPg max , SPb max when matrix calculation is performed using the matrix parameter M set in the parameter setting means 72 for R HL , G HL , B HL are set values (maximum) Number of gradation representations) When saturated with C max and the number of saturated pixels is larger than that of the endoscopic image, when adjusting the gradation of the endoscopic image, the characteristics of the endoscopic image Therefore, it is possible to prevent the degradation of the image quality of the spectrally estimated image SP by adjusting the gradation in accordance with.
また、画像調整手段40が階調の調整量が設定された階調変換テーブルを有するものであり、調整係数を用いて階調変換テーブルの階調変換特性を調整する階調調整手段42を備えたものであって、マトリクスパラメータMに応じて調整係数α、β、γを変化させることにより階調変換特性の変化量を調整する、もしくは内視鏡画像からボケマスク画像を生成し、ボケマスク画像に重み付け係数kを乗じた後に内視鏡画像に加算するダイナミックレンジ圧縮を施す圧縮処理手段41を備えたものであり、マトリクスパラメータMに応じて重み付け係数kを変化させることにより内視鏡画像の階調を調整するものであれば、従来の内視鏡画像処理装置において内視鏡画像に施している階調処理もしくは圧縮処理における各種係数α、β、γ、kを調整することにより効率的に分光推定画像SPの画質の劣化を防止することができる。
The
また、図10に示すように、内視鏡により取得された通常観察画像に対しマトリクスパラメータMを用いてマトリクス演算を施すことにより分光推定画像SPを生成する分光画像生成手段50と、分光画像生成手段50により生成された分光推定画像SPと内視鏡画像とを重み付け加算した合成画像を生成する画像合成手段210と、マトリクスパラメータMに応じて重み付けを変化させることにより、画像合成手段210において生成される合成画像の階調を調整する画像調整手段40とを備えたことにより、マトリクスパラメータMの大きさによって変化する合成画像の画素値を予め予測して重み付けを決定することができるため、合成画像P10に画質の劣化が生じるのを防止することができる。
Also, as shown in FIG. 10, a spectral image generation means 50 that generates a spectral estimated image SP by performing matrix calculation using a matrix parameter M on a normal observation image acquired by an endoscope, and spectral image generation The
本発明の実施の形態は上記実施の形態に限定されない。上記各実施形態において、白飛びの場合について例示して説明している。例えば、画像処理のダイアグラムにおいて、階調調整手段と分光画像生成手段の順序が逆であった場合、すなわち、分光画像生成の行列計算をリニア領域(ガンマ補正を行っていない領域)で行う構成であってもよい。その場合、分光推定画像を生成した場合に黒潰れが増加することも考えられる。黒潰れに適用する際には上述した最大画素値に代えて最小信号値が所定の値になるように各種係数が設定されることになる。あるいは画像調整手段40は最大画素値もしくは最小画素値を用いる場合に限らず画素平均値が所定の値になるように階調調整を行うようにしてもよい。
The embodiment of the present invention is not limited to the above embodiment. In each of the above embodiments, the case of overexposure is described as an example. For example, in the image processing diagram, when the order of the gradation adjustment unit and the spectral image generation unit is reversed, that is, the matrix calculation for spectral image generation is performed in a linear region (region where gamma correction is not performed). There may be. In that case, it is also conceivable that black collapse increases when a spectral estimation image is generated. When applied to blackout, various coefficients are set so that the minimum signal value becomes a predetermined value instead of the maximum pixel value described above. Alternatively, the
また、上記実施形態において、内視鏡画像処理装置30はDSP等のハードウェアを用いて構成される場合について例示しているが、内視鏡画像処理装置がパーソナルコンピュータ等のコンピュータからなるものであってもよい。このとき、図1の内視鏡画像処理装置30の構成は補助記憶装置に読み込まれた内視鏡画像処理プログラムをコンピュータ(たとえばパーソナルコンピュータ等)上で実行することにより実現される。 Moreover, in the said embodiment, although the case where the endoscopic image processing apparatus 30 was comprised using hardware, such as DSP, illustrated, the endoscopic image processing apparatus consists of computers, such as a personal computer. There may be. At this time, the configuration of the endoscopic image processing device 30 in FIG. 1 is realized by executing an endoscopic image processing program read into the auxiliary storage device on a computer (for example, a personal computer).
さらに、上記実施の形態において、チャンネルCH1〜CH8に応じて各種パラメータが変化する場合について例示しているが、各パラメータを入力部2からの入力に従い設定することができるようにしてもよい。
Further, in the above embodiment, the case where various parameters change according to the channels CH1 to CH8 is illustrated, but each parameter may be set according to the input from the
1、200 内視鏡システム
30 内視鏡画像処理装置
40 画像調整手段
41 圧縮処理手段
42 階調調整手段
50 分光画像生成手段
70 装置コントローラ
71 チャンネル取得手段
72 パラメータ設定手段
73 基準値検出手段
74、174 変更量算出手段
210 画像合成手段
270 装置コントローラ
CDB チャンネルデータベース
Cmax 最大階調表現数(設定値)
GHL、GHL、BHL 最大画素値(基準画素値)
k 重み付け係数
M マトリクスパラメータ
PDB パラメータデータベース
Rg、Gg、Bg 設定ゲイン係数
α、β、γ ゲイン係数
SP 分光推定画像
SPrmax、SPgmax、SPbmaxx 最大演算値(基準演算値)
w 重み付け係数
DESCRIPTION OF SYMBOLS 1,200 Endoscope system 30 Endoscope
G HL , G HL , B HL maximum pixel value (reference pixel value)
k Weighting coefficient M Matrix parameter PDB Parameter database Rg, Gg, Bg Set gain coefficient α, β, γ Gain coefficient SP Spectral estimation image
SPr max , SPg max , SPb maxx Maximum calculation value (reference calculation value)
w Weighting factor
Claims (7)
前記マトリクス演算に用いる前記マトリクスパラメータを設定するパラメータ設定手段と、
該パラメータ設定手段により設定された前記マトリクスパラメータに応じて前記内視鏡画像の階調を調整する画像調整手段と、
該画像調整手段により調整された前記内視鏡画像に対し前記マトリクス演算を施すことにより前記分光推定画像を生成する分光画像生成手段と
を備えたことを特徴とする内視鏡画像処理装置。 An endoscopic image processing apparatus that generates a spectral estimation image by performing a matrix operation using a matrix parameter on an endoscopic image acquired by an endoscope,
Parameter setting means for setting the matrix parameters used in the matrix calculation;
Image adjusting means for adjusting the gradation of the endoscopic image in accordance with the matrix parameter set by the parameter setting means;
An endoscopic image processing apparatus comprising: a spectral image generation unit configured to generate the spectral estimation image by performing the matrix operation on the endoscopic image adjusted by the image adjustment unit.
前記画像調整手段が、前記基準値検出手段において検出された前記基準画素値を前記パラメータ設定手段において設定された前記マトリクスパラメータを用いてマトリクス演算したときの基準演算値が設定値に飽和し、飽和している画素数が前記内視鏡画像よりも増えているとき、前記内視鏡画像の階調を調整するものであることを特徴とする請求項1記載の内視鏡画像処理装置。 A reference value detecting means for detecting a reference pixel value used for gradation adjustment from the endoscopic image;
When the image adjustment unit performs a matrix calculation on the reference pixel value detected by the reference value detection unit using the matrix parameter set by the parameter setting unit, a reference calculation value is saturated to a set value, The endoscope image processing apparatus according to claim 1, wherein when the number of pixels being increased is greater than that of the endoscope image, the gradation of the endoscope image is adjusted.
前記マトリクス演算に用いる前記マトリクスパラメータを設定し、
設定したマトリクスパラメータに応じて前記内視鏡画像の階調を調整し、
調整した前記内視鏡画像に対し前記マトリクス演算を施すことにより前記分光推定画像を生成する
ことを特徴とする内視鏡画像処理方法。 An endoscopic image processing method for generating a spectral estimation image by performing a matrix operation using a matrix parameter on an endoscopic image acquired by an endoscope,
Set the matrix parameters used for the matrix calculation,
Adjust the tone of the endoscopic image according to the set matrix parameter,
An endoscope image processing method, wherein the spectral estimated image is generated by performing the matrix operation on the adjusted endoscope image.
該分光画像生成手段により生成された前記分光推定画像と前記内視鏡画像とを重み付け加算した合成画像を生成する画像合成手段と、
前記マトリクスパラメータに応じて前記重み付けを変化させることにより、前記画像合成手段において生成される前記合成画像の階調を調整する画像調整手段と
を備えたことを特徴とする内視鏡画像処理装置。 Spectral image generation means for generating a spectral estimation image by performing a matrix operation on a normal observation image acquired by an endoscope using a matrix parameter;
Image combining means for generating a combined image obtained by weighted addition of the spectral estimated image generated by the spectral image generating means and the endoscopic image;
An endoscopic image processing apparatus comprising: an image adjusting unit that adjusts a gradation of the synthesized image generated by the image synthesizing unit by changing the weighting according to the matrix parameter.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008152716A JP2009297133A (en) | 2008-06-11 | 2008-06-11 | Apparatus and method for processing endoscope image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008152716A JP2009297133A (en) | 2008-06-11 | 2008-06-11 | Apparatus and method for processing endoscope image |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009297133A true JP2009297133A (en) | 2009-12-24 |
Family
ID=41544674
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008152716A Withdrawn JP2009297133A (en) | 2008-06-11 | 2008-06-11 | Apparatus and method for processing endoscope image |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009297133A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018230066A1 (en) * | 2017-06-12 | 2018-12-20 | ソニー株式会社 | Medical system, medical apparatus, and control method |
-
2008
- 2008-06-11 JP JP2008152716A patent/JP2009297133A/en not_active Withdrawn
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018230066A1 (en) * | 2017-06-12 | 2018-12-20 | ソニー株式会社 | Medical system, medical apparatus, and control method |
JPWO2018230066A1 (en) * | 2017-06-12 | 2020-04-16 | ソニー株式会社 | Medical system, medical device, and control method |
JP7088185B2 (en) | 2017-06-12 | 2022-06-21 | ソニーグループ株式会社 | Medical systems, medical devices and control methods |
US11463629B2 (en) | 2017-06-12 | 2022-10-04 | Sony Corporation | Medical system, medical apparatus, and control method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4647346B2 (en) | Endoscope device | |
JP5271062B2 (en) | Endoscope apparatus and method of operating the same | |
JP5527448B2 (en) | Image input device | |
JP4996773B2 (en) | Endoscope device | |
US10039439B2 (en) | Endoscope system and method for operating the same | |
US20160089010A1 (en) | Endoscope system, processor device, and method for operating endoscope system | |
JP2007142670A (en) | Image processing system and image processing program | |
JP2006061620A (en) | Video signal processor for endoscope | |
JP4736939B2 (en) | Imaging apparatus and image processing method | |
US20110254974A1 (en) | Signal processing apparatus, solid-state image capturing apparatus, electronic information device, signal processing method, control program and storage medium | |
JP2008178481A (en) | Image processor | |
JP5087529B2 (en) | Identification processing apparatus, identification processing program, and identification processing method | |
JP2010200883A (en) | Device, method, and program for processing endoscopic image | |
JP5422180B2 (en) | Endoscope apparatus and method of operating the same | |
JP5098908B2 (en) | Image input device | |
US20100256449A1 (en) | Endoscopic image processing apparatus and method and computer-readable recording medium | |
JP2009273691A (en) | Apparatus and method of endoscope image processing | |
JP2009297133A (en) | Apparatus and method for processing endoscope image | |
JP2010213746A (en) | Endoscopic image processing device and method and program | |
JP2009100936A (en) | Image processor | |
JP3917733B2 (en) | Electronic endoscope device | |
JP5856943B2 (en) | Imaging system | |
JP2007336172A (en) | Image signal processor and image signal processing method | |
JP2009285132A (en) | Endoscope image processing device and method | |
WO2017212946A1 (en) | Image processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20110906 |