JP6464609B2 - Image processing apparatus and program - Google Patents
Image processing apparatus and program Download PDFInfo
- Publication number
- JP6464609B2 JP6464609B2 JP2014167568A JP2014167568A JP6464609B2 JP 6464609 B2 JP6464609 B2 JP 6464609B2 JP 2014167568 A JP2014167568 A JP 2014167568A JP 2014167568 A JP2014167568 A JP 2014167568A JP 6464609 B2 JP6464609 B2 JP 6464609B2
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- pixels
- data
- target
- value
- 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.)
- Expired - Fee Related
Links
- 238000006243 chemical reaction Methods 0.000 claims description 26
- 238000000605 extraction Methods 0.000 claims description 18
- 238000002203 pretreatment Methods 0.000 claims description 2
- 238000000034 method Methods 0.000 description 43
- 230000008569 process Effects 0.000 description 38
- 239000000872 buffer Substances 0.000 description 21
- 230000008602 contraction Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 9
- 230000000052 comparative effect Effects 0.000 description 5
- 230000010339 dilation Effects 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 230000009467 reduction Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Images
Landscapes
- Image Input (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
本発明は、画像処理装置及びプログラムに関する。 The present invention relates to an image processing apparatus and a program.
下記特許文献1には、2値画像の画像処理に関して、着目画素とその周囲の画素の処理前の各画素値を入力とし計算によって各着目画素の処理後の画素値が決定される処理の高速化の手段として、画素値の計算処理を並列に行う方法が開示されている。
In
2値画像の膨張処理や収縮処理において、1個の処理回路で1個の着目画素の処理後の画素値を決定するする画像処理装置では、画像処理全体の高速化を目的として複数の着目画素について並列に処理を行うためには、並列に処理する着目画素の数に応じた数の処理回路を設けなければならず、並列処理性能の向上に伴う画像処理装置全体としての回路規模の増大が問題であった。 In an image processing apparatus that determines a pixel value after processing of one pixel of interest with one processing circuit in dilation processing or contraction processing of a binary image, a plurality of pixels of interest for the purpose of speeding up the entire image processing In order to perform processing in parallel, the number of processing circuits corresponding to the number of target pixels to be processed in parallel must be provided, and an increase in the circuit scale of the entire image processing apparatus accompanying improvement in parallel processing performance It was a problem.
本発明は、2値画像の並列処理性能を向上させた場合に、並列に処理する着目画素の数に応じた数の処理回路を設ける構成と比べて、回路規模の増大を低減することを目的とする。 An object of the present invention is to reduce an increase in circuit scale when improving the parallel processing performance of a binary image as compared with a configuration in which the number of processing circuits corresponding to the number of target pixels to be processed in parallel is provided. And
[画像処理装置]
請求項1に係る本発明は、2値画像データの同一ライン上の連続するN個(Nは2以上の整数)の画素をそれぞれ着目画素とし、前記2値画像データから、前記N個の着目画素及び当該N個の着目画素とライン上で隣接する2つの画素からなるN+2個の画素の第1の画素列と、前記第1の画素列とライン方向とは直交する2つの方向でそれぞれ隣接するN+2個の画素からなる第2及び第3の画素列と、の各画素値を、前回抽出した第1、第2及び第3の画素列とそれぞれ2画素ずつ重複するようにしてライン方向に順次抽出する抽出手段と、
前記抽出手段により抽出された前記第1、第2及び第3の画素列の各画素の値が入力され、前記N個の各着目画素の処理後の画素値を、前記着目画素及び当該着目画素の周囲の画素の処理前の画素値に基づいてそれぞれ決定する決定手段と、を備え
前記決定手段は、N+2個の画素からなる前記第1、第2及び第3の画素列の各画素値からなるそれぞれN+2ビットの各画素列データを、予め設定された論理に基づいてそれぞれNビット長の3つの中間データに変換する変換手段と、
前記変換手段により変換された3つの中間データ間の論理演算を行うことにより前記N個の注目画素の値を決定する論理演算手段とを備えた画像処理装置である。
[Image processing device]
According to the first aspect of the present invention, N consecutive pixels (N is an integer of 2 or more) on the same line of the binary image data are set as the target pixels, respectively, and the N target images are obtained from the binary image data. A first pixel column of N + 2 pixels composed of two pixels adjacent on the line with the pixel and the N pixels of interest, and adjacent in the two directions orthogonal to the first pixel column and the line direction, respectively. The pixel values of the second and third pixel columns composed of N + 2 pixels to be overlapped in the line direction so that each pixel value overlaps with the first, second, and third pixel columns extracted two times each. Extraction means for sequentially extracting;
The values of the pixels of the first, second, and third pixel columns extracted by the extraction unit are input, and the processed pixel values of the N target pixels are used as the target pixel and the target pixel. and a determination means for determining, respectively, based on the pixel values of the pre-treatment of pixels around the
The determining means is configured to store each N + 2 bit pixel column data composed of pixel values of the first, second and third pixel columns composed of N + 2 pixels based on a predetermined logic. Conversion means for converting the data into three long intermediate data;
The image processing apparatus includes: a logical operation unit that determines a value of the N target pixels by performing a logical operation between the three intermediate data converted by the conversion unit .
[プログラム]
請求項2に係る本発明は、2値画像データの同一ライン上の連続するN個(Nは2以上の整数)の画素をそれぞれ着目画素とし、前記2値画像データから、前記N個の着目画素及び当該N個の着目画素とライン上で隣接する2つの画素からなるN+2個の画素の第1の画素列の各画素値と、前記第1の画素列とライン方向とは直交する2つの方向でそれぞれ隣接するN+2個の画素からなる第2及び第3の画素列の各画素値とを、前回抽出した第1、第2及び第3の画素列とそれぞれ2画素ずつ重複するようにしてライン方向に順次抽出するステップと、
前記抽出された前記第1、第2及び第3の画素列の各画素値が入力され、前記N個の各着目画素の処理後の画素値を、前記着目画素及び当該着目画素の周囲の画素の処理前の画素値に基づいてそれぞれ決定する際に、N+2個の画素からなる前記第1、第2及び第3の画素列の各画素値からなるそれぞれN+2ビットの各画素列データを、予め設定された論理に基づいてそれぞれNビット長の3つの中間データに変換し、変換された3つの中間データ間の論理演算を行うことにより前記N個の注目画素の値を決定するステップと、
をコンピュータに実行させるためのプログラムである。
[program]
According to a second aspect of the present invention, N consecutive pixels (N is an integer of 2 or more) on the same line of binary image data are set as pixels of interest, and the N images of interest are extracted from the binary image data. Each pixel value of the first pixel column of N + 2 pixels including two pixels adjacent to the pixel and the N pixel of interest on the line, and the first pixel column and the line direction are orthogonal to each other. The pixel values of the second and third pixel columns, each of which is adjacent to each other in the direction, are overlapped by two pixels with the first, second, and third pixel columns extracted previously. Extracting sequentially in the line direction;
The extracted pixel values of the first, second, and third pixel columns are input, and the processed pixel value of each of the N target pixels is set as the target pixel and pixels around the target pixel. When determining each pixel value based on the pixel values before the processing, each N + 2 bit pixel column data composed of the pixel values of the first, second and third pixel columns composed of N + 2 pixels is preliminarily stored. Converting into three intermediate data each having a length of N bits based on the set logic, and determining the value of the N pixels of interest by performing a logical operation between the converted three intermediate data ;
Is a program for causing a computer to execute.
請求項1に係る本発明よれば、2値画像の画像処理の高速化のために並列に処理できる着目画素の数を増やす際に、並列に処理する着目画素の数に応じた数の画像処理回路を設ける場合と比べて、回路規模の増大を抑えることができる。 According to the first aspect of the present invention, when increasing the number of target pixels that can be processed in parallel for speeding up the image processing of a binary image, the number of image processes corresponding to the number of target pixels processed in parallel Compared to the case where a circuit is provided, an increase in circuit scale can be suppressed.
請求項2に係る本発明よれば、2値画像の画像処理の高速化のために並列に処理できる着目画素の数を増やす際に、並列に処理する着目画素の数に応じた数の画像処理回路を設ける場合と比べて、回路規模の増大を抑えることができる。 According the present invention according to claim 2, when increasing the number of the pixel of interest that can be processed in parallel for faster image processing a binary image, the number of image processing in accordance with the number of the target pixel to be processed in parallel Compared to the case where a circuit is provided, an increase in circuit scale can be suppressed.
[背景技術]
2値化された画像のノイズ低減の方法として、オープニング処理やクロージング処理が知られている。
[Background technology]
As a method for reducing noise in a binarized image, an opening process and a closing process are known.
オープニング処理及びクロージング処理はともに、膨張処理と収縮処理を同じ回数分交互に繰り返す処理であり、先に膨張処理を行ってから次に収縮処理を行うのがオープニング処理(図1)であり、先に収縮処理を行ってから次に膨張処理を行うのがクロージング処理である。 In both the opening process and the closing process, the expansion process and the contraction process are alternately repeated the same number of times. The expansion process is performed first and then the contraction process is performed. The closing process is performed after the contraction process is performed and then the expansion process is performed.
膨張処理及び収縮処理はともに、着目画素及びその周囲に8隣接している各画素の計9個の画素値に基づいて着目画素の処理後の画素値を決定する処理であり、9個の画素値の論理演算により着目画素の処理後の画素値が算出される。 Both the expansion process and the contraction process are processes for determining a pixel value after processing of the pixel of interest based on a total of nine pixel values of the pixel of interest and each of the eight adjacent pixels around the pixel of interest. A pixel value after processing of the pixel of interest is calculated by a logical operation of the value.
膨張処理は、着目画素の処理後の画素値を、9個の画素値が全て0の場合に0とし、それ以外の場合は1とするもので、9個の画素値の論理和の結果として着目画素の処理後の画素値が決定される(図2参照)。 In the dilation processing, the pixel value after the processing of the pixel of interest is set to 0 when all nine pixel values are 0, and is set to 1 otherwise, as a result of the logical sum of the nine pixel values. A pixel value after processing of the pixel of interest is determined (see FIG. 2).
収縮処理は、着目画素の処理後の画素値を、9個の画素値が全て1の場合に1とし、それ以外の場合は0とするもので、9個の画素値の論理積の結果として着目画素の処理後の画素値が決定される(図3参照)。 In the contraction process, the processed pixel value of the target pixel is set to 1 when all the nine pixel values are 1, and is set to 0 otherwise. As a result of the logical product of the nine pixel values, The pixel value after processing of the pixel of interest is determined (see FIG. 3).
以下、本発明を実施するための形態を詳細に説明する。但し、以下に示す実施形態は、本発明の技術思想を具体化するための画像処理装置の一例を示すものであって、本発明をこの実施形態に限定することを意図するものではなく、本発明は特許請求の範囲に示した技術思想を逸脱することなく種々の変更を行ったものにも均しく適用し得るものである。 Hereinafter, embodiments for carrying out the present invention will be described in detail. However, the embodiment described below shows an example of an image processing apparatus for embodying the technical idea of the present invention, and is not intended to limit the present invention to this embodiment. The invention can be equally applied to various modifications without departing from the technical idea shown in the claims.
[実施形態]
本実施形態では、2値画像データの膨張処理及び縮小処理を行う際に、一度の処理で同一ライン上に連続して存在する8個の着目画素について処理後の画素値を算出するようになされた画像処理装置100について説明する。
[Embodiment]
In the present embodiment, when performing binary image data expansion processing and reduction processing, pixel values after processing are calculated for eight pixels of interest that are continuously present on the same line in a single processing. The
画像処理装置100は、図4に示すように、データ入力部20と、画素列抽出部30と、画素値決定部40と、データ出力部50とを有している。更に、画素列抽出部30は、ラインバッファ11、12、13と、結合部21、22、23と、セレクタ31、32、33とを備え、画素値決定部40は、変換部41、42、43と、論理演算部44とを備えている。
As illustrated in FIG. 4, the
データ入力部20は入力された2値画像データを記憶しており、画素列抽出部30が、データ入力部20に記憶されている2値画像データから、処理対象の8個の着目画素及びその周囲の22個の画素からなる30個の画素(以下、「入力画素領域」ともいう)の画素値を3個の10ビット長データとして抽出する。
The
画素値決定部40は、入力画素領域の30個の画素値に基づいて8個の着目画素の処理後の画素値を特定の論理によって決定し、データ出力部50は、画素値決定部40によって決定された画素値から出力画像のデータを生成する。
The pixel
入力画素領域は、図5に示すように、現在処理中の着目画素が存在するライン(「Mライン」ともいう)上の画素、すなわち処理対象の8個の着目画素とそのライン方向において両隣に位置する画素からなる同一ライン上の10個の画素である第一の画素列と、それぞれ10個の画素であって、第一の画素列とライン方向と直交する方向で隣接する2つの画素列である第二の画素列及び第三の画素列と、に分けることができ、本実施形態においては第一の画素列よりも上(y座標が小さい)方のライン(「Uライン」ともいう)上の画素からなる画素列を第二の画素列、下(y座標が大きい)方のライン(「Bライン」ともいう)上の画素からなる画素列を第三の画素列として説明する。図5等においては、Uライン上の画素を「U+数字」で示し、Mライン上の画素を「M+数字」で示し、Bライン上の画素を「B+数字」で示している。 As shown in FIG. 5, the input pixel area is a pixel on a line (also referred to as “M line”) where the target pixel currently being processed exists, that is, eight target pixels to be processed and adjacent to each other in the line direction. A first pixel column, which is 10 pixels on the same line made up of positioned pixels, and two pixels that are each 10 pixels and are adjacent to the first pixel column in a direction orthogonal to the line direction The second pixel column and the third pixel column can be divided, and in the present embodiment, the line (also referred to as “U line”) that is higher than the first pixel column (y coordinate is smaller). ) A pixel column composed of upper pixels will be described as a second pixel column, and a pixel column composed of pixels on a lower (larger y coordinate) line (also referred to as “B line”) will be described as a third pixel column. In FIG. 5 and the like, pixels on the U line are indicated by “U + number”, pixels on the M line are indicated by “M + number”, and pixels on the B line are indicated by “B + number”.
以下、画像処理装置100において、データ入力部20に記憶される画像データから、出力画像データが生成されまるまでの処理の流れを説明する。
Hereinafter, the flow of processing in the
画像処理装置100では、画像がラスタースキャンされる際に各画素が走査される順に準じて、処理対象の画素の処理が行われる。
In the
すなわち、処理対象の画素が異なるライン上に存在する場合は、最もy座標の小さいライン上の画素から(画面表示上、最上のラインの画素から)処理を行い、同一ライン上の画素の処理が全て終わったら、その隣のy座標が一つ大きいライン上の画素の処理を順次行っていく、そして、同一ライン上の画素についてはx座標の小さい画素から(画面表示上、最左の画素から)順に処理する、というものである。 That is, when the pixel to be processed exists on a different line, processing is performed from the pixel on the line with the smallest y coordinate (from the pixel on the top line on the screen display), and the processing of the pixel on the same line is performed. When all the processing is completed, the pixels on the line having the next larger y coordinate are sequentially processed, and the pixels on the same line are processed from the pixel having the smaller x coordinate (from the leftmost pixel on the screen display). ) Process in order.
[画素列抽出]
画素列抽出部30においては、以下のようにして、データ入力部20に保持されている入力画像データから、入力画素領域の30個の画素値に基づいた3個の10ビット長データが生成される。
[Pixel Extraction]
In the pixel
ラインバッファ11、12、13はそれぞれ、入力画像データから同一ライン上の連続した8個の画素の画素値を取り込み、8ビット長データとして結合部21、22、23へ受け渡すラインバッファであり、ラインバッファ11にはUラインの画素の画素値が取り込まれ、ラインバッファ12にはMラインの画素の画素値が取り込まれ、ラインバッファ13にはBラインの画素の画素値が取り込まれる。
Each of the line buffers 11, 12, and 13 is a line buffer that takes in the pixel values of eight consecutive pixels on the same line from the input image data and passes them to the combining
結合部21、22、23には、前回処理の際にラインバッファ11、12、13から受け取っていた8ビット長データがそれぞれ保持されており、結合部21、22、23は、前回処理時の8ビット長データと、今回処理の際にラインバッファ11、12、13から受け取る8ビット長データとを結合させることで16ビット長データを生成する。
The combining
セレクタ31、32、33では、結合部21、22、23から受け取った16ビット長データから10ビット分を切り出すことで、それぞれ、第二の画素列、第一の画素列、第三の画素列の画素値と対応する(「画素値と対応する」とは、各画素の画素値を左から順番に並べてできる、ということを意味する)10ビット長データである、第二の画素列データ、第一の画素列データ、第三の画素列データが生成される。
In the
なお、前回処理時の8ビット長データと今回処理時の8ビット長データが結合されてできる16ビット長データからの10ビット長データの切り出し方は、図6に示すような、
(1) 前回処理時の8ビット全部 + 今回処理時の8ビットの最先2ビット
の10ビット分とする方法の他、例えば、
(2) 前回処理時の8ビットの最後2ビット + 今回処理時の8ビット全部
(3) 前回処理時の後半5ビット + 今回処理時の前半5ビット
といった複数の方法が考えられるが、いずれの方法によっても順次処理を行うことに伴い、各画素列は、最先2画素が前回処理における画素列の最後2画素と、最後2画素が次回処理における画素列の最先2画素と、それぞれ重複(オーバーラップ:図5、図7参照)することになる。
The method of extracting 10-bit length data from 16-bit length data formed by combining the 8-bit length data at the previous processing and the 8-bit length data at the current processing is as shown in FIG.
(1) All 8 bits at the time of previous processing + 10 bits of the first 2 bits of 8 bits at the time of current processing,
(2) The last 2 bits of 8 bits at the time of previous processing + all 8 bits at the time of current processing (3) The last 5 bits at the time of previous processing + The first 5 bits at the time of current processing As a result of sequential processing depending on the method, each of the pixel columns overlaps with the last two pixels of the last two pixels in the previous processing and the last two pixels of the last two pixels in the next processing. (Overlap: see FIGS. 5 and 7).
以降は、画素列抽出部30における処理について、上記(1)の方法で順次切り出す場合について、現在処理中の着目画素をM1〜M8とした場合で具体的に説明する。
Hereinafter, the processing in the pixel
ラインバッファ11にはU8〜U15の画素の画素値が取り込まれてU8〜U15の画素の画素値からなる8ビット長データが結合部21へ受け渡される。
The
結合部21では、図6に示すように、前回処理の際にラインバッファ11から受け取って保持していたU0〜U7の画素の画素値からなる8ビット長データと、今回の処理でラインバッファ11から受け取る8ビット長データとが結合されて、U0〜U15の画素の画素値からなる16ビット長データが生成されると共に、U8〜U15の画素の画素値からる8ビット長データが次回処理まで保持されることになる。
As shown in FIG. 6, the combining
そして、セレクタ31では、16ビット長データから先頭の10ビット分を切り出すことで、U0〜U9の画素の画素値からなる10ビット長データが、第二の画素列データとして生成される。
The
ここで、U0及びU1は前回処理における第二の画素列の最後2画素分と重複している。そして上記処理は、処理対象とする着目画素をライン方向に8画素分ずらした状態で繰り返されていくことになるため、最先の2画素と最後の2画素の重複も繰り返されていく。例えば、次回処理においては着目画素はM9〜M16となり第一の画素列はM8〜M17の10画素となるから、現在処理中の第二の画素列の最後2画素は、図7(A)、図7(B)に示すように、次回処理における第二の画素列の最先2画素と、U8及びU9として重複することになる。 Here, U0 and U1 overlap with the last two pixels of the second pixel row in the previous process. The above process is repeated with the target pixel to be processed shifted by 8 pixels in the line direction, so that the overlap between the first two pixels and the last two pixels is also repeated. For example, in the next processing, the target pixels are M9 to M16 and the first pixel column is 10 pixels M8 to M17. Therefore, the last two pixels of the second pixel column currently being processed are shown in FIG. As shown in FIG. 7B, the first two pixels in the second pixel column in the next processing overlap with U8 and U9.
第一の画素列及び第三の画素列についても、第二の画素列と同様にして、ラインバッファ12、結合部22、セレクタ32、及び、ラインバッファ13、結合部23、セレクタ33、を介して、それぞれM0〜M9の画素の画素値からなる第一の画素列データ、B0〜B9の画素の画素値からなる第三の画素列データが生成されると共に、各画素列の2画素分の重複が繰り返される。
Similarly to the second pixel column, the first pixel column and the third pixel column also pass through the
画素列抽出部30では、以上のようにして、30個の画素からなる入力画素領域の画素値を、第一の画素列データ、第二の画素列データ、第三の画素列データとして、順次抽出していく。
As described above, the pixel
上述のようにして画素列抽出部30で生成された3個の画素列データ(10ビット長)は、画素値決定部40へ入力される。
The three pixel column data (10-bit length) generated by the pixel
[画素値決定]
画素値決定部40は、10ビット長データを特定の論理で8ビット長データに変換するための変換テーブル(LUT:Look Up Table)を備えており、変換部41、42、43がそれぞれ、変換テーブルを参照することで、10ビット長データである第二の画素列データ、第一の画素列データ、第三の画素列データから、8ビット長データである、第二の中間データ、第一の中間データ、第三の中間データを生成する。
[Pixel value determination]
The pixel
なお、変換テーブルは以下の論理に基づいて作成されている。
(膨張処理の場合)
出力される8ビット長データのi番目(iは1≦i≦8を満たす整数、以下同じ)のビットの値OIiは、入力される10ビット長データのi番目〜i+2番目の3ビット長分のデータ値Iiによって、
Ii=000の場合、OIi=0
Ii≠000の場合、OIi=1
と定まる。
The conversion table is created based on the following logic.
(In the case of expansion processing)
The i-th bit value OI i of 8-bit length data to be output (i is an integer satisfying 1 ≦ i ≦ 8, the same applies hereinafter) is the i-th to i + 2-th 3-bit length of input 10-bit length data. By the minute data value I i ,
When I i = 000, OI i = 0
If I i ≠ 000, OI i = 1
It is determined.
これは、入力される10ビット長データのi番目の値をKi、i+1番目の値をKi+1、i+2番目の値をKi+2(但し、Ki、Ki+1、Ki+2はそれぞれ1か0の値)とした場合、すなわちIiがKiKi+1Ki+2と表記できる場合に、変換処理によって生成される8ビット長の中間データのi番目のビットの値であるOIiをそれぞれ、Ki、Ki+1、Ki+2の論理和として出力することに相当する。 This is because the i-th value of the input 10-bit length data is K i , the i + 1-th value is K i + 1 , and the i + 2-th value is K i + 2 (K i , K i + 1 , K i + 2 is a value of 1 or 0), that is, when I i can be expressed as K i K i + 1 K i + 2 , the i th of the 8-bit intermediate data generated by the conversion process bits of the value OI i, respectively, K i, which corresponds to outputting a logical sum of K i + 1, K i + 2.
(収縮処理の場合)
出力される8ビット長データのi番目のビットの値OIiは、入力される10ビット長データのi番目〜i+2番目の3ビット長分のデータ値Iiによって、
Ii=111の場合、OIi=1
Ii≠111の場合、OIi=0
と定まる。
(In case of shrinkage treatment)
The i-th bit value OI i of the 8-bit length data to be output is determined by the data values I i for the i-th to i + 2th 3-bit length of the input 10-bit length data,
When I i = 111, OI i = 1
If I i ≠ 111, OI i = 0
It is determined.
これは、入力される10ビット長データのi番目の値をKi、i+1番目の値をKi+1、i+2番目の値をKi+2とした場合、すなわちIiがKiKi+1Ki+2と表記できる場合に、変換処理によって生成されるNビット長の中間データのi番目のビットの値であるOIiを、それぞれKi、Ki+1、Ki+2の論理積として出力することに相当する。 This is because the i-th value of the input 10-bit length data is K i , the i + 1-th value is K i + 1 , and the i + 2-th value is K i + 2 , that is, I i is K i K i. When it can be expressed as +1 K i + 2 , OI i that is the value of the i-th bit of the N-bit intermediate data generated by the conversion process is represented by K i , K i + 1 , K i + 2 , respectively. It is equivalent to outputting as the logical product of.
すなわち、図7では、今回の処理(A)において、入力される10ビット長データである画素列データの1番目〜10番目のビットの値を、U0〜U9で示し、中間データの1番目〜8番目のビットの値を、A1〜A8で示しており、次回の処理(B)において、画素列データの1番目〜10番目ビットの値を、U8〜U17で示し、中間データの1番目〜8番目のビットの値を、A9〜A16で示したが、変換部41、42、43における10ビット長データから8ビット長データへの変換は、膨張処理であっても収縮処理であっても、中間データの各ビットの値が画素列データの3ビット分の値をそれぞれ論理演算することで得られる点において共通している。例えば、中間データの1ビット目の値A1は、入力される画素列データの1番目、2番目、3番目のビットの値である、U0、U1、U2の値の論理和(膨張処理の場合)又は論理積(縮小処理の場合)として出力される。
That is, in FIG. 7, in the current process (A), the values of the first to tenth bits of the pixel column data that is input 10-bit length data are indicated by U0 to U9, and the first to second intermediate data are displayed. The value of the eighth bit is indicated by A1 to A8. In the next processing (B), the value of the first to tenth bits of the pixel column data is indicated by U8 to U17, and the first to the intermediate data are indicated by Although the value of the eighth bit is indicated by A9 to A16, the conversion from the 10-bit length data to the 8-bit length data in the
ここで、中間データ生成部に入力されるデータが、0001110101というような10ビット長データである場合を例に詳しく説明する。 Here, the case where the data input to the intermediate data generation unit is 10-bit data such as 0001110101 will be described in detail.
膨張処理の場合の変換テーブルは、各OIiをそれぞれKi、Ki+1、Ki+2の論理和として出力することに相当し、
Ii=000の場合、OIi=0
Ii≠000の場合、OIi=1
によって定義される。
The conversion table in the case of expansion processing corresponds to outputting each OI i as the logical sum of K i , K i + 1 , K i + 2 , respectively.
When I i = 000, OI i = 0
If I i ≠ 000, OI i = 1
Defined by
従って、
I1=000、よって、OI1=0
I2=001、よって、OI2=1
I3=011、よって、OI3=1
I4=111、よって、OI4=1
I5=110、よって、OI5=1
I6=101、よって、OI6=1
I7=010、よって、OI7=1
I8=101、よって、OI8=1
となる。
Therefore,
I 1 = 000, so OI 1 = 0
I 2 = 001, so OI 2 = 1
I 3 = 011, so OI 3 = 1
I 4 = 111, so OI 4 = 1
I 5 = 110, so OI 5 = 1
I 6 = 101, so OI 6 = 1
I 7 = 010, so OI 7 = 1
I 8 = 101, so OI 8 = 1
It becomes.
すなわち、膨張処理用変換テーブルには、
入力:0001110101、に対して、出力:01111111、
と定めておくことになる。
That is, the expansion processing conversion table includes:
Input: 0001110101, output: 01111111,
It will be determined that.
収縮処理の場合の変換テーブルは、各OIiをそれぞれKi、Ki+1、Ki+2の論理積として出力することに相当し、
Ii=111の場合、OIi=1
Ii≠111の場合、OIi=0
によって定義される。
The conversion table in the case of contraction processing corresponds to outputting each OI i as a logical product of K i , K i + 1 , K i + 2 , respectively.
When I i = 111, OI i = 1
If I i ≠ 111, OI i = 0
Defined by
従って、
I1=000、よって、OI1=0
I2=001、よって、OI2=0
I3=011、よって、OI3=0
I4=111、よって、OI4=1
I5=110、よって、OI5=0
I6=101、よって、OI6=0
I7=010、よって、OI7=0
I8=101、よって、OI8=0
となる。
Therefore,
I 1 = 000, so OI 1 = 0
I 2 = 001, so OI 2 = 0
I 3 = 011, so OI 3 = 0
I 4 = 111, so OI 4 = 1
I 5 = 110, so OI 5 = 0
I 6 = 101, so OI 6 = 0
I 7 = 010, so OI 7 = 0
I 8 = 101, so OI 8 = 0
It becomes.
すなわち、収縮処理用変換テーブルには、
入力:0001110101、に対して、出力:00010000、
と定めておくことになる。
That is, in the conversion table for shrinkage processing,
Input: 0001110101, output: 00010000,
It will be determined that.
上述のようにして生成された3個の中間データ(8ビット長)は、論理演算部44へ受け渡され、論理演算部44では3個の中間データ間の論理演算によって1個の8ビット長データ(出力画素データ)を生成する。
The three intermediate data (8-bit length) generated as described above are transferred to the
出力画素データは、現在処理中の連続する8個の着目画素である着目画素列の処理後の画素値と対応しており、着目画素列の処理後の各画素値がライン方向に並んだ8ビット長データである。 The output pixel data corresponds to the processed pixel value of the target pixel column, which is the eight consecutive target pixels currently being processed, and the pixel values after processing of the target pixel column are arranged in the line direction. Bit length data.
3個の中間データ間の論理演算とは、具体的には、着目画素列のi番目の画素の処理後の画素値である、出力画素データのi番目のビットの値Oiが、入力される第一中間データ、第二中間データ、第三中間データのi番目の各ビットの値OI1i、OI2i、OI3iを入力とする論理演算によって決定されることを意味し、この論理演算は膨張処理の場合は論理和であり、収縮処理の場合は論理積である。 Specifically, the logical operation between the three pieces of intermediate data is input with the value O i of the i-th bit of the output pixel data, which is the pixel value after processing of the i-th pixel of the pixel row of interest. The first intermediate data, the second intermediate data, and the third intermediate data are determined by a logical operation that receives the values OI1 i , OI2 i , and OI3 i of each i-th bit of the third intermediate data. In the case of expansion processing, it is logical sum, and in the case of contraction processing, it is logical product.
すなわち、
(膨張処理の場合)
OI1i=OI2i=OI3iIi=0の場合、Oi=0
OI1i、OI2i、OI3iIiのいずれかが1の場合、Oi=1
と決定され、
(収縮処理の場合)
OI1i=OI2i=OI3iIi=1の場合、Oi=1
OI1i、OI2i、OI3iIiのいずれかが0の場合、Oi=0
と決定される。
That is,
(In the case of expansion processing)
If OI1 i = OI2 i = OI3 i I i = 0, then O i = 0
If any of OI1 i , OI2 i , OI3 i I i is 1, O i = 1
And determined
(In case of shrinkage treatment)
If OI1 i = OI2 i = OI3 i I i = 1, then O i = 1
If any of OI1 i , OI2 i , OI3 i I i is 0, O i = 0
Is determined.
ここで、入力画素領域が以下のような画素値である場合を例に、画素値決定部40における処理を具体的に説明する。
第二の画素列(U0〜U9):0010000111
第一の画素列(M0〜M9):1110000111
第三の画素列(B0〜B9):0001000111
※着目画素M1〜M8の画素値は、11000011となる
Here, the process in the pixel
Second pixel column (U0 to U9): 00100111
First pixel column (M0 to M9): 11100000111
Third pixel column (B0 to B9): 0001000111
* The pixel values of the target pixels M1 to M8 are 11000011.
(膨張処理の場合)
画素列抽出部30から受け渡された3個の10ビット長データは、変換部41、42、43で8ビット長データへそれぞれ変換される。
(In the case of expansion processing)
The three 10-bit length data transferred from the pixel
ここでは膨張処理であるため、Ki、Ki+1、Ki+2からOIiを導いた場合の論理演算は論理和であり、変換部41、42、43は、以下の定義、
Ii=000の場合、OIi=0
Ii≠000の場合、OIi=1
で定められた膨張処理用変換テーブルを参照する。
Here, since it is an expansion process, the logical operation when OI i is derived from K i , K i + 1 , K i + 2 is a logical sum, and the
When I i = 000, OI i = 0
If I i ≠ 000, OI i = 1
Refer to the expansion processing conversion table defined in (1).
従って、第一画素列データ(1110000111)から生成される第一中間データとしては11100111が出力され、第二画素列データ(00110000111)から生成される第二中間データとしては11100111が出力され、第三画素列データ(0001000111)から生成される第三中間データとしては01110111が出力される。
第二中間データ:11100111
第一中間データ:11100111
第三中間データ:01110111
Accordingly, 11100111 is output as the first intermediate data generated from the first pixel column data (1110000111), 11100111 is output as the second intermediate data generated from the second pixel column data (00110000111), and the third 01110111 is output as the third intermediate data generated from the pixel column data (0001000111).
Second intermediate data: 11100111
First intermediate data: 11100111
Third intermediate data: 01110111
論理演算部44では、第一中間データ、第二中間データ、第三中間データを入力として、1個の8ビット長データである出力画素データを論理演算によって生成するが、ここでは膨張処理であるため、出力データの各ビットの値を、入力される各データの各ビットの値から算出するための論理演算は論理和であり、
OI11=1、OI21=1、OI31=0、よって、O1=1
OI12=1、OI22=1、OI32=1、よって、O2=1
OI13=1、OI23=1、OI33=1、よって、O3=1
OI14=0、OI24=0、OI34=1、よって、O4=1
OI15=0、OI25=0、OI35=0、よって、O5=0
OI16=1、OI26=1、OI36=1、よって、O6=1
OI17=1、OI27=1、OI37=1、よって、O7=1
OI18=1、OI28=1、OI38=1、よって、O8=1
と決定され、出力画素データとして、「11110111」が出力される。
The
OI1 1 = 1, OI2 1 = 1, OI3 1 = 0, so O 1 = 1
OI1 2 = 1, OI2 2 = 1, OI3 2 = 1, and thus O 2 = 1
OI1 3 = 1, OI2 3 = 1, OI3 3 = 1, thus O 3 = 1
OI1 4 = 0, OI2 4 = 0, OI3 4 = 1, and thus O 4 = 1
OI1 5 = 0, OI2 5 = 0, OI3 5 = 0, thus O 5 = 0
OI1 6 = 1, OI2 6 = 1, OI3 6 = 1, thus O 6 = 1
OI1 7 = 1, OI2 7 = 1, OI3 7 = 1, thus O 7 = 1
OI1 8 = 1, OI2 8 = 1, OI3 8 = 1, thus O 8 = 1
And “11110111” is output as output pixel data.
(収縮処理の場合)
画素列抽出部30から受け渡された3個の10ビット長データは、変換部41、42、43で8ビット長データへそれぞれ変換されるが、ここでは収縮処理であるため、Ki、Ki+1、Ki+2からOIiを導く論理演算算は論理積であり、変換部41、42、43が参照する収縮処理用変換テーブルのロジックは、
Ii=111の場合、OIi=1
Ii≠111の場合、OIi=0
である。
(In case of shrinkage treatment)
Since three 10-bit length data transferred from the
When I i = 111, OI i = 1
If I i ≠ 111, OI i = 0
It is.
従って、第一中間データ、第二中間データ、第三中間データは、以下のとおりに出力される。
第二中間データ:00000001
第一中間データ:10000001
第三中間データ:00000001
Accordingly, the first intermediate data, the second intermediate data, and the third intermediate data are output as follows.
Second intermediate data: 00000001
First intermediate data: 10000001
Third intermediate data: 00000001
論理演算部44では、第一中間データ、第二中間データ、第三中間データを入力として、1個の8ビット長データである出力画素データを論理演算によって生成するが、ここでは膨張処理であるため、出力データの各ビットの値を、入力される各データの各ビットの値から算出するための論理演算は論理和であり、
OI11=1、OI21=1、OI31=0、よって、O1=1
OI12=1、OI22=1、OI32=1、よって、O2=1
OI13=1、OI23=1、OI33=1、よって、O3=1
OI14=0、OI24=0、OI34=1、よって、O4=1
OI15=0、OI25=0、OI35=0、よって、O5=0
OI16=1、OI26=1、OI36=1、よって、O6=1
OI17=1、OI27=1、OI37=1、よって、O7=1
OI18=1、OI28=1、OI38=1、よって、O8=1
と決定され、出力画素データとして、「11110111」が出力される。
The
OI1 1 = 1, OI2 1 = 1, OI3 1 = 0, so O 1 = 1
OI1 2 = 1, OI2 2 = 1, OI3 2 = 1, and thus O 2 = 1
OI1 3 = 1, OI2 3 = 1, OI3 3 = 1, thus O 3 = 1
OI1 4 = 0, OI2 4 = 0, OI3 4 = 1, and thus O 4 = 1
OI1 5 = 0, OI2 5 = 0, OI3 5 = 0, thus O 5 = 0
OI1 6 = 1, OI2 6 = 1, OI3 6 = 1, thus O 6 = 1
OI1 7 = 1, OI2 7 = 1, OI3 7 = 1, thus O 7 = 1
OI1 8 = 1, OI2 8 = 1, OI3 8 = 1, thus O 8 = 1
And “11110111” is output as output pixel data.
論理演算部44では、第一中間データ、第二中間データ、第三中間データを入力として、1個の8ビット長データである出力画素データを論理演算によって生成するが、ここでは収縮処理であるため、出力データの各ビットの値を、入力される各データの各ビットの値から算出するための論理演算は論理積であり、
OI11=1、OI21=0、OI31=0、よって、O1=0
OI12=0、OI22=0、OI32=0、よって、O2=0
OI13=0、OI23=0、OI33=0、よって、O3=0
OI14=0、OI24=0、OI34=0、よって、O4=0
OI15=0、OI25=0、OI35=0、よって、O5=0
OI16=0、OI26=0、OI36=0、よって、O6=0
OI17=0、OI27=0、OI37=0、よって、O7=0
OI18=1、OI28=1、OI38=1、よって、O8=1
と決定され、出力画素データとして、00000001が出力される。
The
OI1 1 = 1, OI2 1 = 0, OI3 1 = 0, thus O 1 = 0
OI1 2 = 0, OI2 2 = 0, OI3 2 = 0, thus O 2 = 0
OI1 3 = 0, OI2 3 = 0, OI3 3 = 0, thus O 3 = 0
OI1 4 = 0, OI2 4 = 0, OI3 4 = 0, and thus O 4 = 0
OI1 5 = 0, OI2 5 = 0, OI3 5 = 0, thus O 5 = 0
OI1 6 = 0, OI2 6 = 0, OI3 6 = 0, thus O 6 = 0
OI1 7 = 0, OI2 7 = 0, OI3 7 = 0, thus O 7 = 0
OI1 8 = 1, OI2 8 = 1, OI3 8 = 1, thus O 8 = 1
And 00000001 is output as output pixel data.
画素値決定部40では、以上のようにして、入力画素領域の各画素の画素値を入力として、着目画素の処理後の画素値を当該着目画素の周囲の画素の処理前の画素値に基づいて決定していく。
In the pixel
データ出力部50は、上述のようにして算出された、着目画素の処理後の画素値と対応する出力画素データを順次画素値決定部40から受け取り、出力画像データを生成する。
The
以上のようにして本実施形態に係る画像処理装置100は、入力画素領域を構成する30個の画素値を基に、8個の着目画素の処理後の値を一度に決定することができる。
As described above, the
本実施形態においては同時に処理する着目画素を8個とする場合の例を示したが、本発明においては同時に処理する着目画素の数に理論上の制限はなく、予め用意しておく変換テーブルの規模によって、同時に処理可能な着目画素の数を制御することができる。 In this embodiment, an example in which the number of target pixels to be processed simultaneously is eight has been shown. However, in the present invention, the number of target pixels to be processed simultaneously is not theoretically limited, and a conversion table prepared in advance is used. Depending on the scale, the number of pixels of interest that can be processed simultaneously can be controlled.
[比較例]
次に、2値画像の膨張処理、収縮処理に際して、一回の処理で1個の着目画素の処理を行う画像処理部120(実施形態に係る画像処理装置100における画素列抽出部30及び画素値決定部40に相当する)を有する、従来型の画像処理装置200について、図8を参照して説明する。
[Comparative example]
Next, the image processing unit 120 (the pixel
画像処理装置200は、画像処理部120の他、入力された画像データを記憶するデータ入力部110と、画像処理部120の出力する画素値を8個結合して8ビット長データを生成する結合部140と、結合部140の出力する8ビット長データを用いて出力画像データを生成するデータ出力部150を備えており、画像処理部120は、ラインバッファ111、112、113と、セレクタ121、122、123と、論理演算部124を有している
In addition to the
画像処理装置200は、1個の着目画素とその周囲の8近傍の画素の画素値を基に、当該着目画素の処理後の画素値を決定するものである。ラインバッファ111、112、113は、データ入力部110に記憶される入力画像データから同一ライン上の連続した8個の画素の画素値を取り込み、8ビット長データとしてセレクタ121、122、123へ受け渡すラインバッファであり、着目画素M1を含むMラインの画素は、ラインバッファ112に取り込まれ、Mラインより上方のUラインの画素はラインバッファ111に取り込まれ、Mラインより下方のBラインの画素はラインバッファ113に取り込まれる。
The
セレクタ121、122、123においては、ラインバッファ111、112、113から受け取った8ビット長データから、それぞれ、U0〜U2、M0〜M2、B0〜B2の画素の画素値からなる、先頭の3ビット分が切り出され、3個の3ビット長データが論理演算部124へ受け渡される。
In the
論理演算部124では、以上のようにして抽出された着目画素及びその8隣接画素(U0〜U2、M0〜M2、B0〜B2)の画素値について、膨張処理の場合は論理和をとり、収縮処理の場合は論理積をとることで、着目画素M1の処理後の画素値を出力する。
画像処理部120は、上記処理を着目画素M2〜M8について繰り返し、計8個分の着目画素の処理後の画素値を出力していく。
In the
The
結合部140では、順次出力される着目画素M1〜M8の処理後の画素値を結合することで8ビット長データを生成して出力画素データとしてデータ出力部150へ出力する。
The combining
データ出力部150は、実施形態に係るデータ出力部50と同様にして、出力画素データを順次結合部140から受け取り、出力画像データを生成する。
Similarly to the
次に、上述した画像処理装置200が備える、ラインバッファ111、112、113と、セレクタ121、122、123と、論理演算部124を有している画像処理部120を8個備え、8個の着目画素についての画素値の決定を並列に処理できるように為された、従来型の画像処理装置300について図9を参照して説明する。
Next, the
画像処理装置300は、8個の画像処理部120(以下、画像処理部120a〜画像処理部120hと区別する)を有し、画像処理の高速化のために8個の着目画素について並列に処理を行えるようになされており、その他に、8個の画像処理部120から同時に出力される8個の着目画素(M1〜M8)の処理後の画素値を結合して8ビット長データである出力画素データを生成する結合部240と、画像処理装置200と同様にデータ入力部110、データ出力部150を有している。
The
画像処理装置300においては、画像処理装置200において説明したようにして着目画素の処理後の画素値を出力する画像処理部120が8個あり、画像処理部120が並列に処理を行うことで、8個の着目画素(M1〜M8)について、同時に処理後の画素値が決定されて、結合部240に受け渡されることになる。
In the
以下、実施形態と同様の以下のような画素値の入力画素領域を処理対象とした場合の画像処理装置300における処理の流れを説明する。
第二の画素列(U0〜U9):0010000111
第一の画素列(M0〜M9):1110000111
第三の画素列(B0〜B9):0001000111
※着目画素M1〜M8の画素値は、11000011となる
Hereinafter, the flow of processing in the
Second pixel column (U0 to U9): 00100111
First pixel column (M0 to M9): 11100000111
Third pixel column (B0 to B9): 0001000111
* The pixel values of the target pixels M1 to M8 are 11000011.
(膨張処理)
[入力画素値抽出]
画像処理部120aは、データ入力部110に保持されている入力画像データから、1番目の着目画素M1とその8隣接画素とからなるU0〜U2、M0〜M2、B0〜B2、の画素値を抽出する。
(Expansion treatment)
[Input pixel value extraction]
The image processing unit 120a obtains pixel values of U0 to U2, M0 to M2, and B0 to B2 including the first pixel of interest M1 and its eight adjacent pixels from the input image data held in the
Uラインの画素値は0、0、1、Mラインの画素値は1、1、1、Bラインの画素値は0、0、0となるため、入力画素値として、0、0、1、1、1、1、0、0、0が得られる。 Since the pixel values of the U line are 0, 0, 1, and the pixel values of the M line are 1, 1, 1, and the pixel values of the B line are 0, 0, 0, the input pixel values are 0, 0, 1, 1, 1, 1, 0, 0, 0 are obtained.
[出力画素値算出]
次いで、画像処理部120aは、得られた9個の画素値について論理和を取ることで、着目画素の処理後の画素値を決定し、1番目の着目画素の処理後の画素値として、「1」を出力する。
[Output pixel value calculation]
Next, the image processing unit 120a determines the pixel value after processing of the target pixel by calculating the logical sum of the nine obtained pixel values, and sets the pixel value after processing of the first target pixel as “ 1 "is output.
そして画像処理装置300においては、残りの着目画素(M2〜M8)について並列に処理を行うため、画像処理部120b〜120hにおいても、画像処理部120aと同様の出力画素値の算出の処理が並行して行われる。
In the
画像処理部120b〜120hではそれぞれ、2〜8番目の各着目画素(M2〜M8)について、着目画素とその8隣接画素の各画素値を抽出した後、得られた9個の画素値について、論理和を取ることで、各着目画素の処理後の画素値を決定する。 In each of the image processing units 120b to 120h, for each of the second to eighth attention pixels (M2 to M8), after extracting the pixel values of the attention pixel and its eight adjacent pixels, the nine pixel values obtained are By taking a logical sum, the pixel value after processing of each pixel of interest is determined.
着目画素M2とその8隣接画素の画素値は、0、1、0、1、1、0、0、0、1であり、画像処理部120bは、2番目の着目画素M2の処理後の画素値として、「1」を出力する。 The pixel values of the pixel of interest M2 and its eight neighboring pixels are 0, 1, 0, 1, 1, 0, 0, 0, 1, and the image processing unit 120b performs pixel processing on the second pixel of interest M2. “1” is output as the value.
着目画素M3とその8隣接画素の画素値は、1、0、0、1、0、0、0、1、0であり、画像処理部120cは、3番目の着目画素M3の処理後の画素値として、「1」を出力する。 The pixel values of the pixel of interest M3 and its eight neighboring pixels are 1, 0, 0, 1, 0, 0, 0, 1, 0, and the image processing unit 120c performs pixel processing on the third pixel of interest M3. “1” is output as the value.
着目画素M4とその8隣接画素の画素値は、0、0、0、0、0、0、1、0、0であり、画像処理部120dは、4番目の着目画素M4の処理後の画素値として、「1」を出力する。 The pixel values of the pixel of interest M4 and its eight adjacent pixels are 0, 0, 0, 0, 0, 0, 1, 0, 0, and the image processing unit 120d performs pixel processing on the fourth pixel of interest M4. “1” is output as the value.
着目画素M5とその8隣接画素の画素値は、0、0、0、0、0、0、0、0、0であり、画像処理部120eは、5番目の着目画素M5の処理後の画素値として、「0」を出力する。 The pixel values of the pixel of interest M5 and its eight adjacent pixels are 0, 0, 0, 0, 0, 0, 0, 0, 0, and the image processing unit 120e is the pixel after processing of the fifth pixel of interest M5 “0” is output as the value.
着目画素M6とその8隣接画素の画素値は、0、0、1、0、0、1、0、0、1であり、画像処理部120fは、6番目の着目画素M6の処理後の画素値として、「1」を出力する。 The pixel values of the pixel of interest M6 and its eight adjacent pixels are 0, 0, 1, 0, 0, 1, 0, 0, 1, and the image processing unit 120f performs pixel processing on the sixth pixel of interest M6. “1” is output as the value.
着目画素M7とその8隣接画素の画素値は、0、1、1、0、1、1、0、1、1であり、画像処理部120gは、7番目の着目画素M7の処理後の画素値として、「1」を出力する。 The pixel values of the pixel of interest M7 and its eight neighboring pixels are 0, 1, 1, 0, 1, 1, 0, 1, 1, and the image processing unit 120g is a pixel after processing of the seventh pixel of interest M7. “1” is output as the value.
着目画素M8とその8隣接画素の画素値は、1、1、1、1、1、1、1、1、1であり、画像処理部120hは、8番目の着目画素M8の処理後の画素値として、「1」を出力する。 The pixel values of the pixel of interest M8 and its eight adjacent pixels are 1, 1, 1, 1, 1, 1, 1, 1, 1, and the image processing unit 120h is the pixel after processing of the eighth pixel of interest M8. “1” is output as the value.
[出力画素データ生成]
結合部240では、画像処理部120a〜120hがそれぞれ出力した画素値を入力として、各画素値を順番に並べることで8ビット長データ「11110111」生成し、出力画素データとして出力する。
[Output pixel data generation]
In the combining
(収縮処理)
次に、画像処理装置300において収縮処理を行い場合を説明するが、上述した膨張処理との違いは、[出力画素値算出]の際の論理演算として論理積を用いることのみであるため、[入力画素値抽出]の説明については省略する。
(Shrinkage treatment)
Next, the case where the
[出力画素値算出]
画像処理部120a〜120hはそれぞれ、得られた9個の画素値について論理積を取ることで、各着目画素の処理後の画素値を決定する。
[Output pixel value calculation]
Each of the image processing units 120a to 120h performs a logical product on the obtained nine pixel values, thereby determining a processed pixel value of each pixel of interest.
画像処理部120aは、1番目の着目画素の処理後の画素値として「0」を出力する。 The image processing unit 120a outputs “0” as the pixel value after processing of the first pixel of interest.
画像処理部120bは、2番目の着目画素の処理後の画素値として「0」を出力する。 The image processing unit 120b outputs “0” as the pixel value after processing of the second pixel of interest.
画像処理部120cは、3番目の着目画素の処理後の画素値として「0」を出力する。 The image processing unit 120c outputs “0” as the pixel value after processing of the third pixel of interest.
画像処理部120dは、4番目の着目画素の処理後の画素値として「0」を出力する。 The image processing unit 120d outputs “0” as the pixel value after processing of the fourth pixel of interest.
画像処理部120eは、5番目の着目画素の処理後の画素値として「0」を出力する。 The image processing unit 120e outputs “0” as the pixel value after processing of the fifth pixel of interest.
画像処理部120fは、6番目の着目画素の処理後の画素値として「0」を出力する。 The image processing unit 120f outputs “0” as the pixel value after processing of the sixth pixel of interest.
画像処理部120gは、7番目の着目画素の処理後の画素値として「0」を出力する。 The image processing unit 120g outputs “0” as the pixel value after processing of the seventh pixel of interest.
画像処理部120hは、8番目の着目画素の処理後の画素値として「1」を出力する。 The image processing unit 120h outputs “1” as the pixel value after processing of the eighth pixel of interest.
[出力画素データ生成]
結合部240では、画像処理部120a〜120hがそれぞれ出力した画素値を入力として、各画素値を順番に並べることで8ビット長データ「00000001」生成し、出力画素データとして出力する。
[Output pixel data generation]
The combining
[画像データ出力]
データ出力部150では、上述のようにして出力される出力画素データを順次受け取り、画像データを生成する。
[Image data output]
The
上述した比較例に示されるとおり、2値画像の画像処理において1個の処理回路(画像処理部120)で1個の着目画素を処理するように為されている従来型の画像処理装置においては、複数の着目画素について並列に処理できるようにするためには、並列に処理したい着目画素の個数分の処理回路が必要となる。 As shown in the comparative example described above, in a conventional image processing apparatus in which one processing circuit (image processing unit 120) processes one pixel of interest in binary image processing, In order to be able to process a plurality of target pixels in parallel, as many processing circuits as the number of target pixels to be processed in parallel are required.
一方、画像処理装置100として上記で説明した実施形態では、並列的に処理できる着目画素の数が増えても、比較例における画像処理部120に相当する、画素列抽出部30及び画素値決定部40を複数用意する必要はなく、変換テーブルさえ用意しておけば複数の着目画素の並列処理が可能であるため、処理性能を向上させた場合の回路規模の増大が抑えられている。
On the other hand, in the embodiment described above as the
100、200、300…画像処理装置
11、12、13、111、112、113…ラインバッファ
20、110…データ入力部
21、22、23、140、240…結合部
30…画素列抽出部
31、32、33、121、122、123…セレクタ
40…画素値決定部
41、42、43…変換部
44、124…論理演算部
50、150…データ出力部
120…画像処理部
DESCRIPTION OF
Claims (2)
前記抽出手段により抽出された前記第1、第2及び第3の画素列の各画素値が入力され、前記N個の各着目画素の処理後の画素値を、前記着目画素及び当該着目画素の周囲の画素の処理前の画素値に基づいてそれぞれ決定する決定手段と、を備え
前記決定手段は、N+2個の画素からなる前記第1、第2及び第3の画素列の各画素値からなるそれぞれN+2ビットの各画素列データを、予め設定された論理に基づいてそれぞれNビット長の3つの中間データに変換する変換手段と、
前記変換手段により変換された3つの中間データ間の論理演算を行うことにより前記N個の注目画素の値を決定する論理演算手段と、を備えた、
画像処理装置。 N consecutive pixels (N is an integer of 2 or more) on the same line of the binary image data are set as the target pixels, and the N target pixels and the N target pixels are determined from the binary image data. Each pixel value of the first pixel column of N + 2 pixels composed of two pixels adjacent on the line and N + 2 pixels adjacent to each other in two directions orthogonal to the first pixel column and the line direction Extraction means for sequentially extracting the respective pixel values of the second and third pixel columns comprising: in the line direction so as to overlap each of the first, second, and third pixel columns previously extracted by two pixels; ,
The pixel values of the first, second, and third pixel columns extracted by the extraction unit are input, and the processed pixel values of the N target pixels are determined as the target pixel and the target pixel. and a determination means for determining, respectively, based on the pixel values of the pre-treatment of the surrounding pixels
The determining means is configured to store each N + 2 bit pixel column data composed of pixel values of the first, second and third pixel columns composed of N + 2 pixels based on a predetermined logic. Conversion means for converting the data into three long intermediate data;
Logical operation means for determining a value of the N target pixels by performing a logical operation between the three intermediate data converted by the conversion means,
Image processing device.
抽出された前記第1、第2及び第3の画素列の各画素の値が入力され、前記N個の各着目画素の処理後の画素値を、前記着目画素及び当該着目画素の周囲の画素の処理前の画素値に基づいてそれぞれ決定する際に、N+2個の画素からなる前記第1、第2及び第3の画素列の各画素値からなるそれぞれN+2ビットの各画素列データを、予め設定された論理に基づいてそれぞれNビット長の3つの中間データに変換し、変換された3つの中間データ間の論理演算を行うことにより前記N個の注目画素の値を決定するステップと、
をコンピュータに実行させるためのプログラム。 N consecutive pixels (N is an integer of 2 or more) on the same line of the binary image data are set as the target pixels, and the N target pixels and the N target pixels are determined from the binary image data. A first pixel column of N + 2 pixels composed of two pixels adjacent on the line, and a second pixel composed of N + 2 pixels adjacent to each other in two directions orthogonal to the first pixel column and the line direction. And sequentially extracting the pixel values of the third pixel column and the third pixel column in the line direction so as to overlap each of the first, second, and third pixel columns extracted by two pixels,
The extracted pixel values of the first, second, and third pixel columns are input, and the processed pixel value of each of the N target pixels is used as the target pixel and pixels around the target pixel. When determining each pixel value based on the pixel values before the processing, each N + 2 bit pixel column data composed of the pixel values of the first, second and third pixel columns composed of N + 2 pixels is preliminarily stored. Converting into three intermediate data each having a length of N bits based on the set logic, and determining the value of the N pixels of interest by performing a logical operation between the converted three intermediate data ;
A program that causes a computer to execute.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014167568A JP6464609B2 (en) | 2014-08-20 | 2014-08-20 | Image processing apparatus and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014167568A JP6464609B2 (en) | 2014-08-20 | 2014-08-20 | Image processing apparatus and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2016045565A JP2016045565A (en) | 2016-04-04 |
| JP6464609B2 true JP6464609B2 (en) | 2019-02-06 |
Family
ID=55636114
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014167568A Expired - Fee Related JP6464609B2 (en) | 2014-08-20 | 2014-08-20 | Image processing apparatus and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6464609B2 (en) |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0227872A (en) * | 1988-07-18 | 1990-01-30 | Ricoh Co Ltd | Image quality improvement method |
| JP2005275679A (en) * | 2004-03-24 | 2005-10-06 | Fuji Xerox Co Ltd | Image processing device |
| US8107758B2 (en) * | 2008-04-16 | 2012-01-31 | Microsoft Corporation | Block based image processing |
| JP5147535B2 (en) * | 2008-05-20 | 2013-02-20 | キヤノン株式会社 | Image processing apparatus, image processing method, and program |
-
2014
- 2014-08-20 JP JP2014167568A patent/JP6464609B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2016045565A (en) | 2016-04-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10839483B2 (en) | Method of converting low-resolution image to high-resolution image and image conversion device performing method | |
| EP3819820B1 (en) | Method and apparatus for recognizing key identifier in video, device and storage medium | |
| US20200364377A1 (en) | Determining cryptographic operation masks for improving resistance to external monitoring attacks | |
| JPH0196771A (en) | Recognizing system for circular arc part | |
| CN105281894B (en) | Plaintext encryption method and system based on seven-order magic cube | |
| JP6062207B2 (en) | Image processing method and image processing apparatus | |
| CN108062759B (en) | A multi-pixel parallel labeling method and system for labeling binary images | |
| CN103996180A (en) | Paper-shredder broken-document restoration method based on English character characteristics | |
| Huang et al. | YOLO-Med: multi-task interaction network for biomedical images | |
| JP6464609B2 (en) | Image processing apparatus and program | |
| US20080056497A1 (en) | Method of generating anti-collusion fingerprint codes using | |
| KR102161746B1 (en) | Method for updating run length encoded stream and system therefor | |
| JPWO2016152190A1 (en) | Image processing apparatus, image processing system, and image processing method | |
| US20110110591A1 (en) | Multi-point image labeling method | |
| US9042651B2 (en) | Multi-point image labeling method | |
| CN116310306A (en) | Separation and extraction method of X-ray overlapped object | |
| JP2019016112A (en) | CONNECTED AREA LABELING DEVICE, METHOD, AND PROGRAM | |
| JP7106144B2 (en) | Image analysis device | |
| Akhila et al. | Image steganography using pixel value differencing with modulus function and optimization | |
| KR100808087B1 (en) | How to Render Maximum Maximum Projection Volume Rendering | |
| Chen et al. | Synchronous transmission of a Gong-Che notation musical score and its MIDI information | |
| JP2002305651A5 (en) | ||
| KR20100053298A (en) | Method for processing audio data, and audio data processing apparatus applying the same | |
| US20200193557A1 (en) | Image provision apparatus, image provision method, and computer readable medium | |
| TWI511072B (en) | Pathology data processing apparatus and methods |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170720 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180511 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180625 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180821 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20181211 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20181224 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6464609 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |