JP2014203134A - Image processor and method thereof - Google Patents

Image processor and method thereof Download PDF

Info

Publication number
JP2014203134A
JP2014203134A JP2013076451A JP2013076451A JP2014203134A JP 2014203134 A JP2014203134 A JP 2014203134A JP 2013076451 A JP2013076451 A JP 2013076451A JP 2013076451 A JP2013076451 A JP 2013076451A JP 2014203134 A JP2014203134 A JP 2014203134A
Authority
JP
Japan
Prior art keywords
label
image
block
pixel
integration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013076451A
Other languages
Japanese (ja)
Inventor
福田 康男
Yasuo Fukuda
康男 福田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2013076451A priority Critical patent/JP2014203134A/en
Publication of JP2014203134A publication Critical patent/JP2014203134A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform labeling processing in a block image unit.SOLUTION: An image 200 is divided into a plurality of block images of a prescribed size, and a block label image obtained by performing labeling processing on the block images is generated. Block label information about undecided labels being a label having the probability of being changed by integrating block label images adjacent to each other among labels allocated to the block label images is generated. The label allocated to the adjacent block label images is updated on the basis of the block label information of the block label images adjacent to each other, and a block label image obtained by integrating the adjacent block label images, and block label information of the integrated block label image are generated. The entire image 200 is subjected to labeling processing by controlling the generation of the label images and the generation of the label information, and integration.

Description

本発明は、画像をラベリング処理する画像処理に関する。   The present invention relates to image processing for labeling an image.

画像を構成する画素の値と画素の空間的な関係から、各画素にラベルを付与する画像処理(以後、ラベリング処理)は、画像中から類似または同じ値をもつ画素の連結状態を求める処理である。例えば、二値化画像について、画素値がオンを示す連結した画素の領域ごとに異なったラベルを割り当てる処理がラベリング処理に該当する。   Image processing (hereinafter referred to as labeling processing) for assigning a label to each pixel based on the spatial relationship between the values of pixels constituting the image and the pixels is a process for obtaining a connected state of pixels having similar or the same value from the image. is there. For example, for a binarized image, a process of assigning a different label for each connected pixel region whose pixel value is ON corresponds to a labeling process.

ラベリング処理は領域に基づく画像処理に有用であり、例えば、画像中からある条件を満たす領域を検出し、検出した領域ごとに、例えば色やエッジ量などに関する特徴量が求めることができる。あるいは、認識した物体の領域を検出する処理に用いて、検出した領域を切出マスクの情報として当該領域を画像編集用に切り出したり、領域ごとに異なる画像処理(例えば色変換など)を行うことができる。   The labeling process is useful for image processing based on a region. For example, a region satisfying a certain condition is detected from an image, and a feature amount relating to, for example, a color or an edge amount can be obtained for each detected region. Alternatively, it is used for processing for detecting a recognized object region, and the detected region is cut out as information of a cut-out mask, and the region is cut out for image editing, or different image processing (for example, color conversion) is performed for each region. Can do.

ラベリング処理アルゴリズムとしては、領域拡張法(リージョングローイング法)が知られている。この処理は次の手順A、Bを再帰的に実行し、すべての画素にラベルを付与すると終了する。
(A)注目画素が属する領域が未判定の場合、新しい領域として新しいラベルを割り当て、
(b)注目画素に隣接する八画素(または上下左右の四画素)を参照し、連結条件が成立する場合は、隣接画素に注目画素と同じラベルを付与する。つまり、隣接画素を注目画素と同じ領域と判定する。
As a labeling processing algorithm, a region expansion method (region growing method) is known. This process ends when the following steps A and B are recursively executed and labels are assigned to all pixels.
(A) If the area to which the pixel of interest belongs has not been determined, assign a new label as a new area,
(b) Eight pixels (or four pixels on the top, bottom, left, and right) adjacent to the target pixel are referenced, and when the connection condition is satisfied, the same label as the target pixel is assigned to the adjacent pixel. That is, the adjacent pixel is determined as the same region as the target pixel.

なお、連結条件は、例えば、隣接画素の値が、注目画素の値と同じまたは近いなどである。   The connection condition is, for example, that the value of the adjacent pixel is the same as or close to the value of the target pixel.

領域拡張法は、アルゴリズムが簡易である一方で再帰処理を必要とする。従って、例えば組込ソフトウェアにおいて領域拡張法を実行しようとすると、ハードウェアなどの資源(メモリ量やCPU処理能力)が限られ、実行が困難な場合がある。   The region expansion method requires a recursive process while the algorithm is simple. Therefore, for example, when trying to execute the area expansion method in embedded software, resources such as hardware (memory amount and CPU processing capacity) are limited, and execution may be difficult.

再帰的な処理を必要とせずに、画像を二回読み込むことでラベリング処理を実現する方法が知られている(例えば、非特許文献1、2)。以下、この方式を「2パスラベリング法」と呼ぶことにする。   There is known a method for realizing a labeling process by reading an image twice without requiring a recursive process (for example, Non-Patent Documents 1 and 2). Hereinafter, this method is referred to as a “two-pass labeling method”.

2パスラベリング法は、画像を一回目に読み込む際に一次ラベリング処理を行い、一次ラベリング処理によって付与したラベル(以下、一次ラベル)の接続情報を保持する。一次ラベルの接続情報は、一次元の配列で実現できることが知られている(非特許文献1)。つまり、2パスラベリング法は、領域拡張法に必要な再帰的な処理が不要になるメリットがある。しかし、画像の解像度が高くなればなるほど、一次ラベルの接続情報の保持に必要なメモリ量が増加する問題がある。   In the two-pass labeling method, a primary labeling process is performed when an image is read for the first time, and connection information of a label (hereinafter referred to as a primary label) provided by the primary labeling process is held. It is known that the primary label connection information can be realized by a one-dimensional array (Non-patent Document 1). In other words, the two-pass labeling method has an advantage that the recursive processing necessary for the region expansion method is not required. However, there is a problem that the higher the image resolution, the more memory is required to hold the primary label connection information.

服部哲郎「パイプライン方式によるリアルタイムの領域ラベリング(I) −基本アルゴリズムと正当性の証明−」TECHNICAL REPORT OF IEICE、PRU93-62、 HC93-36、1993年10月Tetsuro Hattori “Real-time domain labeling by pipeline method (I)-Basic algorithm and proof of validity-" Technical Report of IEICE, PRU93-62, HC93-36, October 1993 服部哲郎、太田郁義「パイプライン方式によるリアルタイムの領域ラベリング(II) −基本アルゴリズムの拡張方式−」TECHNICAL REPORT OF IEICE、PRU93-63、 HC93-37、1993年10月Tetsuro Hattori, Tomoyoshi Ota “Real-time Area Labeling by Pipeline Method (II) -Expansion Method of Basic Algorithm-” Technological Report of IEICE, PRU93-63, HC93-37, October 1993

本発明は、ラベリング処理をブロック画像単位に行うことを目的とする。   An object of the present invention is to perform labeling processing in units of block images.

本発明は、前記の目的を達成する一手段として、以下の構成を備える。   The present invention has the following configuration as one means for achieving the above object.

本発明にかかる画像処理は、画像を所定サイズの複数のブロック画像に分割し、前記ブロック画像をラベリング処理したブロックラベル画像を生成し、前記ブロックラベル画像に割り当てられたラベルのうち、互いに隣接するブロックラベル画像の統合により変更される可能性があるラベルである未確定ラベルに関するブロックラベル情報を生成し、互いに隣接するブロックラベル画像のブロックラベル情報に基づき、前記隣接するブロックラベル画像に割り当てられたラベルを更新して、前記隣接するブロックラベル画像を統合したブロックラベル画像と、前記統合したブロックラベル画像のブロックラベル情報を生成し、前記ラベル画像の生成、前記ラベル情報の生成、および、前記統合を制御して、前記画像の全体をラベリング処理することを特徴とする。   Image processing according to the present invention divides an image into a plurality of block images of a predetermined size, generates a block label image obtained by labeling the block image, and is adjacent to each other among the labels assigned to the block label image Generates block label information related to an indeterminate label that is a label that may be changed by integration of block label images, and is assigned to the adjacent block label image based on the block label information of adjacent block label images A label is updated to generate a block label image obtained by integrating the adjacent block label images and block label information of the integrated block label image, and generation of the label image, generation of the label information, and the integration To label the entire image It is characterized in.

本発明によれば、ラベリング処理をブロック画像単位に行うことができる。   According to the present invention, labeling processing can be performed on a block image basis.

実施例の画像処理装置の構成例を示すブロック図。1 is a block diagram illustrating a configuration example of an image processing apparatus according to an embodiment. 一次ラベルの接続情報の保持に必要なメモリ量の増加の問題を説明する図。The figure explaining the problem of the memory amount increase required to hold | maintain the connection information of a primary label. 本実施例のラベリング法の概略を説明する図。The figure explaining the outline of the labeling method of a present Example. ブロックラベル付与処理の詳細を説明する図。The figure explaining the detail of a block label provision process. ブロックラベル付与処理を行う画像処理部の構成例を説明するブロック図。The block diagram explaining the structural example of the image process part which performs a block label provision process. 連結条件判定ウィンドウの一例を示す図。The figure which shows an example of a connection condition determination window. 処理対象の二値画像のブロック画像例とブロックラベル付与処理の結果例を示す図。The figure which shows the example of a block image of the binary image of a process target, and the result example of a block label provision process. 一次ラベルの接続関係を示す接続関係テーブルと接続情報テーブルの一例を示す図。The figure which shows an example of the connection relation table and connection information table which show the connection relation of a primary label. 接続関係テーブルと接続情報テーブルの変遷の一例を示す図。The figure which shows an example of a transition of a connection relation table and a connection information table. 接続情報と外接情報の統合を説明するフローチャート。The flowchart explaining integration of connection information and circumscribing information. 処理後の接続関係テーブルと接続情報テーブルの一例を示す図。The figure which shows an example of the connection relation table and connection information table after a process. ラベルを確定ラベルと未確定ラベルに区分する処理を説明するフローチャート。The flowchart explaining the process which classifies a label into a definite label and an undecided label. ブロックラベル付与処理の結果例を示す図。The figure which shows the example of a result of a block label provision process. 統合処理するブロックラベル画像の一例を示す図。The figure which shows an example of the block label image which carries out an integration process. 統合処理するブロックラベル画像の接続関係テーブルおよび外接情報テーブルを示す図。The figure which shows the connection relation table and circumscribing information table of the block label image which integrate-process. ラベル更新処理を説明する図。The figure explaining a label update process. ブロックラベル統合処理後のブロックラベル画像の一例を示す図。The figure which shows an example of the block label image after a block label integration process. 実施例2の画像処理部の構成例を説明するブロック図。FIG. 6 is a block diagram for explaining an example configuration of an image processing unit according to the second embodiment.

以下、本発明にかかる実施例の画像処理を図面を参照して詳細に説明する。   Hereinafter, image processing according to an embodiment of the present invention will be described in detail with reference to the drawings.

[装置の構成]
図1のブロック図により実施例の画像処理装置の構成例を示す。なお、実施例の画像処理装置は、実施例の画像処理を実現するコンピュータ機器などのデータ処理装置によって実現される。
[Device configuration]
The block diagram of FIG. 1 shows a configuration example of the image processing apparatus of the embodiment. The image processing apparatus according to the embodiment is realized by a data processing apparatus such as a computer device that implements the image processing according to the embodiment.

CPU104は、RAM106をワークメモリとして、ROM105やデータ保存部102に格納されたオペレーティングシステム(OS)や各種プログラムを実行し、システムバス110を介して後述する構成を制御する。なお、CPU104は一つのプロセッサに限らず、CPU104としてマルチプロセッサまたはマルチコアプロセッサが利用可能である。   The CPU 104 uses the RAM 106 as a work memory, executes an operating system (OS) and various programs stored in the ROM 105 and the data storage unit 102, and controls a configuration to be described later via the system bus 110. Note that the CPU 104 is not limited to a single processor, and a multiprocessor or a multicore processor can be used as the CPU 104.

データ入力部101は、例えば画像データを入力するUSBなどのシリアルバスインタフェイスや、CCDやCMOSセンサを用いた撮像部である。データ入力部101は、入力したデータを後述するRAM106やデータ保存部102に格納する。   The data input unit 101 is an imaging unit using, for example, a serial bus interface such as USB for inputting image data, a CCD, or a CMOS sensor. The data input unit 101 stores the input data in a RAM 106 and a data storage unit 102 described later.

データ保存部102は、画像データなどを保持する記憶部または記録媒体である。データ保存部102として、例えば、ハードディスクドライブ(HDD)、ソリッドステートドライブ(SSD)、フラッシュメモリ、USBメモリ、あるいは、各種ディスクメディア、メモリカードなどのドライブが利用可能である。データ保存部102は、画像データのほかにも各種プログラムや各種データを保持する。また、後述するRAM106の一部や、後述する通信部107を介した接続先の機器をデータ保存部102として用いることもできる。   The data storage unit 102 is a storage unit or a recording medium that holds image data and the like. As the data storage unit 102, for example, a hard disk drive (HDD), a solid state drive (SSD), a flash memory, a USB memory, or various disk media, a memory card, and other drives can be used. The data storage unit 102 stores various programs and various data in addition to image data. Further, a part of the RAM 106 described later or a device connected to the communication unit 107 described later can be used as the data storage unit 102.

表示部103は、画像処理の前後の画像を表示したり、グラフィカルユーザインタフェイス(GUI)を表示する液晶パネル(LCD)などである。勿論、ビデオインタフェイスとケーブルを介して接続された装置外のディスプレイ装置でも構わない。   The display unit 103 is a liquid crystal panel (LCD) that displays images before and after image processing, or displays a graphical user interface (GUI). Of course, a display device outside the device connected to the video interface via a cable may be used.

入力部108は、ユーザ指示やデータを入力するキーボード、マウス、トラックボール、トラックパッド、タブレットなどのポインティングデバイスである。また、実施例のデータ処理装置をディジタルカメラやプリンタなどの機器の一部として構成する場合、入力部108はボタンやダイヤルなどで構成されてもよい。また、表示部103をタッチスクリーンとして、ソフトウェアキーボードやボタンを表示し、それを入力部108としてもよい。   The input unit 108 is a pointing device such as a keyboard, mouse, trackball, trackpad, and tablet for inputting user instructions and data. When the data processing apparatus according to the embodiment is configured as a part of a device such as a digital camera or a printer, the input unit 108 may be configured with a button, a dial, or the like. Alternatively, the display unit 103 may be used as a touch screen to display a software keyboard and buttons, which may be used as the input unit 108.

あるいは、公知のジェスチャ認識処理によりユーザ指示を入力する入力部108としてもよい。その場合、入力部108は、可視光線または赤外線による画像を入力する入力部と、入力した画像からユーザ動作を認識してコマンド(ユーザ指示)に変換する変換部から構成される。入力部はデータ入力部101を利用することができ、変換部は専用回路で構成するか、CPU104上で動作するプログラムによって構成すればよい。   Alternatively, the input unit 108 may input a user instruction by a known gesture recognition process. In this case, the input unit 108 includes an input unit that inputs an image using visible light or infrared rays, and a conversion unit that recognizes a user operation from the input image and converts it into a command (user instruction). The data input unit 101 can be used as the input unit, and the conversion unit may be configured by a dedicated circuit or by a program operating on the CPU 104.

通信部107は、ネットワーク111を介して機器間の通信を行うためのインタフェイスである。ネットワーク111は、Ethernet(登録商標)、シリアルバス(USB、IEEE1394)、公衆回線などの有線ネットワークである。あるいは、赤外線(IrDA)、IEEE802.11a/b/g/n、Bluetooth(登録商標)、Ultra Wide Band (UWB)、近距離通信(NFC)などの無線ネットワークでもよい。   The communication unit 107 is an interface for performing communication between devices via the network 111. The network 111 is a wired network such as Ethernet (registered trademark), a serial bus (USB, IEEE1394), and a public line. Alternatively, a wireless network such as infrared (IrDA), IEEE802.11a / b / g / n, Bluetooth (registered trademark), Ultra Wide Band (UWB), or near field communication (NFC) may be used.

画像処理部109は、詳細は後述するが、実施例の画像処理を実行する。   Although details will be described later, the image processing unit 109 executes the image processing of the embodiment.

なお、図1には、データ入力部101、データ保存部102、表示部103、入力部108がすべて一つの装置に含まれる構成を示した。しかし、それらの一つまたは複数を含む機器が、上記の有線/無線ネットワークなどによって接続され、所定の通信を行うことで、全体として図1に示す構成が得られる場合も実施例に含まれる。   FIG. 1 shows a configuration in which the data input unit 101, the data storage unit 102, the display unit 103, and the input unit 108 are all included in one device. However, the embodiment includes a case where the device shown in FIG. 1 is obtained as a whole by connecting a device including one or more of them through the wired / wireless network and performing predetermined communication.

[ラベリング処理]
●2パスラベリング法
上述したように、リージョングローイング法に比べて2パスラベリング法は、再帰的な処理が不要になるメリットがある一方、画像の解像度が高くなると、一次ラベルの接続情報の保持に必要なメモリ量が増加する問題がある。図2により一次ラベルの接続情報の保持に必要なメモリ量の増加の問題を説明する。なお、図2においては、簡単化のために、二値画像におけるオン画素にラベルを付与する(割り当てる)例を説明する。
[Labeling process]
● Two-pass labeling method As described above, the two-pass labeling method has the advantage of eliminating the need for recursive processing compared to the region growing method. On the other hand, when the image resolution is high, the primary label connection information is retained. There is a problem that the amount of memory required increases. The problem of an increase in the amount of memory required for holding the primary label connection information will be described with reference to FIG. In FIG. 2, for the sake of simplicity, an example in which labels are assigned (assigned) to on-pixels in a binary image will be described.

図2(a)および(b)は、部分画像における注目画素Dとその近傍画素(斜線を施した画素)を示す。図2(a)は注目画素Dに隣接する計八画素を近傍画素とする例を示し、図2(b)は注目画素601の上下左右に位置する四画素を近傍画素とする例を示す。近傍画素は、処理アルゴリズムなどによって定義されるが、以下では、図2(a)に示す注目画素601の周囲の八画素を隣接画素とする例を説明する。   2 (a) and 2 (b) show a target pixel D and its neighboring pixels (pixels with diagonal lines) in a partial image. FIG. 2A shows an example in which a total of eight pixels adjacent to the target pixel D are used as neighboring pixels, and FIG. 2B shows an example in which four pixels located above, below, left and right of the target pixel 601 are used as neighboring pixels. The neighboring pixels are defined by a processing algorithm or the like. Hereinafter, an example in which eight pixels around the pixel of interest 601 shown in FIG.

注目画素Dと隣接画素が何れもオン画素の場合、注目画素Dと当該隣接画素は同一領域に属するとして単一のラベルが付与される。このラベルの数が最大になる場合を説明する。   When the target pixel D and the adjacent pixel are both on-pixels, a single label is assigned as the target pixel D and the adjacent pixel belong to the same region. A case where the number of labels becomes maximum will be described.

図2(c)(d)はラベルの数が最大になる場合を示す。なお、図2(c)(d)において、斜線を施した画素がオン画素、白地の画素はオフ画素を示す。また、図2(c)は画像の幅と高さが偶数(8×8画素)の例であり、図2(d)は画像の幅と高さが奇数(9×9画素)の例である。   2 (c) and 2 (d) show cases where the number of labels is maximum. In FIGS. 2 (c) and 2 (d), the hatched pixels are on pixels, and the white pixels are off pixels. Fig. 2 (c) shows an example in which the width and height of the image are even (8x8 pixels), and Fig. 2 (d) shows an example in which the width and height of the image is odd (9x9 pixels). is there.

図2(c)(d)において、周囲八画素を隣接画素とする場合、ラベルの最大数は下式で与えられる。
Lmax = ceil(w/2)×ceil(h/2) …(1)
ここで、Lmaxはラベルの最大数、
wは画像の幅、
hは画像の高さ、
ceil(x)はx以上になる最小の整数を得る関数。
2 (c) and 2 (d), when the surrounding eight pixels are adjacent pixels, the maximum number of labels is given by the following equation.
Lmax = ceil (w / 2) × ceil (h / 2)… (1)
Where Lmax is the maximum number of labels,
w is the width of the image,
h is the height of the image,
ceil (x) is a function that obtains the smallest integer that is greater than or equal to x.

式(1)から画素数の増加に従いラベルの最大数が増加することがわかる。式(1)によれば、画素数とラベルの最大数は単純な比例関係にあるが、例えばディジタルカメラなどの画素数が、縦横に二次元的に増加することを考慮すると、ラベルの最大数も二次関数的に増加することが容易に予想される。   From equation (1), it can be seen that the maximum number of labels increases as the number of pixels increases. According to Equation (1), the number of pixels and the maximum number of labels are in a simple proportional relationship, but taking into account that the number of pixels in a digital camera, for example, increases two-dimensionally vertically and horizontally, the maximum number of labels Is also expected to increase in a quadratic function.

加えて、Lmaxを表現するために必要なビット長さも増加することになる。Lmaxを表現するために必要なビット長Lは下式で求められる。
L = ceil{log2(Lmax+1)} …(2)
In addition, the bit length necessary to express Lmax also increases. The bit length L necessary to express Lmax is obtained by the following equation.
L = ceil {log 2 (Lmax + 1)}… (2)

式(2)において、右端の(Lmax+1)の「+1」は処理対象外の画素、この例ではオフ画素に対応するラベルの分である。従って、一次ラベルに必要なメモリ量ML(単位はビット)は下式で表される。
ML = Lmax×L = Lmax×ceil{log2(Lmax+1)} …(3)
In Expression (2), “+1” of (Lmax + 1) at the right end is a pixel corresponding to a pixel not to be processed, in this example, a label corresponding to an off pixel. Therefore, the memory amount M L (unit: bits) required for the primary label is expressed by the following equation.
M L = Lmax × L = Lmax × ceil {log 2 (Lmax + 1)}… (3)

式(3)からは、二次関数的な増加を示すラベルの最大数Lmaxに対して、必要なメモリ量MLがそれ以上の割合で増加することが示される。次に、具体例を挙げる。 From equation (3), the maximum number Lmax of the label showing a quadratically increase the required amount of memory M L is shown to increase with higher rate. Next, a specific example is given.

640×480画素の画像(いわゆるVGA画像)の場合:
ラベルの最大数 Lmax0 = ceil(640/2)×ceil(480/2) = 76,800、
ビット長 L00 = ceil{log2(76,800+1)} = 17、
メモリ量 ML0 = 76,800×17 = 1,305,600 ≒ 1.25Mビット。
For an image of 640 x 480 pixels (so-called VGA image):
Maximum number of labels Lmax 0 = ceil (640/2) x ceil (480/2) = 76,800,
Bit length L 0 0 = ceil {log 2 (76,800 + 1)} = 17,
Memory capacity M L0 = 76,800 x 17 = 1,305,600 ≒ 1.25Mbit.

1920×1080画素の画像(いわゆるフルHD画像)の場合:
ラベルの最大数 Lmax0 = ceil(1920/2)×ceil(1080/2) = 518,400、
ビット長 L0 = ceil{log2(518,400+1)} = 19、
メモリ量 ML0 = 518,400×19 = 9,849,600 ≒ 9.39Mビット。
For an image of 1920 x 1080 pixels (so-called full HD image):
Maximum number of labels Lmax 0 = ceil (1920/2) x ceil (1080/2) = 518,400,
Bit length L 0 = ceil {log 2 (518,400 + 1)} = 19,
Memory capacity M L0 = 518,400 x 19 = 9,849,600 ≒ 9.39 Mbit.

上記の例を比較すると、フルHD画像の画素数はVGA画像の6.75倍であるが、フルHD画像に必要なメモリ量はVGA画像の約7.5倍になる。このことから、以下の二点が言える。
・画像サイズが大きくなるほど一次ラベルの接続情報の保持に必要なメモリ量が増加する、
・必要メモリ量の増加率は、画素数の増加率より大きい。
Comparing the above examples, the number of pixels of a full HD image is 6.75 times that of a VGA image, but the amount of memory required for a full HD image is about 7.5 times that of a VGA image. From this, the following two points can be said.
-The larger the image size, the more memory is required to hold the primary label connection information.
-The increase rate of the required memory amount is larger than the increase rate of the number of pixels.

一次ラベルの接続情報を保持するメモリ領域をDRAMなどで構成される共有メモリに割り当てることが考えられる。しかし、2パスラベリング法の場合、一次ラベルの作成後、一次ラベルの接続情報に対する統合処理を行う。この統合処理において、メモリのランダムアクセスが発生する(非特許文献1参照)。つまり、DRAMなどに一次ラベルの接続情報を格納した場合、ランダムアクセスを伴うことから、充分なパフォーマンスが得られない可能性が高い。   It is conceivable to allocate a memory area holding primary label connection information to a shared memory composed of DRAM or the like. However, in the case of the two-pass labeling method, after the primary label is created, the integration process for the primary label connection information is performed. In this integration process, random access to the memory occurs (see Non-Patent Document 1). In other words, when the primary label connection information is stored in DRAM or the like, there is a high possibility that sufficient performance cannot be obtained because random access is involved.

勿論、一次ラベルの接続情報を保持するメモリとしてSRAMなどの低遅延メモリを利用することも考えられる。しかし、
(1)SRAMは比較的高価、
(2)予め用意されたSRAMの容量が許容する範囲以下の画素数の画像しか処理できない、
(3)画像サイズの増加以上の割合でSRAMのメモリ量が増加する、
Of course, it is also conceivable to use a low-latency memory such as SRAM as a memory for holding the connection information of the primary label. But,
(1) SRAM is relatively expensive,
(2) Only images with a pixel number less than the range allowed by the SRAM capacity prepared in advance can be processed.
(3) The amount of SRAM memory increases at a rate greater than the increase in image size.

などを考慮すると、SRAMでは高解像度画像への対応が困難であることが容易に理解される。言い換えれば、将来を見越したメモリ量を予め搭載すれば装置の高価格化につながる。逆に、その時点時点で必要最小限のメモリ量を搭載すれば、画像サイズの拡大の度に設計変更が発生する。   In view of the above, it is easily understood that it is difficult to handle high-resolution images with SRAM. In other words, if the memory capacity for the future is installed in advance, the price of the apparatus will increase. On the other hand, if the minimum amount of memory is installed at that time, a design change occurs every time the image size is increased.

●実施例のラベリング法
本実施例においては、上記の課題を解決するために、画像をブロック単位にラベリング処理する。図3により本実施例のラベリング法の概略を説明する。
Labeling Method of Embodiment In this embodiment, in order to solve the above-described problem, an image is labeled in units of blocks. An outline of the labeling method of this embodiment will be described with reference to FIG.

図3において、入力画像200は所定サイズのブロック画像210-221に分割され、各ブロック画像にラベル(以下、ブロックラベル)が付与される。なお、ブロックラベルの付与処理については後述する。ブロックラベルの付与処理により、各ブロック画像に対応するブロックラベル画像230-241とブロックラベル情報250-261が得られる。ブロックラベル情報は、詳細は後述するが、後続するブロックラベルの統合処理において用いる情報である。   In FIG. 3, an input image 200 is divided into block images 210-221 of a predetermined size, and a label (hereinafter referred to as a block label) is given to each block image. The block label assigning process will be described later. By the block label assignment process, block label images 230-241 and block label information 250-261 corresponding to the respective block images are obtained. Although details will be described later, the block label information is information used in integration processing of subsequent block labels.

図3において、ブロック画像210に対してブロックラベル画像230とブロックラベル情報250が得られる。同様に、ブロック画像211に対してブロックラベル画像231とブロックラベル情報251、…、ブロック画像221に対してブロックラベル画像241とブロックラベル情報261がそれぞれ得られる。   In FIG. 3, a block label image 230 and block label information 250 are obtained for the block image 210. Similarly, block label image 231 and block label information 251 are obtained for block image 211, and block label image 241 and block label information 261 are obtained for block image 221, respectively.

続いて、詳細は後述するが、ブロックラベル画像とブロックラベル情報を統合するブロックラベル統合処理を行う。図3の例においては、ブロックラベル画像230、231、234、235が統合されてブロックラベル画像270が、ブロックラベル画像232、233、236、237が統合されてブロックラベル画像271がそれぞれ得られる。また、ブロックラベル画像238と239が統合されてブロックラベル画像272が、ブロックラベル画像240と241が統合されてブロックラベル画像273が得られる。その際、ブロックラベル画像270、271、272、273にそれぞれ対応するブロックラベル情報280、281、282、283が作成される。   Subsequently, although details will be described later, block label integration processing for integrating the block label image and the block label information is performed. In the example of FIG. 3, block label images 230, 231, 234, and 235 are integrated to obtain a block label image 270, and block label images 232, 233, 236, and 237 are integrated to obtain a block label image 271. Further, the block label images 238 and 239 are integrated to obtain a block label image 272, and the block label images 240 and 241 are integrated to obtain a block label image 273. At that time, block label information 280, 281 282, and 283 corresponding to the block label images 270, 271, 272, and 273 are created.

さらに、ブロックラベル画像270-273が統合されて入力画像200に対するラベル画像290が得られ、処理は終了する。なお、最終的なラベル画像290に対してブロックラベル情報を生成する必要はない。ブロックラベル情報は、ラベリング処理の中間状態であるブロックラベル画像に関する情報であり、最終的なラベル画像290には不要である。   Further, the block label images 270-273 are integrated to obtain a label image 290 for the input image 200, and the process ends. It is not necessary to generate block label information for the final label image 290. The block label information is information related to the block label image that is an intermediate state of the labeling process, and is not necessary for the final label image 290.

●ブロックラベル付与処理
ブロックラベル付与処理は、入力画像から分割されたブロック画像にラベルを付与する処理である。図4によりブロックラベル付与処理の詳細を説明する。
Block label assignment process The block label assignment process is a process for assigning a label to a block image divided from an input image. The details of the block labeling process will be described with reference to FIG.

図4(a)はブロック画像にラベルを付与した例を示す。なお、図4(a)は8×8画素のブロック画像例を示している。ブロック画像において、黒ベタまたは斜線を施した画素はオン画素であり、それぞれラベル1からラベル3(矩形内の数字)が付与されている。このラベル付与は、公知の方法で行えばよいが、以下では2パスラベリング法で行うとして説明する。   FIG. 4 (a) shows an example in which a label is added to a block image. FIG. 4 (a) shows an example of a block image of 8 × 8 pixels. In the block image, pixels with black solid lines or diagonal lines are on-pixels, and labels 1 to 3 (numbers in a rectangle) are assigned respectively. This labeling may be performed by a known method, but in the following, it will be described as being performed by a two-pass labeling method.

ブロック画像700が入力画像の一部であることを考慮すると、ラベル1からラベル3には以下のような特徴がある。
ラベル1:ブロック画像の上端に付与画素があり、ブロック画像の上端に接続する他のブロック画像がある場合、当該ブロック画像のラベルと隣接し、統合される可能性がある。
ラベル2:ブロック画像の端に付与画素がなく、他のブロック画像のラベルと統合する必要がない。
ラベル3:ブロック画像の右端と下端に付与画素があり、ブロック画像の右端、下端に接続する他のブロック画像がある場合、それらブロック画像のラベルと隣接し、統合される可能性がある。
Considering that the block image 700 is a part of the input image, the labels 1 to 3 have the following characteristics.
Label 1: When there is a given pixel at the upper end of the block image and there is another block image connected to the upper end of the block image, there is a possibility that it is adjacent to the label of the block image and integrated.
Label 2: There is no added pixel at the edge of the block image, and there is no need to integrate with the label of another block image.
Label 3: If there are added pixels at the right end and bottom end of the block image and there are other block images connected to the right end and bottom end of the block image, they are adjacent to the label of the block image and may be integrated.

言い換えると、図4(a)に示すブロック画像の場合、ラベル2に属す画素の集合(ラベル2をもつ領域の形状)は、他のブロック画像を参照せずに図4(a)に示すブロック画像だけで確定することができる。一方、ラベル1および3は他のブロック画像における他のラベルと隣接する可能性があり、ラベル1および3に属す画素の集合は図4(a)に示すブロック画像だけでは確定することができない。   In other words, in the case of the block image shown in FIG. 4 (a), the set of pixels belonging to label 2 (the shape of the region having label 2) does not refer to other block images, and the block shown in FIG. 4 (a) It can be confirmed only by the image. On the other hand, labels 1 and 3 may be adjacent to other labels in other block images, and a set of pixels belonging to labels 1 and 3 cannot be determined only by the block image shown in FIG. 4 (a).

以後、説明の簡単化のため、ラベル2のように、そのブロックラベル画像単体で確定することができるラベルを「確定ラベル」と呼び、他のブロックラベル画像と統合しないと確定することができないラベル1や3のようなラベルを「未確定ラベル」と呼ぶ。   In the following, for simplicity of explanation, a label that can be confirmed with the block label image alone, such as label 2, will be referred to as a “determined label”, and a label that cannot be confirmed without integration with other block label images. Labels such as 1 and 3 are called “indeterminate labels”.

実施例のラベリング法においては、ブロック画像の外周のどこに未確定ラベルが出現するかを管理する。具体的には、各未確定ラベルについて、当該ラベルに属する画素がブロック画像の外周の四端の何れかに存在するか否かを管理する。例えばブロック画像の右端に付与画素が存在する未確定ラベルは、そのブロックラベル画像と、その右側に位置するブロックラベル画像との統合時にラベル統合の判定対象になる。   In the labeling method of the embodiment, it is managed where the undetermined label appears on the outer periphery of the block image. Specifically, for each unconfirmed label, it is managed whether or not the pixels belonging to the label are present at any of the four outer edges of the block image. For example, an undetermined label having a given pixel at the right end of a block image becomes a label integration determination target when the block label image and a block label image located on the right side thereof are integrated.

この処理を実現するには、各未確定ラベルについて四端の何れかに当該ラベルが付与された画素が存在するか否かを示す情報があればよい。従って、未確定ラベルごとに、各端について1ビットの情報があればよく、四端分の4ビットの情報があればよい。以下、未確定ラベルそれぞれもつこの4ビットの情報を「外接情報」と呼ぶ。   In order to realize this processing, it is only necessary to have information indicating whether or not there is a pixel to which the label is attached at any of the four ends of each unconfirmed label. Therefore, for each unconfirmed label, 1-bit information is required for each end, and 4-bit information for four ends is sufficient. Hereinafter, this 4-bit information having each unconfirmed label is referred to as “external information”.

ここで、未確定ラベルの数について説明する。図4(b)(c)のブロック画像例は、未確定ラベルの数が最大になる場合を示し、図4(b)はブロック画像の幅と高さが偶数の例を、図4(c)はブロック画像の幅と高さが奇数の例を示す。   Here, the number of unconfirmed labels will be described. The block image examples in FIGS. 4 (b) and (c) show the case where the number of unconfirmed labels is maximized, and FIG. 4 (b) shows an example in which the width and height of the block image are even numbers. ) Shows an example in which the block image has an odd width and height.

図4(b)(c)において、黒ベタ矩形はオン画素を、白抜き矩形はオフ画素を表し、斜線を施した領域はブロック画像の非外周領域を示す。非外周領域に属する画素は次の何れかである。
・オフ画素、
・確定ラベルに属する画素、
・外周のオン画素と同じラベルが付与された画素。
4B and 4C, a black solid rectangle represents an on pixel, a white rectangle represents an off pixel, and a hatched area represents a non-peripheral area of the block image. The pixels belonging to the non-peripheral area are any of the following.
・ Off pixel,
・ Pixels belonging to fixed labels,
・ Pixels with the same label as the outer on-pixel.

従って、非外周領域の画素の状態により未確定ラベルが増えることはなく、ブロック画像の外周領域に位置するオン画素すべてに異なるラベルが付与されている場合、そのブロック画像における未確定ラベルの数が最大になる。   Therefore, the number of uncertain labels in the block image does not increase depending on the state of the pixels in the non-peripheral area, and when different labels are assigned to all the on pixels located in the outer peripheral area of the block image, Become the maximum.

ラベリング処理の中間状態で出現するラベルの数は式(1)と同様に下式で表される。
Lbmax = ceil(Bw/2)×ceil(Bh/2) …(4)
ここで、Lbmaxはブロック画像に出現するラベルの最大数、
Bwはブロック画像の幅、
Bhはブロック画像の高さ。
The number of labels that appear in the intermediate state of the labeling process is expressed by the following equation, as in equation (1).
Lb max = ceil (Bw / 2) × ceil (Bh / 2)… (4)
Where Lb max is the maximum number of labels that appear in the block image,
Bw is the width of the block image,
Bh is the height of the block image.

また、式(2)と同様にLbmaxの表現に必要なビット長さLbは下式で表される。
Lb = ceil{log2(Lbmax+1)} …(5)
Similarly to the equation (2), the bit length Lb necessary for expressing Lb max is expressed by the following equation.
Lb = ceil {log 2 (Lb max +1)}… (5)

ここで、ブロック画像にラベルを付与した後の未確定ラベルの数を考える。まず、図4(c)の奇数×奇数ブロック画像の例において、未確定ラベルの最大数Lbumaxは下式で表される。
if (Bw = 2N+1 and Bh = 2N+1)
Lbumax = Np/2 = Bw + Bh; …(6)
ここで、Nは自然数、
Npは外周画素の数。
Here, the number of undetermined labels after labeling the block image is considered. First, in the example of the odd number × odd number block image of FIG. 4C, the maximum number Lbu max of unconfirmed labels is expressed by the following equation.
if (Bw = 2N + 1 and Bh = 2N + 1)
Lbu max = Np / 2 = Bw + Bh;… (6)
Where N is a natural number,
Np is the number of peripheral pixels.

一方、図4(b)に示す偶数×偶数ブロック画像の場合、図4(c)のようにオン画素とオフ画素を綺麗に配置することはできず、未確定ラベルの最大数Lbumaxは下式で表される。
if (Bw = 2N or Bh = 2N)
Lbumax < Np/2 = Bw + Bh; …(7)
On the other hand, in the case of the even number × even block image shown in FIG. 4 (b), the ON pixel and the OFF pixel cannot be neatly arranged as shown in FIG. 4 (c), and the maximum number Lbu max of undefined labels is lower. It is expressed by an expression.
if (Bw = 2N or Bh = 2N)
Lbu max <Np / 2 = Bw + Bh;… (7)

式(6)(7)から下式が得られる。
Lbumax ≦ Bw + Bh …(8)
From the equations (6) and (7), the following equations are obtained.
Lbu max ≤ Bw + Bh… (8)

[画像処理部]
図5のブロック図によりブロックラベル付与処理を行う画像処理部109の構成例を説明する。
[Image processing unit]
A configuration example of the image processing unit 109 that performs the block labeling process will be described with reference to the block diagram of FIG.

制御部801は、ブロック処理部802および統合処理部804を制御するとともに、RAM106からメモリ803へのデータ読込、メモリ803からRAM106へのデータ書出を制御する。   The control unit 801 controls the block processing unit 802 and the integration processing unit 804, and controls data reading from the RAM 106 to the memory 803 and data writing from the memory 803 to the RAM 106.

メモリ803は、ブロック処理部802のワークメモリとして機能し、また、ブロック処理部802の処理結果が格納される。好ましくは、メモリ803は、SRAMなどの低遅延のメモリで構成される。また、制御部801の制御により、RAM106から読み出されたデータがメモリ803に書き込まれたり、RAM106に転送するためにメモリ803から処理結果のデータが読み出されたりする。   The memory 803 functions as a work memory for the block processing unit 802, and stores the processing result of the block processing unit 802. Preferably, the memory 803 is configured by a low delay memory such as an SRAM. In addition, under the control of the control unit 801, data read from the RAM 106 is written into the memory 803, or processing result data is read from the memory 803 for transfer to the RAM 106.

統合処理部804は、制御部801の制御に従い、メモリ803を参照、更新しながらブロック統合処理を実行する。ブロック統合処理において、RAM106から必要なデータが読み込まれ、処理結果はRAM106へ送信される。   The integration processing unit 804 executes block integration processing while referring to and updating the memory 803 under the control of the control unit 801. In the block integration process, necessary data is read from the RAM 106 and the processing result is transmitted to the RAM 106.

図5に示す例において、ブロック処理部802、メモリ803、統合処理部804はシステムバス110と直結されず、これらの処理部はRAM106との間で直接データの送受を行うことができない。しかし、これら処理部とRAM106の間で直接データの送受を可能にする変形は、当業者にとって容易であり、そのような構成も本実施例の一部である。   In the example shown in FIG. 5, the block processing unit 802, the memory 803, and the integration processing unit 804 are not directly connected to the system bus 110, and these processing units cannot directly send and receive data to and from the RAM. However, it is easy for those skilled in the art to modify the processing unit and the RAM 106 to directly send and receive data, and such a configuration is also a part of this embodiment.

ブロック処理部802は、制御部801の指示に従い、メモリ803を参照、更新しながらブロックラベリング処理を行う。ブロック処理部802のブロックラベリング処理により生成されるデータは、メモリ803に一旦格納された後、制御部801の制御によりRAM106へ転送される。   The block processing unit 802 performs block labeling processing while referring to and updating the memory 803 in accordance with an instruction from the control unit 801. Data generated by the block labeling process of the block processing unit 802 is temporarily stored in the memory 803 and then transferred to the RAM 106 under the control of the control unit 801.

仮に、2パスラベリング法を同様な構成で実現する場合、一次ラベルの接続情報はメモリ803に保存されるか、RAM106に保存されることになる。前者の場合、式(3)に示したように、画像サイズに応じたメモリ量が必要になり、画像の高解像度化に伴い必要なメモリ量が増大し、回路規模の増大やそれに伴う装置の高価格化を招く。一方、後者の場合、一次ラベルの接続情報はRAM106に保存されるので、回路規模の増加と装置の高価格化を抑制することができる。   If the two-pass labeling method is realized with the same configuration, the primary label connection information is stored in the memory 803 or the RAM 106. In the former case, as shown in Equation (3), a memory amount corresponding to the image size is required, and the required memory amount increases as the resolution of the image increases. Incurs higher prices. On the other hand, in the latter case, since the primary label connection information is stored in the RAM 106, an increase in circuit scale and an increase in the cost of the apparatus can be suppressed.

しかし、2パスラベリング法においては、2パス目の処理前にラベル統合処理を行い、一次ラベルの接続情報に対するランダムアクセス、つまり、画像処理部109によるRAM106のランダムアクセスが生じる。ランダムアクセスのため、画像処理部109とRAM106の間で高効率のデータ転送(例えばデータのプリフェッチ)を行うことは困難である。これを緩和するために、画像処理部109にキャッシュ機構を設けることも考えられるが、ランダムアクセスであるためキャッシュ機構の効果が充分に得られない可能性が高い。   However, in the two-pass labeling method, label integration processing is performed before the second pass processing, and random access to primary label connection information, that is, random access to the RAM 106 by the image processing unit 109 occurs. Because of random access, it is difficult to perform highly efficient data transfer (for example, prefetching of data) between the image processing unit 109 and the RAM 106. In order to alleviate this, it is conceivable to provide a cache mechanism in the image processing unit 109. However, since it is random access, there is a high possibility that the effect of the cache mechanism cannot be sufficiently obtained.

これに対して、本実施例のラベリング法においては、画像をブロック単位に処理するため、メモリ803に必要なメモリ量を2パスラベリング法に比べて小さくすることができる。例えば、1920×1080画素のフルHD画像を処理する場合、本実施例のブロックラベル付与処理に必要なメモリ量は次のとおりである。なお、本実施例のブロックラベル付与処理は、ブロックサイズによって必要なメモリ量が変化する。下記の計算例はブロックサイズを16×16画素として例である。   On the other hand, in the labeling method of the present embodiment, since the image is processed in units of blocks, the amount of memory required for the memory 803 can be reduced as compared with the two-pass labeling method. For example, when processing a 1920 × 1080 pixel full HD image, the amount of memory required for the block label assignment processing of this embodiment is as follows. In the block label assigning process of the present embodiment, the required memory amount varies depending on the block size. The following calculation example is an example where the block size is 16 × 16 pixels.

●2パスラベリング法と実施例で共通に必要なメモリ量
ラベル画像メモリとして1920×1080/4×32ビット≒15.8Mビット。なお、式(2)に示すように、フルHD画像の場合、Lmaxを表現するために必要なビット長Lは19ビットだが、メモリアクセスを考慮して32ビットに切り上げて計算した。
● Memory required for both the 2-pass labeling method and the examples 1920 × 1080/4 × 32 bits ≒ 15.8 Mbits as label image memory. As shown in Equation (2), in the case of a full HD image, the bit length L required to express Lmax is 19 bits, but it is calculated by rounding up to 32 bits in consideration of memory access.

●2パスラベリング法に必要なメモリ量
近傍画素の調査用に1ライン遅延するためのラインバッファとして1920×1×19ビット≒35.6Kビット。さらに、一次ラベルの接続情報用に1920×1080/4×19ビット≒9.39Mビット(式(3)参照)。
● Memory required for the 2-pass labeling method 1920 × 1 × 19 bits ≒ 35.6K bits as a line buffer to delay one line for the investigation of neighboring pixels. Furthermore, 1920 × 1080/4 × 19 bits≈9.39 Mbits for primary label connection information (see Equation (3)).

●実施例のブロックラベル付与処理に必要なメモリ量
ラインバッファとして16×1×7ビット=112ビット。なお、近傍画素の調査に1ライン遅延するが遅延量はブロックサイズでよく、ブロック画像中に出現するラベルの最大数は式(4)によりLmax=16×16/4=64、Lmaxを表現するために必要なビット長は式(5)によりL=7ビットである。
● Amount of memory required for block label assignment processing of the embodiment 16 × 1 × 7 bits = 112 bits as a line buffer. In addition, although it is delayed by one line for the investigation of neighboring pixels, the delay amount may be the block size, and the maximum number of labels appearing in the block image is expressed as Lmax = 16 × 16/4 = 64, Lmax according to Equation (4) The bit length required for this is L = 7 bits according to equation (5).

さらに、ブロックラベル情報用に16×16/4×(7+4)=704ビット。なお、メモリ803に格納され、ブロック処理部802が参照するデータ量である。Lmax=16×16/4=64、L=7ビット、さらに外接情報のためのラベルごとの4ビットの総和である。   In addition, 16 × 16/4 × (7 + 4) = 704 bits for block label information. The amount of data stored in the memory 803 and referred to by the block processing unit 802. Lmax = 16 × 16/4 = 64, L = 7 bits, and a total of 4 bits for each label for circumscribed information.

なお、上記のメモリ量は、ブロックラベル付与処理のために画像を二回参照する際、RAM106から画像を読み込むことを想定する。しかし、RAM106から読み込んだブロック画像のデータをメモリ803に保持してもよい。その場合、メモリ803に、さらに16×16×7ビット=1.75Kビット程度のメモリ量が必要になるが、RAM106と画像処理部109の間のデータ転送量を削減することができる。   It is assumed that the above memory amount reads an image from the RAM 106 when referring to the image twice for the block labeling process. However, block image data read from the RAM 106 may be held in the memory 803. In this case, the memory 803 requires a memory amount of about 16 × 16 × 7 bits = 1.75 Kbits, but the data transfer amount between the RAM 106 and the image processing unit 109 can be reduced.

●ブロックラベル付与処理
ブロック処理部802は、基本的に2パスラベリング法を用いてブロックラベル付与処理を行うが、本実施例においては、さらに外接情報の処理が加わる。以下の説明では、主に2パスラベリング法と異なる部分を説明し、2パスラベリング法と同じ部分は説明を省略する場合がある。
Block label assignment processing The block processing unit 802 basically performs block label assignment processing using a two-pass labeling method, but in this embodiment, processing of circumscribed information is further added. In the following description, portions different from the two-pass labeling method will be mainly described, and the same portions as the two-pass labeling method may be omitted.

図6により注目画素と近傍画素の関係例(連結条件判定ウィンドウの一例)を示す。非特許文献1によれば、図6における注目画素Pと近傍画素X、Y、Z、Uの関係から次の処理手順により一次ラベルを付与する。
LRAM(・) = 0;
LC = 初期値;
while (注目画素Pが存在) {
V = max(LX, LU);
Z* = LRAM(LZ);
if (P = 0)
LZ = Z*; …(9a)
else {
if (Y ≠ 0) {
LP = LY
LZ = Z*; …(9b)
} else {
if (Z = 0 and V= 0) {
LP = LC;
LZ = 0;
LRAM(LC) = LC;
LC++; …(9c)
}
if (Z = 0 and V ≠ 0) {
LP = V;
LZ = 0; …(9d)
}
if (Z ≠ 0 and V ≠ 0 and Z* > V) {
LP = V;
LRAM(Z*) = V;
LZ = V; …(9e)
}
if (Z ≠ 0 and V ≠ 0 and Z* < V) {
LP = Z*;
LRAM(V) = Z*;
LZ = Z*; …(9f)
}
if (Z ≠ 0 and V ≠ 0 and Z* = V) {
LP = V;
LZ = Z*; …(9g)
}
if (Z ≠ 0 and V = 0) {
LP = Z*;
LZ = Z*; …(9h)
}
}
}
} …(9)
ここで、LRAM(・)はラベル間の結合情報を示すテーブル(一次元配列)、
LCはラベルの識別子、
値1はオン画素、値0はオフ画素を表す、
max()は大きい値をとる関数、
Lxは画素xに付与されたラベルの識別子。
FIG. 6 shows a relationship example between the target pixel and neighboring pixels (an example of a connection condition determination window). According to Non-Patent Document 1, a primary label is assigned by the following processing procedure from the relationship between the target pixel P and the neighboring pixels X, Y, Z, and U in FIG.
LRAM (•) = 0;
LC = initial value;
while (attention pixel P exists) {
V = max (L X , L U );
Z * = LRAM (L Z );
if (P = 0)
L Z = Z * ;… (9a)
else {
if (Y ≠ 0) {
L P = L Y ;
L Z = Z * ;… (9b)
} else {
if (Z = 0 and V = 0) {
L P = LC;
L Z = 0;
LRAM (LC) = LC;
LC ++;… (9c)
}
if (Z = 0 and V ≠ 0) {
L P = V;
L Z = 0;… (9d)
}
if (Z ≠ 0 and V ≠ 0 and Z *> V) {
L P = V;
LRAM (Z *) = V;
L Z = V;… (9e)
}
if (Z ≠ 0 and V ≠ 0 and Z * <V) {
L P = Z *;
LRAM (V) = Z *;
L Z = Z * ;… (9f)
}
if (Z ≠ 0 and V ≠ 0 and Z * = V) {
L P = V;
L Z = Z * ;… (9g)
}
if (Z ≠ 0 and V = 0) {
L P = Z *;
L Z = Z * ;… (9h)
}
}
}
}… (9)
Here, LRAM (•) is a table (one-dimensional array) that shows the binding information between labels,
LC is the label identifier,
Value 1 represents on pixel, value 0 represents off pixel,
max () is a function that takes a large value,
L x is an identifier of a label given to the pixel x.

以下では、ラベルの識別子に、数字やアルファベットのような一連の記号を割り当てる例を説明するため、ラベルの識別子を「ラベル番号」と呼ぶことにする。   In the following, in order to describe an example in which a series of symbols such as numbers and alphabets are assigned to the label identifier, the label identifier will be referred to as a “label number”.

図7により処理対象の二値画像のブロック画像例とブロックラベル付与処理の結果例を示す。図7において黒画素はオン画素(値1)、白画素はオフ画素(値0)を表し、オン画素中の数字は当該画素に付与された一次ラベルを表す。実施例のブロックラベル付与処理は、2パスラベリング法と同様に、ブロック画像の左上の画素からラスタ順に処理を行う。なお、処理に先立ち、一次ラベルの接続関係を表すテーブルLRAM(・)と、外接情報を表すテーブルはすべてゼロに初期化する。   FIG. 7 shows a block image example of the binary image to be processed and a result example of the block label assigning process. In FIG. 7, a black pixel represents an on pixel (value 1), a white pixel represents an off pixel (value 0), and a number in the on pixel represents a primary label attached to the pixel. In the block label assignment process of the embodiment, the process is performed in raster order from the upper left pixel of the block image, as in the two-pass labeling method. Prior to processing, the table LRAM (•) representing the primary label connection relation and the table representing the circumscribing information are all initialized to zero.

図8により一次ラベルの接続関係を示す接続関係テーブルと接続情報テーブルの一例を示す。図8においてインデックスはラベル番号に対応する。また、図9により接続関係テーブルと接続情報テーブルの変遷の一例を示す。   FIG. 8 shows an example of a connection relationship table and a connection information table showing the connection relationship of primary labels. In FIG. 8, the index corresponds to the label number. FIG. 9 shows an example of the transition of the connection relation table and the connection information table.

図7に示すブロック画像をラスタ順に走査した場合、最初に出現する値1の注目画素Pは画素1001である。値1の注目画素1001の隣接画素X、Y、Z、Uはすべて値0であるから、上記処理手順の(9c)において、LCの初期値(例えばラベル1)が画素1001に付与される。   When the block image shown in FIG. 7 is scanned in raster order, the target pixel P of value 1 that appears first is the pixel 1001. Since the adjacent pixels X, Y, Z, and U of the target pixel 1001 having a value 1 are all 0, the initial value of LC (for example, label 1) is assigned to the pixel 1001 in (9c) of the above processing procedure.

画素1001に対するラベルの付与に応じて、接続関係テーブルと接続情報テーブルは図9(a)に示すように更新される。つまり、ラベル1に対応する接続関係として「1」が記録され、画素1001がブロック画像の上端に位置するからラベル1に対応する上端ビットに‘1’がセットされる。なお、以下では、図8、9に示す接続情報テーブルの左から右に上端ビット、右端ビット、下端ビット、左端ビットが並ぶとして説明を行うが、この並びは任意である。   In accordance with the labeling for the pixel 1001, the connection relation table and the connection information table are updated as shown in FIG. 9 (a). That is, “1” is recorded as the connection relation corresponding to the label 1, and the pixel 1001 is positioned at the upper end of the block image, so “1” is set to the upper end bit corresponding to the label 1. In the following description, it is assumed that the upper bit, the right bit, the lower bit, and the left bit are arranged from left to right in the connection information tables shown in FIGS. 8 and 9, but this arrangement is arbitrary.

以下、図7に示す全画素について説明を行うことは冗長であるから、処理のポイントである画素1002-1012が注目画素Pの場合の処理を説明する。   Hereinafter, since it is redundant to describe all the pixels shown in FIG. 7, the processing when the pixel 1002-1012 that is the point of processing is the target pixel P will be described.

画素1002、1003、1004、1005には、上記処理手順の(9c)において、それぞれラベル2、3、4、5が付与される。その際、接続関係テーブルは図9(b)、図9(c)、図9(d)、図9(e)に示すように更新される。なお、これら画素1002-1005はブロック画像の端部に位置しないので接続情報テーブルは更新されない。   Labels 2, 3, 4, and 5 are assigned to the pixels 1002, 1003, 1004, and 1005, respectively, in (9c) of the above processing procedure. At that time, the connection relationship table is updated as shown in FIGS. 9B, 9C, 9D, and 9E. Since these pixels 1002-1005 are not located at the end of the block image, the connection information table is not updated.

画素1006が注目画素Pになると、左上画素にはラベル2が付与され、右上画素にはラベル1が付与されている。この場合、V=2、Z*=1、Y=0、Z≠0、Z*<Vだから処理手順501の(9f)において、画素1006にラベル1が付与される。さらに、図9(f)に示すように、接続情報テーブルのLRAM(V=2)に対応する接続情報の値がZ*の値1に更新される。つまり、ラベル2の合流先としてラベル1が設定される。   When the pixel 1006 becomes the target pixel P, the label 2 is assigned to the upper left pixel, and the label 1 is assigned to the upper right pixel. In this case, since V = 2, Z * = 1, Y = 0, Z ≠ 0, and Z * <V, label 1 is assigned to the pixel 1006 in (9f) of the processing procedure 501. Furthermore, as shown in FIG. 9 (f), the value of the connection information corresponding to LRAM (V = 2) in the connection information table is updated to the value 1 of Z *. That is, label 1 is set as the destination of label 2.

次に、画素1007が注目画素Pになると、この場合も二つのラベルが合流する。なお、図7には、画素1007の左上画素にラベル4が付与され、右上画素にラベル1が付与された状態を示しているが、これはブロックラベル付与処理の結果を表し、画素1007の処理時点では、画素1007の右上画素にはラベル2が設定されている。言い換えれば、画素1007の右上画素は、画素1006の処理前に処理されるため、さらにその右上の画素に付与されたラベル2を引き継いだ状態になっている。   Next, when the pixel 1007 becomes the target pixel P, in this case also, the two labels merge. Note that FIG. 7 shows a state in which the label 4 is assigned to the upper left pixel of the pixel 1007 and the label 1 is assigned to the upper right pixel. This represents the result of the block label assignment process, and the process of the pixel 1007 At the time, the label 2 is set to the upper right pixel of the pixel 1007. In other words, since the upper right pixel of the pixel 1007 is processed before the processing of the pixel 1006, the label 2 attached to the upper right pixel is still taken over.

つまり、画素1007が注目画素Pになると、左上画素にはラベル4が付与され、右上画素にはラベル2が付与されている。この場合、V=4、Z*=1、Y=0、Z≠0、Z*<Vだから上記処理手順の(9f)において、画素1006にラベル1が付与される。さらに、図9(g)に示すように、接続関係テーブルのLRAM(V=4)に対応する接続情報の値がZ*の値1に更新される。つまり、ラベル4の合流先としてラベル1が設定される。なお、画素1007が注目画素Pになった場合のZ*の値は、この場合、LZ=2、LRAM(LZ=2)から「1」になる。 That is, when the pixel 1007 becomes the target pixel P, the label 4 is assigned to the upper left pixel, and the label 2 is assigned to the upper right pixel. In this case, since V = 4, Z * = 1, Y = 0, Z ≠ 0, and Z * <V, label 1 is assigned to the pixel 1006 in (9f) of the above processing procedure. Further, as shown in FIG. 9 (g), the value of the connection information corresponding to LRAM (V = 4) in the connection relation table is updated to the value 1 of Z *. In other words, label 1 is set as the merging destination of label 4. In this case, the value of Z * when the pixel 1007 becomes the target pixel P is “1” from L Z = 2 and LRAM (L Z = 2).

画素1008が注目画素Pになると、隣接画素X、Y、Z、Uはすべて値0であるから、上記処理手順の(9c)において、LCの値(この場合はラベル6)が画素1008に付与される。さらに、画素1008はブロック画像の右端に位置するから、図9(h)に示すように、ラベル6に対応する接続情報テーブルの右端ビットに‘1’が設定される。   When the pixel 1008 becomes the target pixel P, the adjacent pixels X, Y, Z, and U all have a value of 0. Therefore, in (9c) of the above processing procedure, the LC value (in this case, label 6) is assigned to the pixel 1008. Is done. Further, since the pixel 1008 is located at the right end of the block image, “1” is set in the right end bit of the connection information table corresponding to the label 6 as shown in FIG.

画素1009が注目画素Pになると、V=0、Z*=6、Y=0、Z≠0、Z*>Vだから上記処理手順の(9h)において、画素1009にラベル6が付与される。ただし、画素1009のラベルは、画素1012の処理によってラベル1に更新され、図7は更新後の状態を示している。また、図9(i)に示すように、画素1009の処理により接続情報テーブルは更新されず、図9(h)と同じ状態である。   When the pixel 1009 becomes the target pixel P, since V = 0, Z * = 6, Y = 0, Z ≠ 0, and Z *> V, the label 6 is assigned to the pixel 1009 in (9h) of the above processing procedure. However, the label of the pixel 1009 is updated to the label 1 by the processing of the pixel 1012, and FIG. 7 shows the state after the update. Further, as shown in FIG. 9 (i), the connection information table is not updated by the processing of the pixel 1009, and is in the same state as FIG. 9 (h).

画素1010が注目画素Pになると、V=5、Z*=0、Y=0、Z=0、Z*<Vだから上記処理手順の(9d)において、画素1010にラベル5が付与される。さらに、画素1010はブロック画像の下端に位置するから、図9(j)に示すように、ラベル5に対応する下端ビットに‘1’が設定される   When the pixel 1010 becomes the target pixel P, since V = 5, Z * = 0, Y = 0, Z = 0, and Z * <V, the label 5 is assigned to the pixel 1010 in (9d) of the above processing procedure. Further, since the pixel 1010 is located at the lower end of the block image, ‘1’ is set to the lower end bit corresponding to the label 5 as shown in FIG.

画素1011が注目画素Pになると、V=1、Z*=0、Y=0、Z=0、Z*<Vだから上記処理手順の(9d)において、画素1011にラベル1が付与される。さらに、画素1011はブロック画像の下端に位置するから、図9(k)に示すように、ラベル1に対応する下端ビットに‘1’が設定される   When the pixel 1011 becomes the target pixel P, since V = 1, Z * = 0, Y = 0, Z = 0, and Z * <V, the label 10 is assigned to the pixel 1011 in (9d) of the above processing procedure. Further, since the pixel 1011 is located at the lower end of the block image, ‘1’ is set to the lower end bit corresponding to the label 1 as shown in FIG. 9 (k).

画素1012が注目画素Pになると、画素1012の右上画素1009にはラベル6が付与され、画素1012の左側画素にはラベル1が付与されている。この場合、V=1、Z*=6、Y=0、Z≠0、Z*>Vだから上記処理手順の(9e)において、画素1012にラベル1が付与される。さらに、図9(l)に示すように、接続関係テーブルのLRAM(Z*=6)に対応する接続情報の値がVの値1に更新される。つまり、ラベル6の合流先としてラベル1が設定される。   When the pixel 1012 becomes the target pixel P, the label 6 is assigned to the upper right pixel 1009 of the pixel 1012, and the label 1 is assigned to the left pixel of the pixel 1012. In this case, since V = 1, Z * = 6, Y = 0, Z ≠ 0, and Z *> V, label 1 is assigned to the pixel 1012 in (9e) of the above processing procedure. Further, as shown in FIG. 9 (l), the value of the connection information corresponding to LRAM (Z * = 6) in the connection relation table is updated to the value 1 of V. In other words, label 1 is set as the joining destination of label 6.

こうして作成された一次ラベルの接続関係テーブルは、インデックス値がiである場合に「ラベルiはラベルjと同じラベルである(連結している)」旨を表し、i≧jの関係がなり立つ。従って、接続関係テーブルを参照して昇順にラベル番号の再割当を行うことができる。   When the index value is i, the primary label connection relationship table created in this way indicates that “label i is the same label as label j (connected)”, and the relationship of i ≧ j holds. . Therefore, the label numbers can be reassigned in ascending order with reference to the connection relation table.

●接続情報と外接情報の統合
外接情報テーブルの統合は、連結するラベルの上右下左端ビットのビット論理和(ビットOR)を取ることで実現される。図10のフローチャートにより接続情報と外接情報の統合を説明する。なお、図10に示す処理はブロック処理部802によって実行される。
● Integration of connection information and circumscribing information Integration of the circumscribing information table is realized by taking the bit OR (bit OR) of the upper right, lower, left and right bits of the linked labels. The integration of connection information and circumscribing information will be described with reference to the flowchart of FIG. The process shown in FIG. 10 is executed by the block processing unit 802.

図10において、Label[]は、接続関係テーブルに対応する配列であり、上記LRAM(・)に相当する。Connect[]は、外接情報テーブルに対応する配列であり、Connect[i]は図8、図9に示す4ビットの情報に対応する。例えば、図9(l)の外接情報テーブルのラベル1に対応するビット情報はConnect[1]=‘1010’に相当する。また、maxLabelは、一次ラベルの作成において出現したラベルの最大数である。例えば、図9(l)の場合、maxLabel=6である。   In FIG. 10, Label [] is an array corresponding to the connection relationship table, and corresponds to the LRAM (•). Connect [] is an array corresponding to the circumscribed information table, and Connect [i] corresponds to 4-bit information shown in FIGS. For example, the bit information corresponding to label 1 of the circumscribed information table in FIG. 9 (l) corresponds to Connect [1] = ‘1010’. MaxLabel is the maximum number of labels that appear in the creation of the primary label. For example, in the case of FIG. 9 (l), maxLabel = 6.

ブロック処理部802は、ループカウンタを初期化(i=1)し(S1201)、カウント値iとmaxLabelの値を比較して(S1202)、カウント値iがmaxLabelを超える(i>maxLabel)と処理を終了する。また、カウント値iがmaxLabel以下(i≦maxLabl)の場合は処理を継続する。   The block processing unit 802 initializes the loop counter (i = 1) (S1201), compares the count value i with the value of maxLabel (S1202), and processes when the count value i exceeds maxLabel (i> maxLabel) Exit. If the count value i is equal to or less than maxLabel (i ≦ maxLabl), the processing is continued.

処理を継続する場合、ブロック処理部802は、Label[i]を変数jに代入し(S1203)、カウント値iと変数jの値が同値(i=j)か否かを判定する(S1204)。同値(i=j)の場合、ラベルiが生成された際の初期の値を接続情報が示しているので、カウント値iをインクリメントして(S1207)、処理をステップS1202に戻す。   When the processing is continued, the block processing unit 802 substitutes Label [i] for the variable j (S1203), and determines whether the count value i and the value of the variable j are the same value (i = j) (S1204). . In the case of the same value (i = j), since the connection information indicates the initial value when the label i is generated, the count value i is incremented (S1207), and the process returns to step S1202.

一方、カウント値iと変数jの値が異なる(i>j)場合はラベルiが他のラベルjに連結することを意味し、ブロック処理部802は、Label[i]にLabel[j]の値を代入する(S1205)。図9(l)のタイミングでは、ラベルjが連結するラベルは、さらに他のラベルに連結する可能性があるが、図10に示す処理はラベル1から昇順に実行されるので、ラベル1からラベルjに対するラベルの連結は完了している。従って、ステップS1205においては、単純に、ラベルiをラベルjまたはラベルjが連結するラベルに連結すればよい。   On the other hand, when the count value i and the value of the variable j are different (i> j), this means that the label i is connected to another label j, and the block processing unit 802 sets Label [j] to Label [j]. A value is substituted (S1205). At the timing shown in FIG. 9 (l), the label connected to label j may be further connected to another label, but the processing shown in FIG. 10 is executed in ascending order from label 1, so label 1 to label The label connection for j is complete. Therefore, in step S1205, label i may be simply connected to label j or a label connected to label j.

次に、ブロック処理部802は、ラベルLabel[i]に対応するConnect[Label[i]]を更新し(S1206)、カウント値iをインクリメントして(S1207)、処理をステップS1202に戻す。   Next, the block processing unit 802 updates Connect [Label [i]] corresponding to the label Label [i] (S1206), increments the count value i (S1207), and returns the process to step S1202.

ステップS1206において、ビット論理和により、ラベルiの連結先のラベルに対応するConnect[]に、ラベルiに対応するConnect[]が統合される。この処理により、図10に示す処理が終了した後、m=Label[m]であるラベルmのConnect[m]に、ラベルmが付与(または連結)された画素の外接情報が集約される。   In step S1206, Connect [] corresponding to label i is integrated with Connect [] corresponding to the label to which label i is linked by bit logical sum. With this process, after the process shown in FIG. 10 is completed, the circumscribing information of the pixels to which the label m is attached (or connected) to the Connect [m] of the label m where m = Label [m] is collected.

図11により処理後の接続関係テーブルと接続情報テーブルの一例を示す。図10に示す統合処理により、図11(a)に示すラベル1の上右下左端ビットは、ラベル1、2、4、6の上右下左端ビットがビット論理和された値になる。   FIG. 11 shows an example of the connection relation table and the connection information table after processing. By the integration process shown in FIG. 10, the upper right lower left bit of label 1 shown in FIG. 11A becomes a value obtained by bit ORing the upper right lower left bits of labels 1, 2, 4, and 6.

●確定ラベルと未確定ラベルの区分
図12のフローチャートによりラベルを確定ラベルと未確定ラベルに区分する処理を説明する。なお、図12に示す処理はブロック処理部802によって実行される。
Classification of Confirmed Label and Unconfirmed Label A process for classifying a label into a confirmed label and an unconfirmed label will be described with reference to the flowchart of FIG. The process shown in FIG. 12 is executed by the block processing unit 802.

ブロック処理部802は、変数L_label=1、変数G_label=Nに初期化し(S1301)、ループカウンタを初期化(k=1)する(S1302)。変数L_labelは未確定ラベルを更新するための変数であり、変数G_labelは確定ラベルを更新するための変数である。また、Nは画像ブロックのラベルの最大数であり、本実施例においてN=64である。   The block processing unit 802 initializes the variable L_label = 1 and the variable G_label = N (S1301), and initializes the loop counter (k = 1) (S1302). The variable L_label is a variable for updating the undetermined label, and the variable G_label is a variable for updating the confirmed label. N is the maximum number of labels of the image block, and N = 64 in this embodiment.

次に、ブロック処理部802は、カウント値kとmaxLabelの値を比較する(S1303)。ここで、maxLabelは、図10の処理と同様に、一次ラベルの作成において出現したラベルの最大数である。例えば、図9(l)の場合、maxLabel=6である。そして、カウント値kがmaxLabelを超える(k>maxLabel)の場合は処理を終了し、カウント値kがmaxLabel以下(k≦maxLabl)の場合は処理を継続する。   Next, the block processing unit 802 compares the count value k with the value of maxLabel (S1303). Here, maxLabel is the maximum number of labels that appear in the creation of the primary label, as in the processing of FIG. For example, in the case of FIG. 9 (l), maxLabel = 6. If the count value k exceeds maxLabel (k> maxLabel), the process is terminated, and if the count value k is less than or equal to maxLabel (k ≦ maxLabl), the process is continued.

処理を継続する場合、ブロック処理部802は、カウント値kとLabel[k]の値が同値(k=Label[k])か否かを判定する(S1304)。図10に示す統合処理の結果、最終的に連結すべきラベルの接続情報はk=Lable[k]を満たす。言い換えれば、ステップS1304の判定は、ラベルkが集約されたラベルか否かの判定であり、集約されたラベル(S1304の判定が真)であれば処理をステップS1305に進め、集約されたラベルではない場合は処理をステップS1310に進める。   When the processing is continued, the block processing unit 802 determines whether the count value k and the value of Label [k] are the same value (k = Label [k]) (S1304). As a result of the integration process shown in FIG. 10, the connection information of the labels to be finally connected satisfies k = Lable [k]. In other words, the determination in step S1304 is a determination of whether or not label k is an aggregated label. If the label is an aggregated label (determination in S1304 is true), the process proceeds to step S1305. If not, the process proceeds to step S1310.

ラベルkが集約されたラベルの場合、ブロック処理部802は、Connect[k]の値が0か否かを判定する(S1305)。Connect[k]=0の場合、ラベルkおよびラベルkに連結するラベルが付与された画素はブロック画像の外周部に存在せず、ラベルkは確定ラベルである。他方、Connect[k]≠0の場合、ラベルkまたはラベルkに連結するラベルが付与された画素はブロック画像の外周部に位置し、ラベルkは未確定ラベルである。確定ラベル(Connect[k]=0)の場合、処理はステップS1306に進む。また、未確定ラベル(Connect[k]≠0)の場合、処理はステップS1308に進む。   If the label k is an aggregated label, the block processing unit 802 determines whether the value of Connect [k] is 0 (S1305). When Connect [k] = 0, the label k and the pixel to which the label connected to the label k is attached do not exist in the outer periphery of the block image, and the label k is a confirmed label. On the other hand, when Connect [k] ≠ 0, the pixel to which the label k or the label connected to the label k is attached is located on the outer periphery of the block image, and the label k is an uncertain label. In the case of a confirmed label (Connect [k] = 0), the process proceeds to step S1306. If the label is unconfirmed (Connect [k] ≠ 0), the process proceeds to step S1308.

ラベルkが確定ラベルの場合、ブロック処理部802は、ラベルkに特殊なラベル番号を付与する。本実施例においては、画像ブロックで発生する可能性がある最大のラベル番号から降順にラベル番号を割り当てる。つまり、Label[k]=G_labelとし(S1306)、変数G_labelをデクリメントして(S1307)、確定ラベルにNから降順にラベル番号を割り当てる。この後、カウント値kをインクリメントし(S1311)、処理をステップS1303に戻す。   When the label k is a confirmed label, the block processing unit 802 gives a special label number to the label k. In this embodiment, label numbers are assigned in descending order from the largest label number that may occur in an image block. That is, Label [k] = G_label is set (S1306), the variable G_label is decremented (S1307), and the label numbers are assigned to the confirmed labels in descending order from N. Thereafter, the count value k is incremented (S1311), and the process returns to step S1303.

一方、ラベルkが未確定ラベルの場合、ブロック処理部802は、ラベルkに1から昇順にラベル番号を付与する。これは、これまでの処理により離散状態にあるラベル番号を連番にするための処理である。つまり、Label[k]=L_label変数とし(S1308)、変数L_labelをインクリメントして(S1309)、未確定ラベルに1から昇順にラベル番号を割り当てる。この後、カウント値kをインクリメントし(S1311)、処理をステップS1303に戻す。   On the other hand, when the label k is an undetermined label, the block processing unit 802 assigns label numbers to the label k in ascending order from 1. This is a process for serializing the label numbers in the discrete state by the processes so far. In other words, Label [k] = L_label variable is set (S1308), the variable L_label is incremented (S1309), and label numbers are assigned to undefined labels in ascending order from 1. Thereafter, the count value k is incremented (S1311), and the process returns to step S1303.

また、ラベルkが集約されたラベルではない場合、ラベルkは他のラベルLabel[k]に連結されている。Label[k]<kであり、ステップS1306またはS1308の処理により、連結先のラベルのラベル番号が更新されている可能性がある。そこで、ブロック処理部802は、Label[k]=Label[Label[k]]としてラベルkの値を更新し(S1310)、その後、カウント値kをインクリメントし(S1311)、処理をステップS1303に戻す。   When the label k is not an aggregated label, the label k is linked to another label Label [k]. There is a possibility that Label [k] <k, and that the label number of the concatenated label has been updated by the processing in step S1306 or S1308. Therefore, the block processing unit 802 updates the value of label k as Label [k] = Label [Label [k]] (S1310), then increments the count value k (S1311), and returns the process to step S1303. .

図12に示す区分処理により、図11(b)に示すように、未確定ラベルのラベル番号が整理され、確定ラベルにはNから降順にラベル番号が降順に付与される。   By the sorting process shown in FIG. 12, the label numbers of the unconfirmed labels are arranged as shown in FIG. 11 (b), and the label numbers are assigned to the confirmed labels in descending order from N.

図13によりブロックラベル付与処理の結果例を示す。図13は、図7に示す一次ラベルの付与結果を読み込み、図10と図11に示す処理によって接続情報テーブルを処理した結果を示す。このブロックラベル付与処理の結果はRAM106に格納されるが、その際、下記の二つの処理を行う。   FIG. 13 shows an example of the result of the block label assignment process. FIG. 13 shows the result of processing the connection information table by reading the primary label assignment result shown in FIG. 7 and performing the processes shown in FIGS. The result of the block label assigning process is stored in the RAM 106. At this time, the following two processes are performed.

第一の処理は、未確定ラベルの情報をRAM106に格納する処理である。未確定ラベルの情報は後のブロック統合処理で参照すべき情報、つまり、図2に示すブロックラベル情報である。ブロックラベル情報として必要な情報は、画像ブロック中の未確定ラベルを後に特定するための情報、および、各未確定ラベルに対する外接情報である。未確定ラベルのラベル番号は連番に整理されているから未確定ラベルの最大番号と、未確定ラベルの外接情報である。つまり、ブロック処理部802は、図13の例においては「2」と、ラベル1、2に対する外接情報(図11(b)のConnect[1]、Connect[5])をRAM106に格納する。   The first process is a process for storing the information on the undetermined label in the RAM 106. The information on the undetermined label is information to be referred to in later block integration processing, that is, the block label information shown in FIG. Information necessary as the block label information is information for specifying the uncertain label in the image block later, and circumscribing information for each uncertain label. Since the label numbers of unconfirmed labels are arranged in serial numbers, they are the maximum number of unconfirmed labels and circumscribing information of unconfirmed labels. That is, the block processing unit 802 stores “2” and circumscribing information for the labels 1 and 2 (Connect [1] and Connect [5] in FIG. 11B) in the RAM 106 in the example of FIG.

第二の処理は、確定ラベルのラベル番号を再割り当てする処理である。ブロックラベル付与処理において、画像ブロックで発生する可能性がある最大のラベル番号から降順にラベル番号を確定ラベルに割り当てた。しかし、当該ラベル番号が一意であるのは画像ブロック内だけであり、RAM106に格納する前に、入力画像全体で一意なラベル(以下、最終確定ラベル)を割り当てる。   The second process is a process of reassigning the label number of the confirmed label. In the block label assignment process, the label numbers are assigned to the confirmed labels in descending order from the largest label number that may occur in the image block. However, the label number is unique only in the image block, and before being stored in the RAM 106, a unique label (hereinafter referred to as final confirmed label) is assigned to the entire input image.

第二の処理は、ブロック処理部802により、最終確定ラベルを管理し、確定ラベルに最終確定ラベルを割り当てる。あるいは、CPU104が最終確定ラベルを管理し、制御部801からCPU104に最終確定ラベルの割り当てを要求し、返信されたラベルを確定ラベルに割り当てればよい。最終確定ラベルは、未確定ラベルとの識別が容易であればよく、例えば、画像全体で発生する可能性がある最大のラベル番号から降順に最終確定ラベルとして割り当てればよい。こうすれば、画像処理部109を複数設ける構成の場合も、矛盾することなく、一意の最終確定ラベルを割り当てることができる。   In the second process, the final defined label is managed by the block processing unit 802, and the final confirmed label is assigned to the confirmed label. Alternatively, the CPU 104 may manage the final confirmed label, request the CPU 104 to assign the final confirmed label from the control unit 801, and assign the returned label to the confirmed label. The final confirmed label only needs to be easily distinguished from the unconfirmed label. For example, the final confirmed label may be assigned as the final confirmed label in descending order from the largest label number that may occur in the entire image. In this way, even in the case of a configuration in which a plurality of image processing units 109 are provided, a unique final confirmation label can be assigned without any contradiction.

従って、ブロック処理部802はメモリ803に格納されたブロックラベル付与処理の結果(例えば図13)の確定ラベルを最終確定ラベルに変換し、制御部801は変換結果をRAM106に転送する。さらに、この例において、メモリ803は6ビット/画素で情報を格納する一方、RAM106は例えば32ビット/画素で情報を格納するので、ブロック処理部802または制御部801はビット長の変換を行う。また、ブロック処理部802は、制御部801の制御に従い、上記の変換処理を行いつつ、変換結果を制御部801を介してRAM106に出力する。あるいは、制御部801が変換処理を行ってもよい。   Accordingly, the block processing unit 802 converts the final label of the result of the block label assignment processing (for example, FIG. 13) stored in the memory 803 into the final final label, and the control unit 801 transfers the conversion result to the RAM 106. Further, in this example, the memory 803 stores information at 6 bits / pixel, while the RAM 106 stores information at, for example, 32 bits / pixel, so that the block processing unit 802 or the control unit 801 performs bit length conversion. In addition, the block processing unit 802 outputs the conversion result to the RAM 106 via the control unit 801 while performing the conversion process under the control of the control unit 801. Alternatively, the control unit 801 may perform conversion processing.

以上のブロックラベル付与処理を、RAM106に格納された各画像ブロックに施すことで、図3に示す、各画像ブロックのブロックラベル付与結果が得られる。   By applying the above block label assigning process to each image block stored in the RAM 106, a block label assigning result of each image block shown in FIG. 3 is obtained.

●ブロックラベル統合処理
続いて、統合処理部804により、ブロックラベル画像を統合するブロックラベル統合処理が行われる。
Block Label Integration Process Subsequently, the integration processing unit 804 performs block label integration processing for integrating block label images.

図14により統合処理するブロックラベル画像の一例を示す。図14は、ブロックラベル画像1601と、その下端に接続するブロックラベル画像1602を統合する例を示す。ブロックラベル画像1601と1602には、同じ番号(1、2)のラベルが割り当てられているが、統合前、異なる画像ブロックの同一番号のラベルの間に関連性はなく、たまたま同番号のラベルが割り当てられているだけに過ぎない。また、ブロックラベル画像1601におけるラベルA、および、ブロックラベル画像1602におけるラベルBは最終確定ラベルである。   FIG. 14 shows an example of a block label image to be integrated. FIG. 14 shows an example in which the block label image 1601 and the block label image 1602 connected to the lower end thereof are integrated. The label with the same number (1, 2) is assigned to the block label images 1601 and 1602, but before the integration, there is no relation between the same numbered labels of different image blocks, and the same numbered label happens to be It is only assigned. The label A in the block label image 1601 and the label B in the block label image 1602 are final confirmed labels.

図15により統合処理するブロックラベル画像の接続関係テーブルおよび外接情報テーブルを示す。図15(a)はブロックラベル画像1601の接続関係テーブルおよび外接情報テーブルを示し、図15(b)はブロックラベル画像1602の接続関係テーブルおよび外接情報テーブルを示す。   FIG. 15 shows a block label image connection relation table and a circumscribing information table to be integrated. FIG. 15A shows a connection relation table and circumscribing information table of the block label image 1601, and FIG. 15B shows a connection relation table and circumscribing information table of the block label image 1602.

なお、図15(a)(b)にはテーブル形式の情報を示すが、これらの情報はテーブル形式でメモリ上に存在する必要はなく、これらの情報を復元可能な形でRAM106に格納されていればよい。   FIGS. 15 (a) and 15 (b) show information in table format, but these information need not exist in memory in the table format and are stored in the RAM 106 in a recoverable form. Just do it.

先と同様に、接続関係テーブルの情報をLabel[]で表し、外接情報テーブルの情報をConnect[]で表す。さらに、図15(a)に関する情報をLabel0[]とConnect0[]、図15(b)に関する情報をLabel1[]とConnect1[]で表すことにする。 As before, the information in the connection relationship table is represented by Label [], and the information in the circumscribing information table is represented by Connect []. Further, information regarding FIG. 15A is represented by Label 0 [] and Connect 0 [], and information regarding FIG. 15B is represented by Label 1 [] and Connect 1 [].

統合処理部804は、下記の処理により図15(c)に示すテーブルを作成する。
Label[X] = X; ただし、1≦X≦6
if (1≦X≦2)
Connect[X] = Connect0[X] & 0xD;
if (3≦X≦6)
Connect[X] = Connect1[X-2] & 0x7; …(10)
ここで、&はビット論理積(ビットAND)。
The integration processing unit 804 creates the table shown in FIG. 15 (c) by the following processing.
Label [X] = X; where 1 ≦ X ≦ 6
if (1 ≦ X ≦ 2)
Connect [X] = Connect 0 [X] &0xD;
if (3 ≦ X ≦ 6)
Connect [X] = Connect 1 [X-2] &0x7;… (10)
Where & is a bitwise AND (bit AND).

処理(10)をブロックラベル画像PとQの統合に一般化すると、以下のようになる。
Label[X] = X; ただし、1≦X≦(LmaxP + LmaxQ)
if (1≦X≦LmaxP)
Connect[X] = ConnectP[X] & Mask(Pの接続端);
if (LmaxP+1≦X≦LmaxP+LmaxQ
Connect[X] = (ConnectQ[X-LmaxP] & Mask(Qの接続端) …(11)
ここで、LabelP[]はPの統合前の接続関係テーブル、
ConnectPはPの統合前の外接情報テーブル、
LmaxPはPの統合前のラベルの最大数、
LabelQ[]はQの統合前の接続関係テーブル、
ConnectQ[]はQの統合前の外接情報テーブル、
LmaxQはQの統合前のラベルの最大数。
When the process (10) is generalized to the integration of the block label images P and Q, it is as follows.
Label [X] = X; 1 ≦ X ≦ (Lmax P + Lmax Q )
if (1 ≦ X ≦ Lmax P )
Connect [X] = Connect P [X] & Mask (P connection end);
if (Lmax P +1 ≤ X ≤ Lmax P + Lmax Q )
Connect [X] = (Connect Q [X-Lmax P ] & Mask (Q connection end)… (11)
Here, Label P [] is the connection relation table before P integration,
Connect P is the circumscribing information table before P integration,
Lmax P is the maximum number of labels before P integration,
Label Q [] is the connection table before Q integration,
Connect Q [] is the circumscribing information table before Q integration,
Lmax Q is the maximum number of labels before Q integration.

また、マスクMask(C)は、次式の演算によって求める。
Mask(C) = {0x7×f(C, "上端を含む")}
& {0xB×f(C, "右端を含む")}
& {0xD×f(C, "下端を含む")}
& {0xE×f(C, "左端を含む")}; …(12)
ここで、関数f(C, W)はCが条件Wを満たす場合は‘1’、満たさない場合は‘0’。
The mask Mask (C) is obtained by the calculation of the following equation.
Mask (C) = {0x7 × f (C, "Including top edge")}
& {0xB × f (C, "Including right edge")}
& {0xD × f (C, "Including bottom")}
& {0xE × f (C, "Including left edge")};… (12)
Here, the function f (C, W) is “1” if C satisfies the condition W, and “0” otherwise.

マスクの具体例を説明すると、統合処理によりブロックラベル画像の上端を他のブロックラベル画像と接続する場合、最上位ビットを‘0’にするマスク(0x7)を与える。同様に、右端を接続する場合、上から2ビット目を‘0’にするマスク(0xB)を与える。下端を接続する場合、上から3ビット目を‘0’にするマスク(0xD)を与える。左端を接続する場合、最下位ビットを‘0’にするマスク(0xE)を与える。なお、このマスクの具体例は外接情報テーブルのビット列が上位から順に上端、右端、下端、左端に対応する場合の例であり、ビット列の並びと上下左右端の関係に合わせてマスクを与える。   A specific example of the mask will be described. When the upper end of the block label image is connected to another block label image by the integration process, a mask (0x7) for setting the most significant bit to “0” is given. Similarly, when the right end is connected, a mask (0xB) for setting the second bit from the top to ‘0’ is given. When the lower ends are connected, a mask (0xD) for setting the third bit from the top to “0” is given. When connecting the left end, a mask (0xE) for setting the least significant bit to ‘0’ is given. A specific example of this mask is an example in which the bit string of the circumscribing information table corresponds to the upper end, the right end, the lower end, and the left end in order from the top.

次に、統合処理部804は、ブロックラベル画像1601と1602の接続部のラベルの状態を調べ、図15(c)に示すテーブルを更新する。そのために、統合処理部804は、ブロックラベル画像1601の下端の1ライン1611と、ブロックラベル画像1602の上端の1ライン1612をRAM106から読み出す。そして、読み出したラインに対して、ブロックラベル付与処理における一次ラベルの付与処理と同様のラベル更新処理を行う。   Next, the integration processing unit 804 checks the label state of the connection unit between the block label images 1601 and 1602, and updates the table shown in FIG. For this purpose, the integration processing unit 804 reads one line 1611 at the lower end of the block label image 1601 and one line 1612 at the upper end of the block label image 1602 from the RAM 106. And the label update process similar to the primary label provision process in a block label provision process is performed with respect to the read line.

図16によりラベル更新処理を説明する。図16(a)は図14に示すブロックラベル画像1601と1602の2ライン(2×16画素)分のライン画像1611、1612を示す。ライン画像1611、1612に対して、図16(b)に示すように図6と同様の参照画素を適用し、上記処理手順(9)による一次ラベルの付与処理を実行して、図15(c)に示すテーブルを更新する。その際、下記のアルゴリズムに従い、画素に付与されたラベル番号を参照して図15(c)に示すテーブルにアクセスする。
if (Xがライン画像1611のラベル) {
Label'[X] = Label[X];
Connect'[X] = Connect[X];
}
if (Xがライン画像1612のラベル) {
Label'[X] = Label[X+2];
Connect'[X] = Connect[X+2];
} …(13)
The label update process will be described with reference to FIG. FIG. 16A shows line images 1611 and 1612 for two lines (2 × 16 pixels) of the block label images 1601 and 1602 shown in FIG. As shown in FIG.16 (b), the reference pixels similar to those in FIG.6 are applied to the line images 1611 and 1612, and the primary label assigning process according to the above processing procedure (9) is executed. Update the table shown in). At that time, the table shown in FIG. 15C is accessed according to the following algorithm with reference to the label number assigned to the pixel.
if (X is the label of line image 1611) {
Label '[X] = Label [X];
Connect '[X] = Connect [X];
}
if (X is the label of line image 1612) {
Label '[X] = Label [X + 2];
Connect '[X] = Connect [X + 2];
} …(13)

アルゴリズム(13)をブロックラベル画像PとQを統合する場合に一般化すると、以下のようになる。
if (XがPのラベル) {
Label'[X] = Label[X];
Connect'[X] = Connect[X];
}
if (XがQのラベル) {
Label'[X] = Label[X+LmaxP];
Connect'[X] = Connect[X+LmaxP];
} …(14)
Generalizing the algorithm (13) when integrating the block label images P and Q is as follows.
if (X is labeled P) {
Label '[X] = Label [X];
Connect '[X] = Connect [X];
}
if (X is labeled Q) {
Label '[X] = Label [X + Lmax P ];
Connect '[X] = Connect [X + Lmax P ];
} …(14)

図15(c)のテーブルに対する更新処理において、先述した一次ラベルの付与処理と同様に、ラベル番号の再割り当てと外接情報の統合が行われるが、これは一次ラベルの付与処理と同様の処理であり、説明を省略する。図15(d)は図15(c)のテーブルの更新結果を示す。図15(d)に示すテーブルには番号128のラベルがあるが、これは最終確定ラベルを割り当てるべきラベルである。   In the update process for the table in FIG. 15 (c), reassignment of label numbers and integration of circumscribing information are performed in the same way as the primary label assignment process described above. This is the same process as the primary label assignment process. Yes, the description is omitted. FIG. 15 (d) shows the update result of the table of FIG. 15 (c). In the table shown in FIG. 15 (d), there is a label with the number 128, which is a label to which the final confirmed label is to be assigned.

次に、統合処理部804は、図15(d)のテーブルを用いて、ブロックラベル画像1601、1602の更新処理を行う。つまり、ブロックラベル画像1601、1602をRAM106から読み込み、図15(d)のテーブルに従いブロックラベル画像1601、1602を書き換えてRAM106に書き込む。その際、図15(c)のテーブルの更新処理と同様に、Label'[]およびConnect'[]を用いて図15(d)のテーブルを参照し、更新処理を実行する。   Next, the integration processing unit 804 performs update processing of the block label images 1601 and 1602 using the table in FIG. That is, the block label images 1601 and 1602 are read from the RAM 106, and the block label images 1601 and 1602 are rewritten according to the table of FIG. At that time, similarly to the update process of the table of FIG. 15C, the update process is executed by referring to the table of FIG. 15D using Label ′ [] and Connect ′ [].

図17によりブロックラベル統合処理後のブロックラベル画像の一例を示す。図17におけるラベルCは、統合処理で新たに割り当てられた最終確定ラベルを表す。統合処理により更新されたブロックラベル画像はRAM106に格納されるが、その際、統合したブロックラベル画像に対するブロックラベル情報が生成される。このブロックラベル情報も所定の書式に従いRAM106に格納される。   FIG. 17 shows an example of a block label image after the block label integration process. A label C in FIG. 17 represents a final fixed label newly assigned in the integration process. The block label image updated by the integration process is stored in the RAM 106. At this time, block label information for the integrated block label image is generated. This block label information is also stored in the RAM 106 according to a predetermined format.

上記では、垂直方向に隣接する二つのブロックラベル画像を統合する例を説明した。水平方向に隣接する二つのブロックラベル画像を統合する場合は、それらブロックラベル画像から2コラム分の画像を取得して、図16(c)に示すようにジグザクに参照画素を適用し、上記の処理を実行すればよい。あるいは、上記処理手順(9)において、行と列を入れ替えて処理を行うことでも可能である。   In the above, an example in which two block label images adjacent in the vertical direction are integrated has been described. When integrating two block label images that are adjacent in the horizontal direction, obtain two columns of images from the block label images, apply the reference pixels to the zigzag as shown in FIG. What is necessary is just to perform a process. Alternatively, in the processing procedure (9), it is also possible to perform processing by exchanging rows and columns.

そして、ブロック統合処理の結果を新たなブロックラベル画像として、再帰的にブロック統合処理を繰り返し、すべてのブロックラベル画像を統合して最終的に画像全体のラベリング結果を得る。その際、入力画像の端部に位置するブロック画像については、ブロック端が画像全体の端部(上端、下端、左端、右端)の何れに相当するかを調べ、外接情報テーブルの画像全体の端部に対応するビットを‘0’にする。この処置により、上述した処理により、正しいラベリング処理が可能になる。   Then, using the result of the block integration process as a new block label image, the block integration process is recursively repeated, and all the block label images are integrated to finally obtain the labeling result of the entire image. At that time, for the block image located at the end of the input image, it is determined whether the block end corresponds to the end of the entire image (upper end, lower end, left end, right end), and the end of the entire image of the circumscribing information table Set the bit corresponding to the part to '0'. By this treatment, the correct labeling process can be performed by the above-described process.

すべてブロック画像のブロックラベル付与処理が終了するのを待ってブロックラベル統合処理を行う必要はない。つまり、ブロックラベル統合処理に必要なブロックラベル画像が生成された時点でブロックラベル統合処理を開始すればよい。この場合、先に処理されたブロック画像に対する統合処理と、次に処理するブロック画像に対するブロックラベル付与処理はパイプライン的に動作する。   It is not necessary to perform block label integration processing after waiting for completion of the block label addition processing for all block images. That is, the block label integration process may be started when a block label image necessary for the block label integration process is generated. In this case, the integration processing for the previously processed block image and the block label assignment processing for the next processed block image operate in a pipeline manner.

このように、ラベリング処理を画像ブロック単位に行うことで、処理に必要なメモリ、とくに作業用のメモリのメモリ量を大幅に削減することができる。従って、実施例のラベリング法を用いるハードウェアの回路規模を大幅に削減することができる。   As described above, by performing the labeling process in units of image blocks, it is possible to greatly reduce the amount of memory required for processing, particularly the working memory. Therefore, the hardware circuit scale using the labeling method of the embodiment can be greatly reduced.

また、実施例のラベリング法によれば、最終確定ラベルの割り当て処理以外は並列処理が可能であり、最終確定ラベルの割り当て処理のみ排他的に処理を行うように構成すれば、複数の画像処理部109によりラベリング処理の高速化を図ることができる。この並列性によれば、GPU (graphics processing unit)上で動作するソフトウェアによってラベリング処理を実現する場合の高速化が期待される。   Further, according to the labeling method of the embodiment, parallel processing is possible except for the final confirmed label allocation process, and a plurality of image processing units can be configured if only the final confirmed label allocation process is performed exclusively. 109 can speed up the labeling process. According to this parallelism, high speed is expected when the labeling processing is realized by software operating on a GPU (graphics processing unit).

また、実施例のラベリング法をパーソナルコンピュータ上で動作するソフトウェアで実現する場合、同時に参照すべきデータを少なくして(データアクセスの局所化)、キャッシュなどと組み合わせることで、ラベリング処理を高速化することができる。つまり、ブロックラベル画像の統合処理において、不要なデータ転送を省くことができ、RAM106との間のデータ転送量が削減可能である。   Further, when the labeling method of the embodiment is realized by software operating on a personal computer, the data to be referred to at the same time is reduced (data access localization) and combined with a cache or the like to speed up the labeling process. be able to. That is, unnecessary data transfer can be omitted in the block label image integration processing, and the amount of data transfer to and from the RAM 106 can be reduced.

[変形例]
上記では、一度に二つのブロックラベル画像を統合する例を示したが、統合後のブロックの形状が凸型の矩形であれば、四つのブロックラベル画像を同時に統合する拡張も容易である。
[Modification]
In the above, an example in which two block label images are integrated at a time has been shown. However, if the shape of the block after integration is a convex rectangle, it is easy to extend the integration of four block label images at the same time.

ブロックラベル画像の統合順序にはとくに制限がないが、例えば、画像の主走査方向に並んだブロックラベル画像を優先して統合してもよいし、逆に、副走査方向に並んだブロックラベル画像を優先して統合してもよい。あるいは、主走査方向に並んだブロックラベル画像と、副走査方向に並んだブロックラベル画像を略同数選択して、空間的に近いブロックラベル画像をブロック状に統合してもよい。   There is no particular restriction on the order of integration of the block label images. For example, the block label images arranged in the main scanning direction of the images may be preferentially integrated, or conversely, the block label images arranged in the sub scanning direction. May be integrated with priority. Alternatively, approximately the same number of block label images arranged in the main scanning direction and block label images arranged in the sub-scanning direction may be selected, and the block label images close in space may be integrated into a block shape.

上記では、すべての画像ブロックについて処理を行うとした。しかし、画像ブロックの内容によっては未確定ラベルが一つも発生しない場合がある。ブロックラベル統合処理において、未確定ラベルをもたないブロックラベル画像はラベルを再割り当てする処理を省略することができる。ブロックラベル画像における未確定ラベルの有無は、対応するブロックラベル情報から容易に判定することが可能である。従って、未確定ラベルをもたないブロックラベル画像は、ブロックラベル統合処理の後、ラベルの再割り当て処理(および、そのためのブロック画像の読み込み)を省略することができる。   In the above description, it is assumed that processing is performed for all image blocks. However, depending on the content of the image block, there may be no undefined label. In the block label integration process, it is possible to omit the process of reassigning a label for a block label image having no uncertain label. The presence or absence of an undetermined label in the block label image can be easily determined from the corresponding block label information. Therefore, for a block label image having no undetermined label, label reassignment processing (and reading of the block image for that purpose) can be omitted after the block label integration processing.

また、画像中の特定領域を中心に、当該領域を拡大するようにブロックラベル画像を統合するとともに、画像全体を処理する前に処理を打ち切ることもできる。このような統合処理によば、画面全体を統合する場合と結果が異なることもあるが、例えば要求処理速度が非常に高く全画像を処理し切れない場合(動画像の各フレームをラベリング処理する場合など)に有効である。   Further, it is possible to integrate the block label image so as to enlarge the area around a specific area in the image, and to abort the process before processing the entire image. According to such integration processing, the result may differ from the case where the entire screen is integrated, but for example, when the required processing speed is very high and all images cannot be processed (labeling processing of each frame of a moving image) Effective).

処理の打切りは、処理時間を計測して所定時間が経過した時点で打ち切る、あるいは、所定数のブロックを統合した時点で打ち切るなどが考えられる。画像中の特定領域としては、例えば、所定領域(画像中央など)、ユーザ指定領域、顔検出処理などの検出領域、画像データの書誌情報(EXIFのSubjectAreaタグ情報やJPEG2000のROIなど)が定める領域、などが考えられる。   The processing can be aborted by measuring the processing time and aborting when a predetermined time elapses, or aborting when a predetermined number of blocks are integrated. Specific areas in the image include, for example, predetermined areas (such as the center of the image), user-specified areas, detection areas such as face detection processing, and areas defined by bibliographic information (EXIF SubjectArea tag information, JPEG2000 ROI, etc.) , Etc. can be considered.

また、実施例のラベリング法をハードウェアで実現する場合、処理の打ち切りにより消費電力を削減することができる。例えば、バッテリ駆動のハードウェアの場合、バッテリ残量などに応じて、画像全体を統合するモードと、処理を打ち切るモードを切り替えることもできる。   Further, when the labeling method of the embodiment is realized by hardware, power consumption can be reduced by aborting the process. For example, in the case of battery-powered hardware, the mode for integrating the entire image and the mode for terminating the processing can be switched according to the remaining battery level.

上記では、入力画像として二値画像の例を説明したが、実施例のラベリング法を多値画像に拡張することは容易である。つまり、二値画像の場合は、オン画素の注目画素に隣接する画素がオン画素の場合に注目画素と同一の一次ラベルを付与する。多値画像の場合は、注目画素の信号値と隣接画素の信号値の間の差分を求め、差分の絶対値が所定の閾値未満の場合に注目画素と同一の一次ラベルを付与すればよい。   In the above description, an example of a binary image is described as an input image. However, it is easy to extend the labeling method of the embodiment to a multi-value image. That is, in the case of a binary image, the same primary label as the target pixel is assigned when the pixel adjacent to the target pixel of the on pixel is the on pixel. In the case of a multi-valued image, the difference between the signal value of the target pixel and the signal value of the adjacent pixel is obtained, and the same primary label as the target pixel may be given when the absolute value of the difference is less than a predetermined threshold.

さらに、ブロックラベル統合処理においては、端部のライン画像(図16に示す画像1611、1612)に加え、それらに対応する入力画像の信号値を入力し、信号値を参照してラベルを統合するか否かを判定する。判定には、一次ラベルの付与と同様に、信号値の差分に関する閾値を用いる。なお、閾値には所定値を用いればよいが、注目画素の近傍画素や画像ブロック内の他の画素の信号値から統計的かつ動的に閾値を決定してもよい。   Further, in the block label integration processing, in addition to the line images at the end (images 1611 and 1612 shown in FIG. 16), the signal values of the input images corresponding to them are input, and the labels are integrated by referring to the signal values. It is determined whether or not. For the determination, a threshold related to a difference in signal values is used as in the case of providing a primary label. Note that a predetermined value may be used as the threshold value, but the threshold value may be determined statistically and dynamically from the signal values of the neighboring pixels of the target pixel and other pixels in the image block.

実施例のラベリング法は、1チャネルの多値画像ではなく、例えばRGB画像など多チャネルの多値画像に拡張することも可能である。この場合、各チャネルの信号値を要素とする多次元(RGBの場合は三次元)座標系を規定し、画素の信号値に対応する座標間の距離と所定の閾値を比較する。他チャネルの画像には、RGB画像だけでなく、例えばYCC色空間の画像やCIELab色空間の画像も含まれる。   The labeling method of the embodiment can be extended to a multi-channel multi-value image such as an RGB image instead of a single-channel multi-value image. In this case, a multi-dimensional (three-dimensional in the case of RGB) coordinate system having the signal value of each channel as an element is defined, and a distance between coordinates corresponding to the pixel signal value is compared with a predetermined threshold value. The image of the other channel includes not only the RGB image but also an image in the YCC color space and an image in the CIELab color space, for example.

このように、2パスラベリング法に基づくラベリング処理を画像ブロック単位に行うことができ、ラベリング処理中に必要になる中間メモリのメモリ量を大幅に削減することができる。また、画像ブロック単位の処理の大部分は、他の画像ブロックの処理から独立し、処理の並列化を容易に実現することができる。   Thus, the labeling process based on the two-pass labeling method can be performed for each image block, and the amount of intermediate memory required during the labeling process can be greatly reduced. In addition, most of the processing in units of image blocks is independent of the processing of other image blocks, and parallelization of processing can be easily realized.

以下、本発明にかかる実施例2の画像処理を説明する。なお、実施例2において、実施例1と略同様の構成については、同一符号を付して、その詳細説明を省略する。   The image processing according to the second embodiment of the present invention will be described below. Note that the same reference numerals in the second embodiment denote the same parts as in the first embodiment, and a detailed description thereof will be omitted.

実施例1においては、図5に示すように、一組の回路構成を有する画像処理部109によってラベリング処理を行う例を説明した。実施例2では、複数の回路構成を有する画像処理部109によってラベリング処理を行う例を説明する。   In the first embodiment, as illustrated in FIG. 5, the example in which the labeling process is performed by the image processing unit 109 having a set of circuit configurations has been described. In the second embodiment, an example in which the labeling process is performed by the image processing unit 109 having a plurality of circuit configurations will be described.

図18のブロック図により実施例2の画像処理部109の構成例を説明する。実施例2の画像処理部109は、制御部801、三つのブロック処理部802a、802bおよび802c、二つの統合処理部804aおよび804b、並びに、他の処理を行う処理部805を有し、これら処理部はメモリ803を共有する。制御部801は、ラベリング処理の進み具合に応じて、処理部によるメモリ803の使用を制御して、メモリ803の使用効率を上げる。実施例2において、ブロック処理部802と統合処理部804がそれぞれ複数あれば、ブロック処理部802、統合処理部804、処理部805の数は任意である。   A configuration example of the image processing unit 109 according to the second embodiment will be described with reference to the block diagram of FIG. The image processing unit 109 according to the second embodiment includes a control unit 801, three block processing units 802a, 802b, and 802c, two integrated processing units 804a and 804b, and a processing unit 805 that performs other processing. The units share the memory 803. The control unit 801 controls the use of the memory 803 by the processing unit according to the progress of the labeling process, and increases the use efficiency of the memory 803. In the second embodiment, if there are a plurality of block processing units 802 and a plurality of integration processing units 804, the number of block processing units 802, integration processing units 804, and processing units 805 is arbitrary.

また、画像処理部109の動作と、ラベリング処理に使用可能なメモリ803の領域に応じて、ブロック処理部802、統合処理部804、処理部805の動作設定を変更することができる。例えば、ブロック処理部802のブロックラベル付与処理における画像ブロックサイズを大きくするほどメモリ803のメモリ使用量が増加するが、統合処理部804のブロックラベル統合処理におけるブロックラベル画像の読出回数を削減することができる。また、ブロックラベル統合処理において同時に統合する画像ブロックの数を増やせば、例えば図15(a)から図15(d)に示すテーブルに必要なメモリ量が増加するが、ブロックラベル統合処理におけるブロックラベル画像の読出回数を削減することができる。   Further, the operation settings of the block processing unit 802, the integration processing unit 804, and the processing unit 805 can be changed according to the operation of the image processing unit 109 and the area of the memory 803 that can be used for the labeling process. For example, the memory usage of the memory 803 increases as the image block size in the block label assignment process of the block processing unit 802 increases, but the number of times of reading the block label image in the block label integration process of the integration processing unit 804 is reduced. Can do. Further, if the number of image blocks to be integrated simultaneously in the block label integration process is increased, for example, the amount of memory required for the table shown in FIG. 15 (a) to FIG. 15 (d) increases, but the block label in the block label integration process The number of times of image reading can be reduced.

さらに、ブロック処理部802、統合処理部804(さらに処理部805)を再構成可能な回路で構成することも考えられる。この場合、例えば、互いに他の処理部を実現可能な構成として、システム側の要求に応じて各部の構成を変更し、ラベリング処理を行う。あるいは、再構成可能な回路ではなく、各処理部をCPUとソフトウェアで構成し、CPUによってラベリング処理を行うことも容易である。   Further, it is conceivable that the block processing unit 802 and the integrated processing unit 804 (further, the processing unit 805) are configured by reconfigurable circuits. In this case, for example, as a configuration in which other processing units can be realized, the configuration of each unit is changed according to a request on the system side, and labeling processing is performed. Alternatively, instead of a reconfigurable circuit, it is easy to configure each processing unit with a CPU and software and perform a labeling process by the CPU.

さらに、ブロック処理部802、統合処理部804、処理部805を個別または複数単位に、クロックまたは電源の供給/遮断を設定可能に構成することもできる。この場合、動作モードなどに応じて、高速動作が不要な場合はブロック処理部202、統合処理部804、処理部805の一部のクロック供給や電力供給を停止し、省電力動作に移行させることができる。   Furthermore, the block processing unit 802, the integration processing unit 804, and the processing unit 805 can be configured to be able to set supply / cutoff of a clock or power supply individually or in units. In this case, depending on the operation mode, etc., if high-speed operation is not required, the clock processing and power supply for some of the block processing unit 202, the integration processing unit 804, and the processing unit 805 should be stopped to shift to power saving operation. Can do.

以下、本発明にかかる実施例3の画像処理を説明する。なお、実施例3において、実施例1、2と略同様の構成については、同一符号を付して、その詳細説明を省略する。   Hereinafter, image processing according to the third embodiment of the present invention will be described. Note that the same reference numerals in the third embodiment denote the same parts as in the first and second embodiments, and a detailed description thereof will be omitted.

実施例3では、上記のラベリング法をCannyエッジ検出処理に適用する例を説明する。典型的なCannyエッジ検出処理は以下の処理から構成される。   In the third embodiment, an example in which the above labeling method is applied to the Canny edge detection process will be described. A typical Canny edge detection process consists of the following processes.

まず、入力画像に平滑化フィルタ処理を施し、平滑化画像を得る。   First, a smoothing filter process is performed on the input image to obtain a smoothed image.

次に、平滑化画像にエッジ強度算出処理を施し、エッジ強度画像を得る。エッジ検出処理は任意のものでよいが、例えばSobelフィルタなどを用いる。水平方向、垂直方向ごとにエッジを検出した場合は、例えば、水平方向のエッジ強度と垂直方向のエッジ強度の二乗和を算出し、二乗和(またはその平方根)をその画素位置におけるエッジ強度とする。   Next, an edge strength calculation process is performed on the smoothed image to obtain an edge strength image. The edge detection process may be arbitrary. For example, a Sobel filter is used. When an edge is detected for each of the horizontal direction and the vertical direction, for example, the sum of squares of the edge strength in the horizontal direction and the edge strength in the vertical direction is calculated, and the sum of squares (or the square root thereof) is used as the edge strength at the pixel position. .

次に、エッジの選別処理を行う。これは、エッジ強度画像の各画素値(つまり元の画像のエッジ強度値)に二つの閾値th0とth1 (0≦th0<th1)を適用して、下記のアルゴリズムにより、当該画素がエッジ画素か否かを判定する。
if (I(x, y) < th0)
非エッジ画素;
if (I(x,y) > th1)
エッジ画素;
if (t0 ≦ I(x,y) ≦ t1) {
if (エッジ画素に隣接する)
エッジ画素;
else
非エッジ画素;
} …(15)
ここで、(x, y)は強度画像の座標、
I(x, y)は座標(x, y)の画素の値。
Next, edge selection processing is performed. This is done by applying two thresholds th0 and th1 (0 ≦ th0 <th1) to each pixel value of the edge intensity image (that is, the edge intensity value of the original image), and whether the pixel is an edge pixel or not by the following algorithm. Determine whether or not.
if (I (x, y) <th0)
Non-edge pixels;
if (I (x, y)> th1)
Edge pixels;
if (t0 ≤ I (x, y) ≤ t1) {
if (adjacent to edge pixel)
Edge pixels;
else
Non-edge pixels;
}… (15)
Where (x, y) is the coordinates of the intensity image,
I (x, y) is the value of the pixel at coordinates (x, y).

画素値がt0 ≦ I(x,y) ≦ t1である画素がエッジ画素か否かの決定処理(以下、エッジ画素確定処理)は、エッジ強度画像の画素値を三値化し、上記のラベリング法を応用することで容易に実現される。なお、三値は、非エッジ画素(I(x, y) < th0)、未確定画素(t0 ≦ I(x,y) ≦ t1)、確定エッジ画素(I(x,y) > th1)である。なお、上記のラベリング法をエッジ画素確定処理に適用する場合、ラベル0を非エッジ画素に付与し、ラベル1を確定エッジ画素に付与することが好ましい。   In the process of determining whether or not a pixel whose pixel value is t0 ≦ I (x, y) ≦ t1 is an edge pixel (hereinafter referred to as an edge pixel determination process), the pixel value of the edge intensity image is trinized and the labeling method described above is used. It is easily realized by applying. Note that the three values are non-edge pixels (I (x, y) <th0), undefined pixels (t0 ≤ I (x, y) ≤ t1), and confirmed edge pixels (I (x, y)> th1). is there. When applying the above labeling method to the edge pixel determination process, it is preferable to apply label 0 to the non-edge pixel and label 1 to the determined edge pixel.

まず、エッジ画素確定処理における入力画像として、非エッジ画素に画素値「0」を、確定エッジ画素に画素値「1」、未確定画素に画素値「2」を割り当てた三値画像を作成する。   First, as an input image in the edge pixel determination process, a ternary image is created in which a pixel value “0” is assigned to a non-edge pixel, a pixel value “1” is assigned to a confirmed edge pixel, and a pixel value “2” is assigned to an indeterminate pixel. .

次に、三値画像を入力として、上記のラベリング法によるブロックラベル付与処理を実行する。つまり、ブロックラベル付与処理により、確定エッジ画素にラベル1を割り当て、未確定画素に新規ラベルを付与する場合はラベル番号が2以上のラベルを割り当てる。   Next, with the ternary image as an input, the block labeling process by the labeling method is executed. That is, when assigning a label 1 to a confirmed edge pixel and assigning a new label to an unconfirmed pixel by the block label assigning process, a label having a label number of 2 or more is assigned.

確定ラベルが出現した場合、ラベル番号が「1」であればそのままとし、そうでない場合は最終確定ラベルとして「0」を割り当てる。上記の処理手順(9)によれば、複数のラベルが合流した場合、よりラベル番号が小さいラベルが残留する(例えば、上記の処理手順(9e)(9f))。従って、確定ラベルが出現し、かつ、そのラベル番号が確定エッジ画素を意味するラベル番号「1」よりも大きい場合、それは確定エッジ画素に隣接しない未確定画素である。そのような確定ラベルが付与された画素は、アルゴリズム(15)に従い、非エッジ画素とすればよい。   When a confirmed label appears, if the label number is “1”, it is left as it is. Otherwise, “0” is assigned as the final confirmed label. According to the above processing procedure (9), when a plurality of labels merge, a label with a lower label number remains (for example, the above processing procedures (9e) and (9f)). Therefore, when a definite label appears and the label number is larger than the label number “1” indicating the definite edge pixel, it is an undetermined pixel that is not adjacent to the definite edge pixel. A pixel to which such a definite label is assigned may be a non-edge pixel according to the algorithm (15).

未確定ラベルについては、他のブロックとの接続状況に依存するので、実施例1と同様に、ブロックラベル情報としてRAM106に保存する。   Since the indeterminate label depends on the connection status with other blocks, it is stored in the RAM 106 as block label information as in the first embodiment.

また、ブロックラベル統合処理において、ブロックラベル付与処理と同様、確定ラベルが出現した場合は、ラベル番号が「1」であればそのままとし、そうでない場合は最終確定ラベルとして「0」を割り当てる。このようにして、ブロックラベル画像を統合すると、最終的に、非エッジ画素に対応するラベル番号「0」、または、確定エッジ画素に対応するラベル番号「1」が付与されたラベル画像が得られ、Cannyエッジ検出処理が実現される。   In the block label integration process, as in the block label addition process, if a confirmed label appears, if the label number is “1”, it is left as it is. Otherwise, “0” is assigned as the final confirmed label. In this way, when the block label images are integrated, a label image having the label number “0” corresponding to the non-edge pixel or the label number “1” corresponding to the confirmed edge pixel is finally obtained. , Canny edge detection processing is realized.

このように、上記のラベリング法を応用することで、Cannyエッジ検出処理の一部(エッジ画素確定処理)を実現することができ、Cannyエッジ検出処理におけるエッジ画素確定処理をブロック単位に実行することが可能になる。Cannyエッジ検出処理における他の処理は容易にブロック処理可能であるから、上記のラベリング法を適用することにより、Cannyエッジ検出処理全体をブロック処理することができる。さらに、エッジ画素確定処理(とくにブロックラベル付与処理の部分)と、その前の処理(平滑化処理、エッジ強度算出処理)をパイプライン状に構成することも容易である。   In this way, by applying the labeling method described above, part of the Canny edge detection process (edge pixel determination process) can be realized, and the edge pixel determination process in the Canny edge detection process can be executed in units of blocks. Is possible. Since the other processes in the Canny edge detection process can be easily blocked, the entire Canny edge detection process can be blocked by applying the above-described labeling method. Furthermore, it is easy to configure the edge pixel determination process (particularly, the block labeling process) and the previous process (smoothing process, edge strength calculation process) in a pipeline shape.

[その他の実施例]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステムあるいは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Examples]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

Claims (13)

画像を所定サイズの複数のブロック画像に分割する分割手段と、
前記ブロック画像をラベリング処理したブロックラベル画像を生成するラベル画像の生成手段と、
前記ブロックラベル画像に割り当てられたラベルのうち、互いに隣接するブロックラベル画像の統合により変更される可能性があるラベルである未確定ラベルに関するブロックラベル情報を生成するラベル情報の生成手段と、
互いに隣接するブロックラベル画像のブロックラベル情報に基づき、前記隣接するブロックラベル画像に割り当てられたラベルを更新して、前記隣接するブロックラベル画像を統合したブロックラベル画像と、前記統合したブロックラベル画像のブロックラベル情報とを生成する統合手段と、
前記ラベル画像の生成手段、前記ラベル情報の生成手段、および、前記統合手段を制御して、前記画像の全体をラベリング処理する制御手段とを有することを特徴とする画像処理装置。
Dividing means for dividing the image into a plurality of block images of a predetermined size;
Label image generating means for generating a block label image obtained by labeling the block image;
Label information generating means for generating block label information related to an indeterminate label that is a label that may be changed by integration of adjacent block label images among the labels assigned to the block label image;
Based on the block label information of the block label images adjacent to each other, the label assigned to the adjacent block label image is updated, and the block label image integrated with the adjacent block label image and the integrated block label image An integration means for generating block label information;
An image processing apparatus comprising: a label image generation unit, the label information generation unit, and a control unit that controls the integration unit to label the entire image.
前記未確定ラベルは前記ブロック画像の端部の画素に割り当てられたラベルであり、前記ブロックラベル情報は前記未確定ラベルが前記ブロックラベル画像の端部それぞれに出現するか否かを示すことを特徴とする請求項1に記載された画像処理装置。   The uncertain label is a label assigned to a pixel at an end of the block image, and the block label information indicates whether the uncertain label appears at each end of the block label image. 2. The image processing apparatus according to claim 1. 前記ラベル情報の生成手段は、前記端部に出現しないラベルを前記ブロックラベル画像において一意のラベルに置き換えることを特徴とする請求項2に記載された画像処理装置。   3. The image processing apparatus according to claim 2, wherein the label information generation unit replaces a label that does not appear at the end with a unique label in the block label image. 前記統合手段は、前記隣接するブロックラベル画像のブロックラベル情報が、前記隣接するブロックラベル画像の接続部における前記未確定ラベルの出現を示す場合、前記隣接するブロックラベル画像の端部を走査して前記ラベルの更新を行うことを特徴とする請求項1から請求項3の何れか一項に記載された画像処理装置。   When the block label information of the adjacent block label image indicates the appearance of the undetermined label at the connection portion of the adjacent block label image, the integration unit scans an end portion of the adjacent block label image. 4. The image processing apparatus according to claim 1, wherein the label is updated. 前記統合手段は、前記未確定ラベルをもたないブロックラベル画像について、前記ラベルの更新を省略することを特徴とする請求項1から請求項4の何れか一項に記載された画像処理装置。   5. The image processing apparatus according to claim 1, wherein the integration unit omits the update of the label for the block label image having no undetermined label. 前記統合手段は、前記統合したブロックラベル画像の端部に出現しないラベルを前記画像の全体において一意のラベルに置き換えることを特徴とする請求項1から請求項5の何れか一項に記載された画像処理装置。   6. The integration unit according to claim 1, wherein a label that does not appear at an end of the integrated block label image is replaced with a unique label in the entire image. Image processing device. 前記統合手段は、前記画像の所定の領域に対応するブロックラベル画像から前記統合を開始することを特徴とする請求項1から請求項6の何れか一項に記載された画像処理装置。   7. The image processing apparatus according to claim 1, wherein the integration unit starts the integration from a block label image corresponding to a predetermined region of the image. 前記統合手段は、前記統合の処理時間または前記統合したブロックラベル画像の数が所定の条件を満たした場合、前記統合を終了することを特徴とする請求項7に記載された画像処理装置。   8. The image processing apparatus according to claim 7, wherein the integration unit ends the integration when the integration processing time or the number of the integrated block label images satisfies a predetermined condition. 前記画像は、エッジ検出処理において三値化されたエッジ強度画像であることを特徴とする請求項1から請求項8の何れか一項に記載された画像処理装置。   9. The image processing apparatus according to claim 1, wherein the image is an edge intensity image that is ternarized in an edge detection process. 前記エッジ強度画像は、前記エッジ検出処理において、エッジ画素または非エッジ画素として確定された画素、および、前記エッジ画素か否かが未確定の画素を表すことを特徴とする請求項9に記載された画像処理装置。   10. The edge intensity image according to claim 9, wherein the edge intensity image represents a pixel determined as an edge pixel or a non-edge pixel in the edge detection process, and a pixel in which it is not determined whether the edge pixel is the edge pixel. Image processing device. 分割手段、ラベル画像の生成手段、ラベル情報の生成手段、統合手段、制御手段を有する画像処理装置の画像処理方法であって、
前記分割手段が、画像を所定サイズの複数のブロック画像に分割し、
前記ラベル画像の生成手段が、前記ブロック画像をラベリング処理したブロックラベル画像を生成し、
前記ラベル情報の生成手段が、前記ブロックラベル画像に割り当てられたラベルのうち、互いに隣接するブロックラベル画像の統合により変更される可能性があるラベルである未確定ラベルに関するブロックラベル情報を生成し、
前記統合手段が、互いに隣接するブロックラベル画像のブロックラベル情報に基づき、前記隣接するブロックラベル画像に割り当てられたラベルを更新して、前記隣接するブロックラベル画像を統合したブロックラベル画像と、前記統合したブロックラベル画像のブロックラベル情報とを生成し、
前記制御手段が、前記ラベル画像の生成手段、前記ラベル情報の生成手段、および、前記統合手段を制御して、前記画像の全体をラベリング処理することを特徴とする画像処理方法。
An image processing method of an image processing apparatus having a dividing unit, a label image generating unit, a label information generating unit, an integrating unit, and a control unit,
The dividing unit divides the image into a plurality of block images of a predetermined size,
The label image generation means generates a block label image obtained by labeling the block image,
The label information generation means generates block label information related to an indeterminate label that is a label that may be changed by integration of adjacent block label images among the labels assigned to the block label image,
The integration unit updates a label assigned to the adjacent block label image based on block label information of adjacent block label images, and integrates the adjacent block label images, and the integration Block label information of the generated block label image,
An image processing method, wherein the control means controls the label image generation means, the label information generation means, and the integration means to label the entire image.
コンピュータを請求項1から請求項10の何れか一項に記載された画像処理装置の各手段として機能させるためのプログラム。   11. A program for causing a computer to function as each unit of the image processing apparatus according to claim 1. 請求項12に記載されたプログラムが格納されたコンピュータが読み取り可能な記録媒体。   A computer-readable recording medium in which the program according to claim 12 is stored.
JP2013076451A 2013-04-01 2013-04-01 Image processor and method thereof Pending JP2014203134A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013076451A JP2014203134A (en) 2013-04-01 2013-04-01 Image processor and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013076451A JP2014203134A (en) 2013-04-01 2013-04-01 Image processor and method thereof

Publications (1)

Publication Number Publication Date
JP2014203134A true JP2014203134A (en) 2014-10-27

Family

ID=52353555

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013076451A Pending JP2014203134A (en) 2013-04-01 2013-04-01 Image processor and method thereof

Country Status (1)

Country Link
JP (1) JP2014203134A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018073888A1 (en) * 2016-10-18 2018-04-26 オリンパス株式会社 Image processing method and image processing device
US10510147B2 (en) 2015-05-14 2019-12-17 Olympus Corporation Image processing device
CN110992334A (en) * 2019-11-29 2020-04-10 深圳易嘉恩科技有限公司 Quality evaluation method for DCGAN network generated image

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10510147B2 (en) 2015-05-14 2019-12-17 Olympus Corporation Image processing device
WO2018073888A1 (en) * 2016-10-18 2018-04-26 オリンパス株式会社 Image processing method and image processing device
US10846862B2 (en) 2016-10-18 2020-11-24 Olympus Corporation Image processing method and image processing device
CN110992334A (en) * 2019-11-29 2020-04-10 深圳易嘉恩科技有限公司 Quality evaluation method for DCGAN network generated image
CN110992334B (en) * 2019-11-29 2023-04-07 四川虹微技术有限公司 Quality evaluation method for DCGAN network generated image

Similar Documents

Publication Publication Date Title
CN108352083B (en) 2D image processing for stretching into 3D objects
TW516008B (en) Method and apparatus for digital image segmentation
US10204432B2 (en) Methods and systems for color processing of digital images
US10332262B2 (en) Removal of background information from digital images
KR102616700B1 (en) Image processing apparatus and image processing method thereof
US8818135B1 (en) Low memory content aware fill
US10762401B2 (en) Image processing apparatus controlling the order of storing decompressed data, and method thereof
CN104966265A (en) Graphics processing systems
JP2014203134A (en) Image processor and method thereof
JP4712885B2 (en) Image processing apparatus and image processing method
JP2018139457A (en) Image processing apparatus, control method for image processing and program
US20110229026A1 (en) Image processing apparatus, image processing method, and storage medium of image processing method
US10846889B2 (en) Color handle generation for digital image color gradients using machine learning
JP2007198912A (en) Image inspection device, image inspection method, program for allowing computer to function as image inspection device and recording medium
US20160350266A1 (en) Document compression with neighborhood biased pixel labeling
JP2006139606A (en) Image processing method, image processing apparatus, computer program, and recording medium readable by computer
CA2912251A1 (en) Partitioning an image
JP6525526B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
US8085279B2 (en) Drawing an image with transparent regions on top of another image without using an alpha channel
CN114444650A (en) Method for improving accuracy of quantized multi-level object detection network
TWI810462B (en) Binning unit, depth test system and method for selecting coverage merge rule associated with depth culling during binning of pixel geometries
US9031324B2 (en) Image-processing device specifying encircling line for identifying sub-region of image
US20170372495A1 (en) Methods and systems for color processing of digital images
JP5767549B2 (en) Image processing apparatus, image processing method, and program
JP6662108B2 (en) Image conversion program, image conversion apparatus, and image conversion method