JP2009135598A - Image reading and display apparatus - Google Patents

Image reading and display apparatus Download PDF

Info

Publication number
JP2009135598A
JP2009135598A JP2007307849A JP2007307849A JP2009135598A JP 2009135598 A JP2009135598 A JP 2009135598A JP 2007307849 A JP2007307849 A JP 2007307849A JP 2007307849 A JP2007307849 A JP 2007307849A JP 2009135598 A JP2009135598 A JP 2009135598A
Authority
JP
Japan
Prior art keywords
image data
image
pixels
data
color image
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
Application number
JP2007307849A
Other languages
Japanese (ja)
Inventor
Masahiro Mochizuki
正裕 望月
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP2007307849A priority Critical patent/JP2009135598A/en
Publication of JP2009135598A publication Critical patent/JP2009135598A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image reading and display apparatus capable of improving both a frame rate and image quality when a bandwidth is limited in transferring image data. <P>SOLUTION: The image reading apparatus is provided with: an image pickup section; a RAW image data generating section for digitizing image signals from the image pickup section to convert the digitized signals into RAW image data; a primary color image data generating section for generating primary color image data by correcting the RAW image data; a secondary color image data generating section for generating secondary color image data by thinning the primary color image data; a data selection section for selecting, as output data, one of the RAW image data, the primary color image data and the secondary color image data; and a digital interface for outputting the output data. The image display device is provided with: a digital interface for inputting the output data; an image processing section for reconstructing an image by a recovering method according to the kind of the output data; and a display section for displaying the reconstructed image. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、読み取った画像データを転送して表示する装置に関する。   The present invention relates to an apparatus for transferring and displaying read image data.

撮像素子などで読み取った画像データをパソコンなど別の装置に転送して、パソコンの画面に表示する画像読み取り表示装置の例として、カメラ付きの顕微鏡にパソコンを接続して、パソコンの画面で被検物の観察を行う顕微鏡システムが知られている。   As an example of an image reading and display device that transfers image data read by an image sensor to another device such as a personal computer and displays it on the screen of a personal computer, connect the personal computer to a microscope with a camera and inspect it on the personal computer screen. A microscope system for observing an object is known.

ところが、顕微鏡からパソコンに画像データを転送するインターフェースの帯域幅や画像データ自体の容量との関係で、画像データの転送に時間が掛かる場合がある。   However, it may take time to transfer the image data due to the bandwidth of the interface for transferring the image data from the microscope to the personal computer and the capacity of the image data itself.

そこで、画像データを転送する際の帯域幅が不足する場合に、転送する画像を圧縮したり、転送する画像自体を削除することによって帯域幅の不足に対応する方法が検討されていた(例えば、特許文献1参照)。
特開平2003−219337号公報
Therefore, in the case where the bandwidth for transferring image data is insufficient, a method for dealing with the shortage of bandwidth by compressing the image to be transferred or deleting the image to be transferred has been studied (for example, Patent Document 1).
Japanese Patent Laid-Open No. 2003-219337

例えば、画像を転送するインターフェースとして、USBインターフェース(USB2.0規格)を用いた場合の伝送帯域幅は、論理上480Mbps(=60MByte/sec)であるが、実際にはオーバーヘッドなど冗長部分を考えると、実質的な伝送帯域幅はその半分程度の約30MByte/secになる。   For example, when a USB interface (USB 2.0 standard) is used as an interface for transferring an image, the transmission bandwidth is logically 480 Mbps (= 60 MByte / sec), but in reality, a redundant part such as overhead is considered. The substantial transmission bandwidth is about 30 MByte / sec, about half of that.

一方、1280×1024サイズのRGB画像データを転送する際のデータ量は、RGB3色で各色1Byteとして、1280×1024×3=3.9MByteとなる。伝送帯域幅が30MByte/secの場合、先のSXGAサイズの画像は、1秒間に約7.6フレーム(=30,000,000/(1280×1024×3))しか転送できない計算になる。   On the other hand, the amount of data when transferring 1280 × 1024 RGB image data is 1280 × 1024 × 3 = 3.9 MByte, with 3 colors of RGB and 1 color of each color. When the transmission bandwidth is 30 MByte / sec, the previous SXGA size image can be transferred only about 7.6 frames (= 30,000,000 / (1280 × 1024 × 3)) per second.

ところが、近年のCCD撮像素子の高速化によりSXGAサイズの画像を撮像できるCCD撮像素子は1秒間に30フレーム以上の動作が可能となっており、上記のような7.6フレーム/秒のフレームレートでは高解像かつ高速表示のニーズに対応することができない。   However, a CCD image pickup device capable of picking up an SXGA size image with the recent increase in the speed of the CCD image pickup device is capable of operating at 30 frames or more per second, and has a frame rate of 7.6 frames / second as described above. Cannot meet the needs of high resolution and high speed display.

また、画像を圧縮して転送すると、画像を復元する際の処理速度の問題や画質が劣化するなどの問題が生じる。また、帯域幅に応じて転送する画像自体を削除する場合も、フレーム数が少なくなってしまうという問題が生じる。   In addition, when an image is compressed and transferred, problems such as a problem in processing speed when restoring the image and a deterioration in image quality occur. Further, when deleting the image itself to be transferred according to the bandwidth, there is a problem that the number of frames is reduced.

上記課題に鑑み、本発明の目的は、画像データを転送する際の帯域幅が制限される場合でも、画質をあまり損なうことなく効率よく画像転送を行い、高速表示を可能にすることができる画像読み取り表示装置を提供することである。   In view of the above-described problems, an object of the present invention is to provide an image that can efficiently transfer images without loss of image quality and enable high-speed display even when the bandwidth when transferring image data is limited. It is to provide a reading display device.

本発明に係る画像読み取り表示装置は、読み取った画像データを外部に転送する画像読み取り装置と、前記画像読み取り装置が転送した画像データを表示する画像表示装置とからなる画像読み取り表示装置において、前記画像読み取り装置は、結像された被写体像を電気信号に変換する撮像部と、前記撮像素子で電気信号に変換された画像信号をデジタル化してRAW画像データに変換するRAW画像データ生成部と、前記RAW画像データ生成部が生成したRAW画像データを補正して1次カラー画像データを生成する1次カラー画像データ生成部と、前記1次カラー画像データ生成部が生成した1次カラー画像データを間引き処理を行って2次カラー画像データを生成する2次カラー画像データ生成部と、前記RAW画像データ,前記1次カラー画像データ,前記2次カラー画像データのいずれかを出力データとして選択するデータ選択部と、前記データ選択部が選択した出力データを外部に出力するデジタルインターフェイスとで構成され、前記画像表示装置は、前記画像読み取り装置から転送される画像データを入力するデジタルインターフェースと、前記デジタルインターフェースを介して入力した画像データの種類に応じた復元方法で画像を再構築する画像処理部と、前記画像処理部が再構築した画像を表示する表示部とで構成されることを特徴とする。   An image reading / displaying device according to the present invention is an image reading / displaying device comprising: an image reading device that transfers read image data to the outside; and an image display device that displays image data transferred by the image reading device. The reading device includes an imaging unit that converts an imaged subject image into an electrical signal, a RAW image data generation unit that digitizes an image signal converted into an electrical signal by the imaging element and converts the image signal into RAW image data, A primary color image data generation unit that corrects the RAW image data generated by the RAW image data generation unit to generate primary color image data, and the primary color image data generated by the primary color image data generation unit is thinned out. A secondary color image data generation unit that performs processing to generate secondary color image data, the RAW image data, and the 1 A data selection unit for selecting either color image data or the secondary color image data as output data; and a digital interface for outputting the output data selected by the data selection unit to the outside. A digital interface for inputting image data transferred from the image reading device, an image processing unit for reconstructing an image by a restoration method according to the type of image data input via the digital interface, and the image processing unit Comprises a display unit for displaying the reconstructed image.

特に、前記1次カラー画像データ生成部は、RGBカラー画像データを生成し、前記2次カラー画像データ生成部は、前記RGBカラー画像データからYUVカラー画像データを生成した後、Y画素を千鳥状に間引く処理を行うことを特徴とする。   In particular, the primary color image data generation unit generates RGB color image data, and the secondary color image data generation unit generates YUV color image data from the RGB color image data, and then converts the Y pixels into a staggered pattern. It is characterized by performing a thinning process.

また、前記画像表示装置の前記画像処理部は、前記デジタルインターフェースを介して入力した画像データが2次カラー画像データである場合に、2次カラー画像データによる画像を構成する画素間の輝度変化の方向判定を行って、間引かれた画素の補間を行うことを特徴とする。   In addition, the image processing unit of the image display device may change a luminance change between pixels constituting an image based on the secondary color image data when the image data input via the digital interface is secondary color image data. It is characterized by performing direction determination and interpolating the thinned pixels.

特に、前記画像表示装置の前記画像処理部は、前記間引かれた画素の上下の画素間または左右の画素間いずれかの差分値が規定値以上の場合に、上下の画素または左右の画素の平均値で間引かれた画素の補間を行い、前記間引かれた画素の上下の画素間および左右の画素間の両方の差分値が規定値以上の場合に、上下左右の画素の平均値で間引かれた画素の補間を行うことを特徴とする。   In particular, the image processing unit of the image display device may calculate the upper and lower pixels or the left and right pixels when the difference value between the upper and lower pixels or the left and right pixels of the thinned pixels is equal to or greater than a predetermined value. Interpolation of the pixels thinned out by the average value, and when the difference value between the upper and lower pixels and the left and right pixels of the thinned pixel is equal to or greater than the specified value, the average value of the upper, lower, left and right pixels It is characterized by interpolating the thinned pixels.

また、前記デジタルインターフェースは、USBなどの汎用インターフェースで構成されることを特徴とする。   The digital interface may be a general-purpose interface such as a USB.

さらに、前記画像表示装置は、パソコンであることを特徴とする。   Furthermore, the image display device is a personal computer.

本発明によれば、画像データを転送する際の帯域幅が制限される場合でも、画質をあまり損なうことなく効率よく画像転送を行い、且つ表示することができる。   According to the present invention, even when the bandwidth at the time of transferring image data is limited, it is possible to efficiently transfer and display an image without significantly degrading the image quality.

(第1の実施形態)
第1の実施形態に係る画像読み取り表示装置101について、図面を用いて詳しく説明する。図1において、画像読み取り表示装置101は、画像読み取り装置102と、画像表示装置に相当するパソコン103とで構成される。
(First embodiment)
The image reading and displaying apparatus 101 according to the first embodiment will be described in detail with reference to the drawings. In FIG. 1, an image reading and displaying apparatus 101 includes an image reading apparatus 102 and a personal computer 103 corresponding to the image displaying apparatus.

画像読み取り装置102は、Cマウント105を介して顕微鏡104に取り付けられた撮像部106と、ケーブル107を介して撮像部106で撮像された画像信号を入力する制御部108とで構成される。また、画像読み取り装置102のUSBインターフェース109から転送される画像データは、USBケーブル110を介してパソコン103に送られる。尚、本実施形態ではUSBインターフェース109を用いているが、IEEE1394規格のインターフェースやLANインターフェースなど、これ以外のデジタルインターフェースを用いても構わない。   The image reading apparatus 102 includes an imaging unit 106 attached to the microscope 104 via a C mount 105 and a control unit 108 that inputs an image signal captured by the imaging unit 106 via a cable 107. Also, image data transferred from the USB interface 109 of the image reading apparatus 102 is sent to the personal computer 103 via the USB cable 110. In this embodiment, the USB interface 109 is used, but other digital interfaces such as an IEEE 1394 standard interface or a LAN interface may be used.

図1に示したように、本実施形態では、顕微鏡104で観察する画像を画像読み取り装置102が読み取って画像データをパソコン103に転送し、パソコン103の画面に被検物151の画像を表示して観察する顕微鏡システムの一例である。   As shown in FIG. 1, in this embodiment, the image reading device 102 reads an image observed with the microscope 104, transfers the image data to the personal computer 103, and displays the image of the test object 151 on the screen of the personal computer 103. It is an example of the microscope system to observe.

図1において、顕微鏡104は、鏡脚111と、ステージ112と、フォーカスハンドル113と、対物レンズ114と、鏡体115とで構成される。観察者は、パソコン103の画面に表示される観察画像を見ながら、顕微鏡104のフォーカスハンドル113を回してステージ112を上下させ、被検物151にフォーカスを合わせて観察する。   In FIG. 1, the microscope 104 includes a mirror leg 111, a stage 112, a focus handle 113, an objective lens 114, and a mirror body 115. While observing the observation image displayed on the screen of the personal computer 103, the observer turns the focus handle 113 of the microscope 104 to move the stage 112 up and down, and focuses the observation object 151 for observation.

次に、画像読み取り装置102の構成について、図2を用いて詳しく説明する。図2は、図1で説明した撮像部106と制御部108の構成例を示すブロック図である。   Next, the configuration of the image reading apparatus 102 will be described in detail with reference to FIG. FIG. 2 is a block diagram illustrating a configuration example of the imaging unit 106 and the control unit 108 described with reference to FIG.

図2において、例えば、図1の撮像部106は、CCD撮像素子201と、AFE(アナログフロントエンド)202とで構成される。図1の制御部108は、画像処理部203と、バッファ204と、TG(タイミングジェネレータ)205と、システムバス206と、CPU207と、ROM208と、RAM209と、USBインターフェース109とで構成される。尚、TG205は、撮像部106に含めても構わない。また、図2に示した画像読み取り表示装置101の構成は一例であり、例えば、顕微鏡104の鏡体115に装着可能なCマウント105に対応するカメラと、そのカメラで撮影した画像を入力するための画像入力インターフェースを有するパソコンとで構成しても構わない。   In FIG. 2, for example, the imaging unit 106 in FIG. 1 includes a CCD imaging device 201 and an AFE (analog front end) 202. The control unit 108 in FIG. 1 includes an image processing unit 203, a buffer 204, a TG (timing generator) 205, a system bus 206, a CPU 207, a ROM 208, a RAM 209, and a USB interface 109. The TG 205 may be included in the imaging unit 106. The configuration of the image reading and displaying apparatus 101 shown in FIG. 2 is an example. For example, a camera corresponding to the C mount 105 that can be attached to the mirror body 115 of the microscope 104 and an image captured by the camera are input. You may comprise with the personal computer which has the image input interface of.

制御部108は、システムバス206を介してCPU207によって制御される。また、CPU207はROM208に予め記憶されたプログラムに従って動作する。さらに、CPU207は、USBインターフェース109およびUSBケーブル110を介して接続されるパソコン103から送られてくる制御コマンドに応じて制御部108の各部を制御する。また、RAM209は、CPU207によって用いられ、動作のための設定値などを記憶したり、バッファ204に記憶された画像データや画像処理部203から読み出した画像データなどを記憶する。   The control unit 108 is controlled by the CPU 207 via the system bus 206. The CPU 207 operates according to a program stored in advance in the ROM 208. Further, the CPU 207 controls each unit of the control unit 108 according to a control command transmitted from the personal computer 103 connected via the USB interface 109 and the USB cable 110. The RAM 209 is used by the CPU 207 to store setting values for operation, image data stored in the buffer 204, image data read from the image processing unit 203, and the like.

図2において、顕微鏡104で観察する被検物151の画像は、CCD撮像素子201で電気信号に変換されてAFE202に出力される。この時、TG205からCCD撮像素子201に画像信号を出力するタイミングを与える。   In FIG. 2, the image of the test object 151 observed with the microscope 104 is converted into an electrical signal by the CCD image sensor 201 and output to the AFE 202. At this time, a timing for outputting an image signal from the TG 205 to the CCD image sensor 201 is given.

AFE202は、CCD撮像素子201から読み出された画像信号に、相関二重サンプリング回路(CDS回路)を通してノイズ除去を行ったり、適正レベルに増幅した後、A/D変換器によってデジタル画像データに変換して画像処理部203に出力する。尚、これらの処理もTG205から与えられるタイミング信号に従って行われる。   The AFE 202 removes noise from the image signal read from the CCD image sensor 201 through a correlated double sampling circuit (CDS circuit) or amplifies the signal to an appropriate level, and then converts it into digital image data by an A / D converter. And output to the image processing unit 203. These processes are also performed according to the timing signal given from the TG 205.

画像処理部203は、AFE202から入力した画像データに対して、色変換処理などを行う。ここで、CCD撮像素子201で撮影されてAFE202から出力される画像データはRAW画像データと呼ばれ、CCD撮像素子201の受光面にマトリクス状に配置された画素毎に読み出された生の(未処理の)画像データである。尚、画像処理部203がCCD撮像素子201からRAW画像データを入力するタイミングはTG205から与えられる。   The image processing unit 203 performs color conversion processing on the image data input from the AFE 202. Here, the image data photographed by the CCD image sensor 201 and output from the AFE 202 is called RAW image data, and is read out for each pixel arranged in a matrix on the light receiving surface of the CCD image sensor 201 ( Unprocessed image data. The timing at which the image processing unit 203 inputs RAW image data from the CCD image sensor 201 is given from the TG 205.

ここで、RAW画像データについて詳しく説明する。一般に知られているJPEG規格などのカラー画像は、RGB各色の諧調は8bit(256階調)に制限されているのに対し、RAW画像データの場合は、CCD撮像素子201のハード的な諧調に応じて決まる。例えば、CCD撮像素子201が12bit入力に対応している場合は、RGB各色の諧調が12bit(4,096諧調)のRAW画像データが得られるので、ビット落ちなどが少ない高精度な色補正を行うことができる。   Here, the RAW image data will be described in detail. In general color images such as the JPEG standard, the gradation of each RGB color is limited to 8 bits (256 gradations), whereas in the case of RAW image data, the gradation of hardware of the CCD image sensor 201 is reduced. It depends on your needs. For example, when the CCD image sensor 201 is compatible with 12-bit input, RAW image data with a gradation of each RGB color of 12 bits (4,096 gradations) can be obtained, so that high-precision color correction with little bit loss is performed. be able to.

次にRAW画像データの画素配置について説明する。図3(a)はCCD撮像素子201の画素配置を示した図で、分かり易いように、列C1〜列C4,行R1〜行R4の4×4画素を描いてある。ベイヤー配列と呼ばれる方法でRGB各色のカラーフィルタが所定の規則に従って各画素に配置されている。例えば、行R1と行R3の奇数行では、列C1はRフィルタ、列C2はGフィルタ、列C3はRフィルタ、列C4はGフィルタのようにRとGのカラーフィルタが交互に配置されている。同様に、行R2と行R4の偶数行では、列C1はGフィルタ、列C2はBフィルタ、列C3はGフィルタ、列C4はBフィルタのようにGとBのカラーフィルタが交互に配置されている。   Next, pixel arrangement of RAW image data will be described. FIG. 3A is a diagram showing the pixel arrangement of the CCD image pickup device 201. For easy understanding, 4 × 4 pixels of columns C1 to C4 and rows R1 to R4 are drawn. Color filters for each color of RGB are arranged in each pixel according to a predetermined rule by a method called a Bayer array. For example, in the odd-numbered rows R1 and R3, the column C1 is an R filter, the column C2 is a G filter, the column C3 is an R filter, the column C4 is an R filter, and the color filters R and G are alternately arranged. Yes. Similarly, in even-numbered rows R2 and R4, column C1 is a G filter, column C2 is a B filter, column C3 is a G filter, column C4 is a B filter, and G and B color filters are alternately arranged. ing.

一方、図3(b)は、表示モニタ111に表示する際の画素配置を示した図である。尚、実際には、図3(a)のCCD撮像素子201の画素配置と同様に、表示モニタ111にもRGB各色のカラーフィルタ毎に画素が配置されているが、図3(b)ではRGBで表現できる1単位を表示モニタ111の1画素として描いてある。特に、図3(b)では、分かり易いように、表示モニタ111の画素配置をCCD撮像素子201の画素配置と同じ、列C1〜列C4,行R1〜行R4の4×4画素として描いてある。以降、列C1〜列C4,行R1〜行R4の各画素を(行番号,列番号)で示し、CCD撮像素子201の画素を撮像画素、表示モニタ111の画素を表示画素と称する。   On the other hand, FIG. 3B is a diagram showing a pixel arrangement when displaying on the display monitor 111. Actually, like the pixel arrangement of the CCD image sensor 201 in FIG. 3A, pixels are arranged in the display monitor 111 for each color filter of RGB, but in FIG. One unit that can be expressed as is represented as one pixel of the display monitor 111. In particular, in FIG. 3B, for easy understanding, the pixel arrangement of the display monitor 111 is drawn as 4 × 4 pixels in the columns C1 to C4 and rows R1 to R4, which is the same as the pixel arrangement of the CCD image sensor 201. is there. Hereinafter, each pixel of the columns C1 to C4 and rows R1 to R4 is indicated by (row number, column number), the pixel of the CCD image sensor 201 is referred to as an imaging pixel, and the pixel of the display monitor 111 is referred to as a display pixel.

図3(b)において、行R2で列C2の位置にある表示画素(R2,C2)は、色の3原色であるRGBの各色データが含まれた画素で様々な色を表示できる画素であるが、表示画素(R2,C2)に対応するCCD撮像素子201の撮像画素(R2,C2)は、Bのみである。そこで、画像処理部203は、RAW/RGB変換部211を有し、CCD撮像素子201から読み出したRAW画像データをRGB画像データに変換する処理を行う。   In FIG. 3B, the display pixel (R2, C2) at the position of the column C2 in the row R2 is a pixel that can display various colors with pixels including each color data of RGB that is the three primary colors. However, the imaging pixel (R2, C2) of the CCD imaging device 201 corresponding to the display pixel (R2, C2) is only B. Therefore, the image processing unit 203 includes a RAW / RGB conversion unit 211, and performs processing to convert RAW image data read from the CCD image sensor 201 into RGB image data.

RAW画像データをRGB画像データに変換する処理は、例えば、表示画素(R2,C2)に対応するCCD撮像素子201の撮像画素(R2,C2)の周辺の8つの撮像画素(R1,C1),(R1,C2),(R1,C3),(R2,C1),(R2,C3),(R3,C1),(R3,C2),(R3,C3)から、RデータとGデータとを求めて、表示画素(R2,C2)のRGBデータとする変換処理が行われる。変換処理の一例を示すと、Rデータは、Rフィルタが配置された撮像画素(R1,C1),(R1,C3),(R3,C1),(R3,C3)の4つの画素のデータを平均して表示画素(R2,C2)のRデータとし、同様に、Gデータは、Rフィルタが配置された撮像画素(R1,C2),(R2,C1),(R2,C3),(R3,C2)の4つの画素のデータを平均して表示画素(R2,C2)のGデータとする。このような処理を繰り返すことによって、CCD撮像素子201のRAW画素データから、表示モニタ111に表示するRGB画素データに変換することができる。尚、RAW画像データをRGB画像データに変換する際に、上記のように周辺画素の平均ではなく、周辺画素の位置に応じて重み付けを行ったり、或いは計算に用いる周辺画素の数や位置を変えても構わない。   The process of converting the RAW image data into RGB image data includes, for example, eight image pickup pixels (R1, C1) around the image pickup pixels (R2, C2) of the CCD image pickup element 201 corresponding to the display pixels (R2, C2), R data and G data are obtained from (R1, C2), (R1, C3), (R2, C1), (R2, C3), (R3, C1), (R3, C2), (R3, C3). Thus, conversion processing for converting the RGB data of the display pixels (R2, C2) is performed. As an example of the conversion process, the R data is data of four pixels of imaging pixels (R1, C1), (R1, C3), (R3, C1), (R3, C3) in which an R filter is arranged. On average, the R data of the display pixels (R2, C2) is obtained. Similarly, the G data is obtained by imaging pixels (R1, C2), (R2, C1), (R2, C3), (R3) in which R filters are arranged. , C2) is averaged to obtain G data for the display pixels (R2, C2). By repeating such processing, the RAW pixel data of the CCD image sensor 201 can be converted into RGB pixel data to be displayed on the display monitor 111. When converting RAW image data to RGB image data, weighting is performed according to the position of the peripheral pixels, not the average of the peripheral pixels as described above, or the number and positions of the peripheral pixels used for the calculation are changed. It doesn't matter.

このように、図2に示した画像処理部203のRAW/RGB変換部211は、CCD撮像素子201から読み出したRAW画像データをRGB画像データに変換して、バッファ204に一時的に記憶する。尚、これらの一連の処理を、1次カラー画像データ生成処理と称する。   As described above, the RAW / RGB conversion unit 211 of the image processing unit 203 shown in FIG. 2 converts the RAW image data read from the CCD image sensor 201 into RGB image data, and temporarily stores it in the buffer 204. This series of processing is referred to as primary color image data generation processing.

また、画像処理部203は、RAW/RGB変換部211が生成したRGB画像データをYUV信号と呼ばれる輝度色差信号に変換するRGB/YUV変換部212を有する。   The image processing unit 203 includes an RGB / YUV conversion unit 212 that converts the RGB image data generated by the RAW / RGB conversion unit 211 into a luminance / color difference signal called a YUV signal.

RGB/YUV変換部212は、RGB画像データから輝度信号(Y)と2つの色差信号(UおよびV)とに変換する。変換式を(式1),(式2),(式3)に示す。
Y= 0.299R+0.587G+0.114B …(式1)
U=−0.169R−0.331G+0.500B …(式2)
V= 0.500R−0.419G−0.081B …(式3)
上記の(式1),(式2),(式3)に示したように、YUV画像データは、RGB画像データのR,G,Bデータに所定の係数を掛けて加減算して求めることができる。
The RGB / YUV converter 212 converts RGB image data into a luminance signal (Y) and two color difference signals (U and V). The conversion expressions are shown in (Expression 1), (Expression 2), and (Expression 3).
Y = 0.299R + 0.587G + 0.114B (Formula 1)
U = −0.169R−0.331G + 0.500B (Formula 2)
V = 0.500R-0.419G-0.081B (Formula 3)
As shown in the above (Formula 1), (Formula 2), and (Formula 3), the YUV image data is obtained by multiplying R, G, and B data of RGB image data by a predetermined coefficient and adding / subtracting. it can.

ここで、RGB画像データからYUV画像データへ変換する利点について簡単に説明しておく。一般に、人間の眼は輝度信号に敏感で詳細な形状まで判別できるが、色信号には鈍感で詳細な形状は知覚しにくいという性質がある。RGB画像データのままだと、Rデータ,Gデータ,Bデータの全てに輝度信号情報が含まれているので、例えば、RGBいずれかのデータの階調数を少なくすると輝度信号の階調数も少なくなってしまう。これに対して、例えば、YUV画像データのYデータの階調数は変えずに、UデータおよびVデータの階調数を少なくしても、Yデータの解像度は維持されるため、画質の劣化が分かりにくく、扱う画像データ量を少なくすることができる。   Here, the advantage of converting RGB image data to YUV image data will be briefly described. In general, the human eye is sensitive to a luminance signal and can discriminate even a detailed shape, but a color signal has a property that it is insensitive and a detailed shape is difficult to perceive. If RGB image data is used as it is, luminance signal information is included in all of the R data, G data, and B data. For example, if the number of gradations of any of the RGB data is reduced, the number of gradations of the luminance signal is also increased. It will decrease. On the other hand, for example, the resolution of the Y data is maintained even if the number of gradations of the U data and the V data is reduced without changing the number of gradations of the Y data of the YUV image data. Is difficult to understand, and the amount of image data handled can be reduced.

次に、RGB画像データからYUV画像データへの変換例について図4を用いて説明する。図4は、図3(b)で説明した列C1〜列C4,行R1〜行R4の4×4画素各画素のRGB画像データを(式1),(式2),(式3)に代入してYUV画像データに変換した後の様子をYUVそれぞれについて描いた図である。図4(a)は(式1)に従って求めた輝度信号Yの画素配置を示し、図4(b)は(式2)に従って求めた色差信号Uの画素配置を示し、図4(c)は(式3)に従って求めた色差信号Vの画素配置を示している。尚、実際に画面に表示される1画素は、同じ画素位置の輝度信号Yと色差信号Uと色差信号Vとで表示される。例えば、表示画素(R1,C1)は、輝度信号Y00と色差信号U00と色差信号V00とで表示される。   Next, an example of conversion from RGB image data to YUV image data will be described with reference to FIG. FIG. 4 shows the RGB image data of the 4 × 4 pixels in the columns C1 to C4 and rows R1 to R4 described in FIG. 3B as (Expression 1), (Expression 2), and (Expression 3). It is the figure which drawn the mode after substituting and converting into YUV image data about each YUV. 4A shows the pixel arrangement of the luminance signal Y obtained according to (Equation 1), FIG. 4B shows the pixel arrangement of the color difference signal U obtained according to (Equation 2), and FIG. The pixel arrangement | positioning of the color difference signal V calculated | required according to (Formula 3) is shown. One pixel actually displayed on the screen is displayed by the luminance signal Y, the color difference signal U, and the color difference signal V at the same pixel position. For example, the display pixel (R1, C1) is displayed with a luminance signal Y00, a color difference signal U00, and a color difference signal V00.

また、YUV画像データからRGB画像データへ戻す場合は、(式1),(式2),(式3)の逆の計算をすればよい。変換式を(式4),(式5),(式6)に示す。
R= 1.000Y +1.402V …(式4)
G= 1.000Y−0.344U−0.714V …(式5)
B= 1.000Y+1.772U …(式6)
上記の(式4),(式5),(式6)に示したように、RGB画像データは、YUV画像データのY,U,Vデータに所定の係数を掛けて加減算して求めることができる。
Further, when returning from YUV image data to RGB image data, the inverse calculation of (Expression 1), (Expression 2), and (Expression 3) may be performed. Conversion equations are shown in (Expression 4), (Expression 5), and (Expression 6).
R = 1.000Y + 1.402V (Formula 4)
G = 1.000Y−0.344U−0.714V (Formula 5)
B = 1.000Y + 1.772U (Formula 6)
As shown in (Equation 4), (Equation 5), and (Equation 6) above, the RGB image data is obtained by adding and subtracting the Y, U, and V data of the YUV image data by a predetermined coefficient. it can.

このようにして、図3(b)のRGB画像データを再生できる。但し、上記の場合は、RGB画像データを画素毎にYUV画像データに変換して、再び、同じ画素毎にYUV画像データをRGB画像データに変換し直しただけで、YUV画像データの階調数や画素数などを変更しない限り可逆性がある。   In this way, the RGB image data shown in FIG. 3B can be reproduced. However, in the above case, the RGB image data is converted into YUV image data for each pixel, and the YUV image data is converted again into RGB image data for each same pixel. It is reversible unless the number of pixels is changed.

次に、YUV画像データの間引きについて説明する。図5は、YUV422と呼ばれている間引き方法を示した図である。尚、図5は、図4と同様に、図5(a),図5(b),図5(c)の順に、輝度信号Y,色差信号U,色差信号Vの画素配置を示している。   Next, thinning of YUV image data will be described. FIG. 5 is a diagram showing a thinning method called YUV422. 5 shows the pixel arrangement of the luminance signal Y, the color difference signal U, and the color difference signal V in the order of FIGS. 5A, 5B, and 5C, as in FIG. .

図5では、輝度信号Yの画素数は変えずに、色差信号UおよびVの画素数を1/2に少なくする。例えば、図5(a)の輝度信号Yは4×4の16画素であるが、図5(b)の色差信号Uおよび図5(c)の色差信号Vは2×4の8画素に間引かれている。この場合、図3(b)の行R2と行R4の色差信号U10,U11,U12,U13およびU30,U31,U32,U33を間引いて、行R1と行R3の色差信号U00,U01,U02,U03およびU20,U21,U22,U23で置き換え、図4(b)に示すように、行R1と行R2および行R2と行R4はそれぞれ同じ色差信号を用いている。また、色差信号Vについても、図5(c)に示すように、色差信号Cの場合と同様に、行R1と行R2および行R2と行R4はそれぞれ同じ色差信号を用いている。   In FIG. 5, the number of pixels of the color difference signals U and V is reduced to ½ without changing the number of pixels of the luminance signal Y. For example, the luminance signal Y in FIG. 5A is 16 pixels of 4 × 4, but the color difference signal U in FIG. 5B and the color difference signal V in FIG. 5C are between 8 pixels of 2 × 4. It is drawn. In this case, the color difference signals U10, U11, U12, U13 and U30, U31, U32, U33 of rows R2 and R4 in FIG. 3B are thinned out, and the color difference signals U00, U01, U02, R3 and R3 of FIG. As shown in FIG. 4B, the same color difference signal is used for each of the rows R1 and R2 and the rows R2 and R4. As for the color difference signal V, as shown in FIG. 5C, as in the case of the color difference signal C, the same color difference signal is used for each of the rows R1 and R2, and the rows R2 and R4.

このように、色差信号UおよびVの画素数を1/2に間引くことによって、図4の画像データ量に比べて、2/3に少なくすることができる。尚、図5では、色差信号UおよびVの列方向の2画素を1画素に間引く場合を示したが、行方向の2画素を1画素に間引いても構わない。   In this way, by thinning out the number of pixels of the color difference signals U and V to 1/2, the amount of image data in FIG. 4 can be reduced to 2/3. Although FIG. 5 shows a case where two pixels in the column direction of the color difference signals U and V are thinned out to one pixel, two pixels in the row direction may be thinned out to one pixel.

次に、YUV411と呼ばれる間引き方法について、図6を用いて説明する。尚、図6は、図4および図5と同様に、図6(a),図6(b),図6(c)の順に、輝度信号Y,色差信号U,色差信号Vの画素配置を示している。   Next, a thinning method called YUV411 will be described with reference to FIG. FIG. 6 shows the pixel arrangement of the luminance signal Y, the color difference signal U, and the color difference signal V in the order of FIG. 6A, FIG. 6B, and FIG. Show.

図6では、輝度信号Yの画素数は変えずに、色差信号UおよびVの画素数を1/4に少なくする。例えば、図6(a)の輝度信号Yは4×4の16画素であるが、図6(b)の色差信号Uおよび図6(c)の色差信号Vは2×2の4画素に間引かれている。この場合、図3(b)の行R2と行R4および列C2と列C4の色差信号U10,U11,U12,U13,U30,U31,U32,U33,U01,U21,U03,U23とを間引いて、色差信号U00,U02,U20,U22で置き換え、図6(b)に示すように、4画素を1つの色差信号で表す。また、色差信号Vについても、図6(c)に示すように、色差信号Cの場合と同様に、4画素を1つの色差信号で表す。   In FIG. 6, the number of pixels of the color difference signals U and V is reduced to ¼ without changing the number of pixels of the luminance signal Y. For example, the luminance signal Y in FIG. 6A is 16 pixels of 4 × 4, but the color difference signal U in FIG. 6B and the color difference signal V in FIG. It is drawn. In this case, the color difference signals U10, U11, U12, U13, U30, U31, U32, U33, U01, U21, U03, and U23 of row R2 and row R4 and column C2 and column C4 in FIG. The color difference signals U00, U02, U20 and U22 are replaced, and as shown in FIG. 6B, four pixels are represented by one color difference signal. As for the color difference signal V, four pixels are represented by one color difference signal as in the case of the color difference signal C as shown in FIG.

このように、色差信号UおよびVの画素数を1/4に間引くことによって、図4の画像データ量に比べて、1/2に少なくすることができる。   Thus, by thinning the number of pixels of the color difference signals U and V to ¼, the amount of image data in FIG. 4 can be reduced to ½.

以上、説明したように、YUV422やYUV411による間引きによって、転送する画像データ量を少なくすることができるが、伝送路の帯域幅によってはさらに画像データ量を少なくする必要が生じる。   As described above, the amount of image data to be transferred can be reduced by thinning with YUV422 or YUV411, but it is necessary to further reduce the amount of image data depending on the bandwidth of the transmission path.

次に、本実施形態の特徴である間引き方法について、図7を用いて説明する。尚、図7は、図4,図5,図6と同様に、図7(a),図7(b),図7(c)の順に、輝度信号Y,色差信号U,色差信号Vの画素配置を示している。   Next, a thinning method that is a feature of the present embodiment will be described with reference to FIG. 7 is similar to FIGS. 4, 5, and 6 in the order of the luminance signal Y, the color difference signal U, and the color difference signal V in the order of FIGS. 7A, 7B, and 7C. The pixel arrangement is shown.

図7において、図7(b)の色差信号Uおよび図7(c)の色差信号Vは、図6(b)の色差信号Uおよび図6(c)の色差信号Vと全く同じである。図6のYUV411の場合と異なるのは、図6(a)輝度信号Yの画素数を1/2に少なくしていることである。つまり、図6(a)の輝度信号Yは4×4の16画素であるが、図7(a)の輝度信号Yは、図6(a)と同じ4×4の配置になっているが、輝度信号Y01,Y04,Y10,Y30,Y21,Y23,Y30,Y32が間引かれている。このように、輝度信号Yの画素配置を千鳥状に1/2に間引くことによって、図4の画像データ量に比べて、1/3に少なくすることができる。特に、輝度信号Yの画素サイズは、色差信号UおよびVの画素サイズのように大きくしていないので、輝度信号Yの解像度をできるだけ高く維持することができる。つまり、輝度信号Yは千鳥状に間引いているので、斜め方向の画素ピッチの解像度を維持している。   In FIG. 7, the color difference signal U in FIG. 7B and the color difference signal V in FIG. 7C are exactly the same as the color difference signal U in FIG. 6B and the color difference signal V in FIG. 6 is different from the case of YUV411 in FIG. 6 in that the number of pixels of the luminance signal Y in FIG. That is, the luminance signal Y in FIG. 6A is 4 × 4 16 pixels, but the luminance signal Y in FIG. 7A has the same 4 × 4 arrangement as in FIG. 6A. The luminance signals Y01, Y04, Y10, Y30, Y21, Y23, Y30, Y32 are thinned out. In this way, by thinning out the pixel arrangement of the luminance signal Y to ½ in a zigzag manner, it can be reduced to 比 べ compared to the image data amount in FIG. In particular, since the pixel size of the luminance signal Y is not as large as the pixel sizes of the color difference signals U and V, the resolution of the luminance signal Y can be maintained as high as possible. That is, since the luminance signal Y is thinned out in a zigzag pattern, the resolution of the diagonal pixel pitch is maintained.

尚、上記の説明では、分かり易いように、4×4の16画素で説明したが、n行k列の画素数の場合でも、図8に示すように、千鳥状に間引くことができる。   In the above description, 16 × 4 × 4 pixels are described for easy understanding. However, even in the case of the number of pixels of n rows and k columns, the pixels can be thinned out in a zigzag pattern as shown in FIG.

次に、本実施形態に係る画像読み取り表示装置101の画像転送時の処理について、図9のフローチャートを用いて詳しく説明する。尚、この処理は、図1に示したように、画像読み取り装置102は、撮像部106が顕微鏡104の鏡体115にCマウント105を介して装着されている。また、画像読み取り装置102のUSBインターフェース109にはUSBケーブル110を介してパソコン103が接続され、パソコン103は顕微鏡画像を表示する画像表示ソフトウェアが立ち上げられている。以下のフローチャートは、パソコン103の画像表示ソフトウェアを中心とした処理である。   Next, processing at the time of image transfer of the image reading and displaying apparatus 101 according to the present embodiment will be described in detail with reference to the flowchart of FIG. In this process, as shown in FIG. 1, in the image reading apparatus 102, the imaging unit 106 is attached to the mirror body 115 of the microscope 104 via the C mount 105. A personal computer 103 is connected to the USB interface 109 of the image reading apparatus 102 via a USB cable 110, and image display software for displaying a microscope image is started up in the personal computer 103. The following flowchart is a process centered on the image display software of the personal computer 103.

(ステップS201)パソコン103の画像表示ソフトウェア上で画像転送処理を開始する。   (Step S201) Image transfer processing is started on the image display software of the personal computer 103.

(ステップS202)パソコン103の画面で表示する画像の表示サイズを入力する。例えば、640×480(VGA)や1280×1024(SXGA)などを入力する。この時、パソコン103側では、画像読み取り装置102が接続されているUSBインターフェースの伝送帯域幅(伝送速度)をシステム情報として把握できるので、画像の表示サイズが入力されると、これに対応する画像データを転送した場合のフレームレートを予測することができる。   (Step S202) The display size of the image displayed on the screen of the personal computer 103 is input. For example, 640 × 480 (VGA), 1280 × 1024 (SXGA), or the like is input. At this time, on the PC 103 side, the transmission bandwidth (transmission speed) of the USB interface to which the image reading device 102 is connected can be grasped as system information. Therefore, when the image display size is input, the corresponding image is displayed. The frame rate when data is transferred can be predicted.

例えば、SXGAサイズの画像の場合、RGB画像データのデータ量は、RGB3色で各色1Byteとして、1280×1024×3=3.9MByteとなる。   For example, in the case of an image of SXGA size, the data amount of RGB image data is 1280 × 1024 × 3 = 3.9 MByte, with 3 colors of RGB and 1 color of each color.

一方、USBインターフェースの伝送帯域幅は、例えばUSB2.0規格の場合は論理上480Mbps(=60MByte/sec)であるが、実際にはオーバーヘッドなど冗長部分を考えると、実質的な伝送帯域幅はその半分程度の約30MByte/secである。   On the other hand, the transmission bandwidth of the USB interface is logically 480 Mbps (= 60 MByte / sec) in the case of the USB 2.0 standard, for example, but actually considering the redundant part such as overhead, the actual transmission bandwidth is It is about 30 MByte / sec which is about half.

これらの情報から、パソコン103の画像表示ソフトウェアは、伝送路の帯域幅が30MByte/secの場合、先のSXGAサイズの画像は、1秒間に約7.6フレーム(=30,000,000/(1280×1024×3))のフレームレートになると計算することができる。   From this information, the image display software of the personal computer 103, when the bandwidth of the transmission path is 30 MByte / sec, the previous SXGA size image is about 7.6 frames per second (= 30,000,000 / ( It can be calculated when the frame rate is 1280 × 1024 × 3)).

(ステップS203)予め設定された希望フレームレート(本実施形態では例えば初期値を15フレーム/秒とする)に応じて、転送する画像モードを選択する。画像モードの種類は、例えば、RAW画像データ,RGB画像データ,YUV422画像データ,YUV411画像データ,YUV411間引き画像データの5種類の画像モードからフレームレートに応じてパソコン103の画像表示ソフトウェアが自動的に選択する。   (Step S203) An image mode to be transferred is selected according to a preset desired frame rate (in this embodiment, for example, the initial value is 15 frames / second). For example, the image display software of the personal computer 103 automatically selects the image mode from five image modes of RAW image data, RGB image data, YUV422 image data, YUV411 image data, and YUV411 thinned image data according to the frame rate. select.

例えば、SXGA画像サイズでUSBインターフェースの伝送帯域幅が30MByteの場合は、先に述べたように約7.6フレーム/秒になるので、YUV422画像データを選択すると約11.4フレーム/秒になり、YUV411画像データを選択すると約15.2フレーム/秒になり、YUV411間引き画像データを選択すると約22.8フレーム/秒になることが予測できる。例えば、パソコン103の画像表示ソフトウェアは、希望フレームレートが15フレーム/秒以上に設定されていた場合はYUV411画像データを自動的に選択し、希望フレームレートが20フレーム/秒以上に設定されていた場合はYUV411間引き画像データを自動的に選択する。ここでは、希望フレームレートの初期値が15フレーム/秒なので、YUV411画像データが選択される。   For example, when the transmission bandwidth of the USB interface is 30 Mbytes with the SXGA image size, it is about 7.6 frames / second as described above, so when the YUV422 image data is selected, it becomes about 11.4 frames / second. When YUV411 image data is selected, it can be predicted that the speed is about 15.2 frames / second, and when YUV411 thinned image data is selected, the speed is about 22.8 frames / second. For example, the image display software of the personal computer 103 automatically selects YUV411 image data when the desired frame rate is set to 15 frames / second or more, and the desired frame rate is set to 20 frames / second or more. In this case, the YUV411 thinned image data is automatically selected. Here, since the initial value of the desired frame rate is 15 frames / second, YUV411 image data is selected.

(ステップS204)パソコン103の画像表示ソフトウェアは、YUV411画像データで転送するように、USBケーブル110を介して画像読み取り装置102にコマンドを送る。USBインターフェース109を介してこのコマンドを受け取った画像読み取り装置102のCPU207は、画像処理部203のRGB/YUV変換部212にYUV411間引き画像データを生成するよう指令する。さらに、CPU207は、RGB/YUV変換部212が生成してバッファ204に出力したYUV411画像データを読み出して、パソコン103に転送する。   (Step S204) The image display software of the personal computer 103 sends a command to the image reading apparatus 102 via the USB cable 110 so as to transfer the YUV411 image data. Upon receiving this command via the USB interface 109, the CPU 207 of the image reading apparatus 102 instructs the RGB / YUV conversion unit 212 of the image processing unit 203 to generate YUV411 thinned image data. Further, the CPU 207 reads out the YUV411 image data generated by the RGB / YUV conversion unit 212 and output to the buffer 204, and transfers it to the personal computer 103.

(ステップS205)パソコン103の画像表示ソフトウェアは、パソコン103の画面に表示する画像のフレームレートを確認する。フレームレートが所定値以下になった場合はステップS206に進み、フレームレートが所定値より大きい場合はステップS204に戻る。例えば、ステップS203でYUV411画像データを選択して転送中に、伝送帯域幅が一時的に狭くなったり、画像読み取り装置102またはパソコン103の処理が追いつかなくなって、フレームレートが15フレーム/秒より小さくなった場合は、ステップS206に進む。   (Step S205) The image display software of the personal computer 103 checks the frame rate of the image displayed on the screen of the personal computer 103. If the frame rate is equal to or lower than the predetermined value, the process proceeds to step S206. If the frame rate is higher than the predetermined value, the process returns to step S204. For example, while the YUV411 image data is selected and transferred in step S203, the transmission bandwidth is temporarily narrowed, or the processing of the image reading apparatus 102 or the personal computer 103 cannot catch up, and the frame rate is lower than 15 frames / second. If YES, the process proceeds to step S206.

(ステップS206)パソコン103の画像表示ソフトウェアは、フレームレートが所定値以下になったため、転送する画像データ量が少ない画像モードに切り替えるよう画像読み取り装置102にコマンドを送り、フレームレートが上がる方向に調整する。例えば、RGB画像データの場合はYUV422画像データに切り替え、YUV422画像データの場合はYUV411画像データに切り替え、YUV411画像データの場合はYUV411間引き画像データに切り替える。   (Step S206) The image display software of the personal computer 103 sends a command to the image reading apparatus 102 to switch to an image mode with a small amount of image data to be transferred because the frame rate has fallen below a predetermined value, and adjusts the frame rate to increase. To do. For example, in the case of RGB image data, switching to YUV422 image data is performed, in the case of YUV422 image data, switching to YUV411 image data, and in the case of YUV411 image data, switching to YUV411 thinned image data is performed.

例えば、ステップS203でYUV411画像データを選択して転送中に、フレームレートが15フレーム/秒より小さくなった場合は、画像モードをYUV411間引き画像データに切り替えるよう画像読み取り装置102にコマンドを送り、ステップS204に戻る。   For example, if the frame rate becomes lower than 15 frames / second during the transfer of YUV411 image data selected in step S203, a command is sent to the image reading apparatus 102 to switch the image mode to YUV411 thinned image data. Return to S204.

尚、RAW画像データは階調数が同じ場合はRGB画像データの1/3のデータ量であるが、パソコン103の画像表示ソフトウェア側でRAW画像データからRGB画像データへの変換処理を行う必要がある。   The RAW image data has a data amount of 1/3 of the RGB image data when the number of gradations is the same, but the image display software of the personal computer 103 needs to perform conversion processing from the RAW image data to the RGB image data. is there.

このように、本実施形態に係る画像読み取り表示装置101は、画像データを転送する際の帯域幅に応じて、希望フレームレートになるように、転送する画像データの画像モード切り替えるので、フレームレートを損なうことなく画像データを転送することができる。   As described above, the image reading and displaying apparatus 101 according to the present embodiment switches the image mode of the image data to be transferred so that the desired frame rate is obtained according to the bandwidth at the time of transferring the image data. The image data can be transferred without loss.

次に、画像読み取り装置102からUSBインターフェース109およびUSBケーブル110を介して転送されてきた画像データをパソコン103側で画面に表示する場合の処理について説明する。尚、ここでは、画像モードがYUV411間引き画像データで送られてきた場合の表示処理について説明する。RAW画像データ,RGB画像データ,YUV422画像データ,YUV411画像データの各画像モードで送られてきた場合の表示処理は、図3〜図6で説明したように表示用の画素が構成されるだけなので、詳細な説明については省略する。YUV411間引き画像データは、図7で説明したように、輝度信号Yの画素が千鳥状に間引かれているので、パソコン103の画面に表示する前に、間引かれた画素の輝度信号をパソコン103の画像表示ソフトウェア側で復元する必要がある。   Next, processing when image data transferred from the image reading apparatus 102 via the USB interface 109 and the USB cable 110 is displayed on the screen on the personal computer 103 side will be described. Here, display processing when the image mode is sent as YUV411 thinned image data will be described. The display processing when the RAW image data, the RGB image data, the YUV422 image data, and the YUV411 image data are sent in the respective image modes only includes display pixels as described with reference to FIGS. Detailed description will be omitted. In the YUV411 thinned image data, the pixels of the luminance signal Y are thinned out in a zigzag pattern as described with reference to FIG. 7, so the luminance signal of the thinned pixels is displayed on the personal computer 103 before being displayed on the screen of the personal computer 103. 103 must be restored on the image display software side.

図10は、画像モードがYUV411間引き画像データの場合に、間引かれた画素の輝度信号を復元するための方向判定処理を示したフローチャートである。尚、方向判定処理とは、間引かれた画素の上下または左右方向のレベル差が規定値より大きいか否かを判定して、その判定結果に応じて間引かれた画素の補間方法を切り替える処理である。   FIG. 10 is a flowchart showing a direction determination process for restoring the luminance signals of the thinned pixels when the image mode is YUV411 thinned image data. In the direction determination process, it is determined whether the level difference in the vertical or horizontal direction of the thinned pixel is larger than a specified value, and the interpolation method of the thinned pixel is switched according to the determination result. It is processing.

(ステップS301)輝度信号Yの方向判定処理を開始する。   (Step S301) The direction determination process of the luminance signal Y is started.

(ステップS302)判定フラグ(Y_HV_GLGA)を初期化する。つまり、Y_HV_GLGA=0000bとする。尚、bはバイナリデータを示し、4ビットの判定フラグ(Y_HV_GLGA)の最下位ビット(1ビット目)は上下方向の判定結果を示し、3ビット目は左右方向の判定結果を示す。また、各ビットが0の場合は、規定値より小さいことを示す。   (Step S302) The determination flag (Y_HV_GLGA) is initialized. That is, Y_HV_GLGA = 0000b. Note that b indicates binary data, the least significant bit (first bit) of the 4-bit determination flag (Y_HV_GLGA) indicates the vertical determination result, and the third bit indicates the horizontal determination result. Further, when each bit is 0, it indicates that it is smaller than the specified value.

(ステップS303)間引かれた画素の上下方向の差分(ここでは、差の絶対値とする)を算出する。つまり、間引かれた画素Y(n,k)の上側の画素Y((n-1),k)と下側の画素Y((n+1),k)との差分を求める。例えば、図8において、間引かれた画素Y12の値を復元する場合に、画素Y12の上下方向の画素Y02と画素Y22との差分を求める。尚、分かり易いようにY(n,k)と記載したがこれはYnkと同じものを意味し、n=1でk=2の場合はY(1,2)=Y12となり、この場合のY((n+1),k)はY22となる。   (Step S303) The difference in the vertical direction of the thinned pixels (here, the absolute value of the difference) is calculated. That is, the difference between the upper pixel Y ((n−1), k) and the lower pixel Y ((n + 1), k) of the thinned pixel Y (n, k) is obtained. For example, in FIG. 8, when restoring the value of the thinned pixel Y12, the difference between the pixel Y02 in the vertical direction of the pixel Y12 and the pixel Y22 is obtained. For the sake of clarity, Y (n, k) is shown, but this means the same as Ynk. When n = 1 and k = 2, Y (1,2) = Y12. ((n + 1), k) is Y22.

(ステップS304)ステップS303で求めた上下方向の差分が規定値a以上か否かを判別する。上下方向の差分が規定値a以上の場合はステップS305に進み、規定値aより小さい場合はステップS306に進む。   (Step S304) It is determined whether or not the difference in the vertical direction obtained in step S303 is equal to or greater than a specified value a. If the vertical difference is greater than or equal to the specified value a, the process proceeds to step S305, and if smaller than the specified value a, the process proceeds to step S306.

(ステップS305)判定フラグ(Y_HV_GLGA)の上下方向ビットを1にする。つまり、Y_HV_GLGA=0001bとする。処理後、ステップS306に進む。   (Step S305) The vertical direction bit of the determination flag (Y_HV_GLGA) is set to 1. That is, Y_HV_GLGA = 0001b. After processing, the process proceeds to step S306.

(ステップS306)間引かれた画素の左右方向の差分(ここでは、差の絶対値とする)を算出する。つまり、間引かれた画素Y(n,k)の左側の画素Y(n,(k-1))と右側の画素Y(n,(k+1))との差分を求める。例えば、図8において、間引かれた画素Y12の値を復元する場合に、画素Y12の左右方向の画素Y11と画素Y13との差分を求める。   (Step S306) The difference in the horizontal direction of the thinned pixels (here, the absolute value of the difference) is calculated. That is, the difference between the pixel Y (n, (k−1)) on the left side of the thinned pixel Y (n, k) and the pixel Y (n, (k + 1)) on the right side is obtained. For example, in FIG. 8, when restoring the value of the thinned pixel Y12, the difference between the pixel Y11 and the pixel Y13 in the horizontal direction of the pixel Y12 is obtained.

(ステップS307)ステップS306で求めた左右方向の差分が規定値b以上か否かを判別する。左右方向の差分が規定値b以上の場合はステップS308に進み、規定値bより小さい場合はステップS309に進む。   (Step S307) It is determined whether or not the difference in the left-right direction obtained in step S306 is equal to or greater than a specified value b. When the difference in the left-right direction is equal to or greater than the specified value b, the process proceeds to step S308, and when it is smaller than the specified value b, the process proceeds to step S309.

(ステップS308)判定フラグ(Y_HV_GLGA)の左右方向ビットを1にする。つまり、Y_HV_GLGA=0100bとする。処理後、ステップS309に進む。   (Step S308) The left-right direction bit of the determination flag (Y_HV_GLGA) is set to 1. That is, Y_HV_GLGA = 0100b. After processing, the process proceeds to step S309.

(ステップS309)判定フラグ(Y_HV_GLGA)の上下方向ビットの判定を行う。上下方向ビットが1の場合はステップS310へ進み、上下方向ビットが0の場合はステップS311へ進む。   (Step S309) The vertical direction bit of the determination flag (Y_HV_GLGA) is determined. If the vertical direction bit is 1, the process proceeds to step S310, and if the vertical direction bit is 0, the process proceeds to step S311.

(ステップS310)間引かれた画素の値を間引かれた画素の上下方向の画素の平均値とする。つまり、間引かれた画素Y(n,k)の上側の画素Y((n-1),k)と下側の画素Y((n+1),k)との平均値を(式7)より求める。処理後、ステップS314に進む。
Y(n,k)=(Y((n-1),k)+Y((n+1),k)/2 …(式7)
(ステップS311)判定フラグ(Y_HV_GLGA)の左右方向ビットの判定を行う。左右方向ビットが1の場合はステップS312へ進み、左右方向ビットが0の場合はステップS313へ進む。
(Step S310) The value of the thinned pixel is set as the average value of the pixels in the vertical direction of the thinned pixel. That is, the average value of the upper pixel Y ((n−1), k) and the lower pixel Y ((n + 1), k) of the thinned pixel Y (n, k) is expressed by (Expression 7). ) After processing, the process proceeds to step S314.
Y (n, k) = (Y ((n-1), k) + Y ((n + 1), k) / 2 (Expression 7)
(Step S311) The left / right direction bit of the determination flag (Y_HV_GLGA) is determined. If the left / right direction bit is 1, the process proceeds to step S312. If the left / right direction bit is 0, the process proceeds to step S313.

(ステップS312)間引かれた画素の値を間引かれた画素の左右方向の画素の平均値とする。つまり、間引かれた画素Y(n,k)の左側の画素Y(n,(k-1))と右側の画素Y(n,(k+1))との平均値を(式8)より求める。処理後、ステップS314に進む。
Y(n,k)=(Y(n,(k-1))+Y(n,(k+1))/2 …(式8)
(ステップS313)間引かれた画素の上下方向の画素間の差分または左右方向の画素間の差分のいずれにおいても規定値より小さかった場合は、間引かれた画素の周囲の画素(間引かれた画素の上下左右の4つの画素)の平均値を間引かれた画素の値とする。つまり、間引かれた画素Y(n,k)の上側の画素Y((n-1),k)と下側の画素Y((n+1),k)と左側の画素Y(n,(k-1))と右側の画素Y(n,(k+1))との平均値を(式9)より求める。
Y(n,k)=(Y((n-1),k)+Y((n+1),k)+Y(n,(k-1))+Y(n,(k+1))/4 …(式9)
(ステップS314)輝度信号Yの方向判定処理を終了する。
(Step S312) The value of the thinned pixel is set as the average value of the pixels in the horizontal direction of the thinned pixel. That is, the average value of the pixel Y (n, (k−1)) on the left side of the thinned pixel Y (n, k) and the pixel Y (n, (k + 1)) on the right side is expressed by (Equation 8). Ask more. After processing, the process proceeds to step S314.
Y (n, k) = (Y (n, (k-1)) + Y (n, (k + 1)) / 2 (Expression 8)
(Step S313) If any of the difference between the pixels in the vertical direction or the difference between the pixels in the horizontal direction of the thinned pixels is smaller than the specified value, pixels around the thinned pixels (thinned out) The average value of the four pixels above, below, left, and right of the selected pixel is set as the thinned pixel value. That is, the upper pixel Y ((n−1), k), the lower pixel Y ((n + 1), k), and the left pixel Y (n, k) of the thinned pixel Y (n, k). The average value of (k-1)) and the right pixel Y (n, (k + 1)) is obtained from (Equation 9).
Y (n, k) = (Y ((n-1), k) + Y ((n + 1), k) + Y (n, (k-1)) + Y (n, (k + 1)) / 4 ... (Formula 9)
(Step S314) The direction determination process for the luminance signal Y is terminated.

このように、YUV411間引き画像データを用いることで、画像データを転送する際の伝送路(USBインターフェースなど)の帯域幅が制限される場合でも、画質をあまり損なうことなく効率よく画像転送を行い、極端にフレームレートを落とすことなく、パソコン103の画面に高速表示することができる。また、間引かれた画素の輝度信号Yを復元する際に、方向判定処理を行うことにより、精度の高い画像の復元が可能となり、画質劣化を少なくすることができる。   In this way, by using the YUV411 thinned image data, even when the bandwidth of the transmission path (USB interface or the like) when transferring the image data is limited, the image transfer is performed efficiently without damaging the image quality. High-speed display on the screen of the personal computer 103 can be achieved without drastically reducing the frame rate. Further, by performing the direction determination process when restoring the luminance signal Y of the thinned pixels, it is possible to restore the image with high accuracy and reduce image quality degradation.

尚、本実施形態では、間引かれた画素の上下画素および左右画素の4つの周辺画素の値から方向判定を行って補間するようにしたが、上方向に2画素,下方向に2画素,左方向に2画素,右方向に2画素など、同方向の複数画素の値を用いても構わない。また、この場合は、平均値ではなく、間引かれた画素に近い画素の値の寄与度を重くするなど、重み付けを行っても求めるようにしても構わない。例えば、図8において、間引かれた画素Y21の右方向の2つの画素Y22と画素Y24とを用いる場合、間引かれた画素Y21に近い画素Y22を0.7で重み付けし、画素Y22より遠い画素Y24を0.3で重み付けする。右方向や上下方向についても同様に重み付けする。このように重み付け処理することで、処理量は増加するがより高精度に間引かれた画素の値を復元することができる。   In the present embodiment, the direction is determined from the values of the four peripheral pixels of the upper and lower pixels and the left and right pixels of the thinned out pixels, and the interpolation is performed. However, the upper two pixels, the lower two pixels, A value of a plurality of pixels in the same direction, such as two pixels in the left direction and two pixels in the right direction, may be used. In this case, it may be determined by weighting, such as by increasing the contribution of the pixel value close to the thinned pixel instead of the average value. For example, in FIG. 8, when two pixels Y22 and Y24 in the right direction of the thinned pixel Y21 are used, the pixel Y22 close to the thinned pixel Y21 is weighted by 0.7 and is farther than the pixel Y22. Pixel Y24 is weighted by 0.3. The same applies to the right direction and the vertical direction. By performing the weighting process in this way, although the amount of processing increases, the pixel values thinned out with higher accuracy can be restored.

第1の実施形態に係る画像読み取り表示装置101を用いた顕微鏡システムの構成図である。1 is a configuration diagram of a microscope system using an image reading and displaying apparatus 101 according to a first embodiment. 第1の実施形態に係る画像読み取り装置102のブロック図である。1 is a block diagram of an image reading apparatus 102 according to a first embodiment. RAW画像データとRGB画像データとの関係を示す説明図である。It is explanatory drawing which shows the relationship between RAW image data and RGB image data. YUV画像データの画素配置を示す説明図である。It is explanatory drawing which shows pixel arrangement | positioning of YUV image data. YUV422画像データの画素配置を示す説明図である。It is explanatory drawing which shows the pixel arrangement | positioning of YUV422 image data. YUV411画像データの画素配置を示す説明図である。It is explanatory drawing which shows the pixel arrangement | positioning of YUV411 image data. YUV411間引き画像データの画素配置を示す説明図である。It is explanatory drawing which shows the pixel arrangement | positioning of YUV411 thinning image data. YUV411間引き画像データの輝度信号Yの配置を示す説明図である。It is explanatory drawing which shows arrangement | positioning of the luminance signal Y of YUV411 thinning-out image data. 第1の実施形態に係る画像読み取り表示装置101の画像転送時の処理を示すフローチャートである。4 is a flowchart illustrating processing during image transfer of the image reading and displaying apparatus 101 according to the first embodiment. 第1の実施形態に係る画像読み取り表示装置101の方向判定処理を示すフローチャートである。4 is a flowchart illustrating a direction determination process of the image reading and displaying apparatus 101 according to the first embodiment.

符号の説明Explanation of symbols

101・・・画像読み取り表示装置 102・・・画像読み取り装置
103・・・パソコン 104・・・顕微鏡
106・・・撮像部 108・・・制御部
109・・・USBインターフェース 110・・・USBケーブル
113・・・フォーカスハンドル 151・・・被検物
201・・・CCD撮像素子 203・・・画像処理部
207・・・CPU 211・・・RAW/RGB変換部
212・・・RGB/YUV変換部
DESCRIPTION OF SYMBOLS 101 ... Image reading display apparatus 102 ... Image reading apparatus 103 ... Personal computer 104 ... Microscope 106 ... Imaging part 108 ... Control part 109 ... USB interface 110 ... USB cable 113 ... Focus handle 151 ... Test object 201 ... CCD image sensor 203 ... Image processing unit 207 ... CPU 211 ... RAW / RGB conversion unit 212 ... RGB / YUV conversion unit

Claims (6)

読み取った画像データを外部に転送する画像読み取り装置と、前記画像読み取り装置が転送した画像データを表示する画像表示装置とからなる画像読み取り表示装置において、
前記画像読み取り装置は、
結像された被写体像を電気信号に変換する撮像部と、
前記撮像素子で電気信号に変換された画像信号をデジタル化してRAW画像データに変換するRAW画像データ生成部と、
前記RAW画像データ生成部が生成したRAW画像データを補正して1次カラー画像データを生成する1次カラー画像データ生成部と、
前記1次カラー画像データ生成部が生成した1次カラー画像データを間引き処理を行って2次カラー画像データを生成する2次カラー画像データ生成部と、
前記RAW画像データ,前記1次カラー画像データ,前記2次カラー画像データのいずれかを出力データとして選択するデータ選択部と、
前記データ選択部が選択した出力データを外部に出力するデジタルインターフェイスと
で構成され、
前記画像表示装置は、
前記画像読み取り装置から転送される画像データを入力するデジタルインターフェースと、
前記デジタルインターフェースを介して入力した画像データの種類に応じた復元方法で画像を再構築する画像処理部と、
前記画像処理部が再構築した画像を表示する表示部と
で構成される
ことを特徴とする画像読み取り表示装置。
In an image reading and display device comprising an image reading device for transferring read image data to the outside and an image display device for displaying image data transferred by the image reading device,
The image reading device includes:
An imaging unit that converts the formed subject image into an electrical signal;
A RAW image data generation unit that digitizes an image signal converted into an electrical signal by the image sensor and converts the image signal into RAW image data;
A primary color image data generation unit that corrects the RAW image data generated by the RAW image data generation unit to generate primary color image data;
A secondary color image data generation unit that generates secondary color image data by performing a thinning process on the primary color image data generated by the primary color image data generation unit;
A data selection unit that selects any one of the RAW image data, the primary color image data, and the secondary color image data as output data;
A digital interface for outputting the output data selected by the data selection unit to the outside,
The image display device includes:
A digital interface for inputting image data transferred from the image reading device;
An image processing unit for reconstructing an image by a restoration method according to the type of image data input via the digital interface;
An image reading and displaying apparatus comprising: a display unit that displays an image reconstructed by the image processing unit.
請求項1に記載の画像読み取り表示装置において、
前記1次カラー画像データ生成部は、RGBカラー画像データを生成し、
前記2次カラー画像データ生成部は、前記RGBカラー画像データからYUVカラー画像データを生成した後、Y画素を千鳥状に間引く処理を行う
ことを特徴とする画像読み取り表示装置。
The image reading and displaying apparatus according to claim 1,
The primary color image data generation unit generates RGB color image data,
The secondary color image data generation unit generates YUV color image data from the RGB color image data, and then performs a process of thinning out Y pixels in a zigzag pattern.
請求項1または2に記載の画像読み取り表示装置において、
前記画像表示装置の前記画像処理部は、前記デジタルインターフェースを介して入力した画像データが2次カラー画像データである場合に、2次カラー画像データによる画像を構成する画素間の輝度変化の方向判定を行って、間引かれた画素の補間を行う
ことを特徴とする画像読み取り表示装置。
The image reading and displaying apparatus according to claim 1 or 2,
When the image data input via the digital interface is secondary color image data, the image processing unit of the image display device determines the direction of luminance change between pixels constituting an image based on the secondary color image data. An image reading and displaying apparatus, wherein the thinned-out pixels are interpolated.
請求項3に記載の画像読み取り表示装置において、
前記画像表示装置の前記画像処理部は、前記間引かれた画素の上下の画素間または左右の画素間いずれかの差分値が規定値以上の場合に、上下の画素または左右の画素の平均値で間引かれた画素の補間を行い、前記間引かれた画素の上下の画素間および左右の画素間の両方の差分値が規定値以上の場合に、上下左右の画素の平均値で間引かれた画素の補間を行う
ことを特徴とする画像読み取り表示装置。
In the image reading and displaying apparatus according to claim 3,
The image processing unit of the image display device is configured to calculate an average value of the upper and lower pixels or the left and right pixels when a difference value between the upper and lower pixels or the left and right pixels of the thinned pixels is a predetermined value or more. If the difference value between the upper and lower pixels and between the left and right pixels of the thinned pixel is equal to or greater than the specified value, the average value of the upper and lower pixels is thinned out. An image reading and displaying apparatus characterized by performing interpolation of the pixels.
請求項1から4のいずれか一項に記載の画像読み取り表示装置において、
前記デジタルインターフェースは、USBなどの汎用インターフェースで構成されることを特徴とする画像読み取り表示装置。
In the image reading and displaying apparatus according to any one of claims 1 to 4,
The image reading and displaying apparatus, wherein the digital interface is constituted by a general-purpose interface such as a USB.
請求項1から5のいずれか一項に記載の画像読み取り表示装置において、
前記画像表示装置は、パソコンであることを特徴とする画像読み取り表示装置。
In the image reading and displaying apparatus according to any one of claims 1 to 5,
The image display device is a personal computer.
JP2007307849A 2007-11-28 2007-11-28 Image reading and display apparatus Withdrawn JP2009135598A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007307849A JP2009135598A (en) 2007-11-28 2007-11-28 Image reading and display apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007307849A JP2009135598A (en) 2007-11-28 2007-11-28 Image reading and display apparatus

Publications (1)

Publication Number Publication Date
JP2009135598A true JP2009135598A (en) 2009-06-18

Family

ID=40867083

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007307849A Withdrawn JP2009135598A (en) 2007-11-28 2007-11-28 Image reading and display apparatus

Country Status (1)

Country Link
JP (1) JP2009135598A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413281A (en) * 2010-12-13 2012-04-11 松翰科技股份有限公司 Image acquisition device and image data transmission method thereof
US9569817B2 (en) 2014-11-28 2017-02-14 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer readable storage medium
JP2019012998A (en) * 2017-06-15 2019-01-24 ブラックマジック デザイン ピーティーワイ リミテッドBlackmagic Design Pty Ltd RAW image processing system and method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413281A (en) * 2010-12-13 2012-04-11 松翰科技股份有限公司 Image acquisition device and image data transmission method thereof
US9569817B2 (en) 2014-11-28 2017-02-14 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer readable storage medium
JP2019012998A (en) * 2017-06-15 2019-01-24 ブラックマジック デザイン ピーティーワイ リミテッドBlackmagic Design Pty Ltd RAW image processing system and method
US11363246B2 (en) 2017-06-15 2022-06-14 Blackmagic Design Pty Ltd Raw image processing system and method
JP7182907B2 (en) 2017-06-15 2022-12-05 ブラックマジック デザイン ピーティーワイ リミテッド Camera image data processing method and camera
US11770512B2 (en) 2017-06-15 2023-09-26 Blackmagic Design Pty Ltd Raw image processing system and method

Similar Documents

Publication Publication Date Title
KR101422096B1 (en) Image processing device and image processing method
US8274576B2 (en) Still image and moving image capturing device
KR101391161B1 (en) Image processing device
JP2010183357A (en) Solid state imaging element, camera system, and method of driving solid state imaging element
RU2432614C2 (en) Image processing device, image processing method and programme
EP2579206A1 (en) Image processing device, image capturing device, program and image processing method
JP2009206654A (en) Imaging apparatus
JP2009077274A (en) Image processing device, image processing method, and imaging apparatus
JP2007067571A (en) Image processing apparatus
JP2007109204A (en) Image processor and image processing method
JP2009164778A (en) Imaging apparatus
JP4504412B2 (en) Image processing apparatus and image processing method
JP2009135598A (en) Image reading and display apparatus
KR20050031911A (en) Imaging device
KR20220030877A (en) Image sensor employing varied intra-frame analog binning
JP3902525B2 (en) Image signal processing device
US20110170776A1 (en) Image distortion correcting method and image processing apparatus
KR100763656B1 (en) Image sensor and image processing method
WO2014156669A1 (en) Image processing device and image processing method
US20210044773A1 (en) Image processing device, image processing method, and image processing system
JP5705027B2 (en) Image processing apparatus, image processing apparatus control method, program, and recording medium
JPH07322149A (en) Image pickup device
JP6069857B2 (en) Imaging device
JP2009147875A (en) Image reading and displaying device
JPWO2015083502A1 (en) Image processing apparatus, method, and program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110201