JPH02224188A - Device for counting black dots of binary image information - Google Patents
Device for counting black dots of binary image informationInfo
- Publication number
- JPH02224188A JPH02224188A JP4588089A JP4588089A JPH02224188A JP H02224188 A JPH02224188 A JP H02224188A JP 4588089 A JP4588089 A JP 4588089A JP 4588089 A JP4588089 A JP 4588089A JP H02224188 A JPH02224188 A JP H02224188A
- Authority
- JP
- Japan
- Prior art keywords
- image information
- area
- binary image
- dots
- rectangular area
- 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
Links
- 238000010586 diagram Methods 0.000 description 11
- 239000000284 extract Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は二値画像情報処理に利用する。本発明は二値画
像情報上の矩形領域の黒ドツトを計数するプログラム制
御に関する。DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention is applied to binary image information processing. The present invention relates to program control for counting black dots in a rectangular area on binary image information.
本発明は二値画像情報記憶領域に記憶された二値画像情
報上の矩形領域の黒ドツトを計数する二値画像情報黒ド
ツト計数装置において、二値画像情報に対して各行のサ
イズがワードサイズの整数倍になるようにして各行が必
ずワードの境界から始まるように行間に白ドツトを付加
して書込み、切出領域をワードサイズ単位に縦横にシフ
トして検索し、検索された切出領域に対して矩形領域部
分についてビットがオンに対応するデータと行単位に論
理積をとり黒ドツトを累計することにより、
二値画像情報上の矩形領域の黒ドツトを高速に計数でき
るようにしたものである。The present invention provides a binary image information black dot counting device that counts black dots in a rectangular area on binary image information stored in a binary image information storage area. Write by adding white dots between lines so that each line always starts from a word boundary, and search by shifting the cutout area vertically and horizontally in word size units, and search for the searched cutout area. The black dots in the rectangular area on the binary image information can be counted at high speed by logically ANDing the data corresponding to the bit turned on in the rectangular area part on a row-by-row basis and accumulating the black dots. It is.
従来、二値画像情報上の矩形領域の黒ドツトを計数する
ときには、ドツト単位に黒ドツトを計数している。すな
わち、第9図に示すように二値画像情報記憶領域上の矩
形領域の黒ドツトを1ドツトずつ計数している。Conventionally, when counting black dots in a rectangular area on binary image information, black dots are counted dot by dot. That is, as shown in FIG. 9, black dots in a rectangular area on the binary image information storage area are counted one by one.
従来の黒ドツトの計数動作では、矩形領域の情報がドツ
ト単位に扱われるために処理速度が遅くなる欠点がある
。The conventional black dot counting operation has the disadvantage that the processing speed is slow because the information in the rectangular area is handled in units of dots.
本発明はこのような欠点を除去するもので、二値画像情
報上の矩形領域の黒ドツトを高速に計数できる装置を提
供することを目的とする。SUMMARY OF THE INVENTION The present invention aims to eliminate such drawbacks and provides an apparatus that can quickly count black dots in a rectangular area on binary image information.
本発明は、二値画像情報記憶領域に記憶された二値画像
情報上の矩形領域の黒ドツトを計数する二値画像情報黒
ドツト計数装置において、二値画像情報を記憶する二値
画像情報展開領域を有する記憶手段と、外部から与えら
れた二値画像情報記憶領域上の二値画像情報に対して各
行がワード境界から始まるように行と行との間に白のド
ツトを付加して二値画像情報展開領域に書き込む書込手
段と、各行がワード境界から始まり一辺のドツト数がワ
ードサイズ分の正方形の領域である切出領域を二値画像
情報展開領域上の矩形領域の上端からワードサイズ単位
に縦または横にシフトして矩形領域全体を包含した検索
を行う検索手段と、この検索手段により検索された切出
領域に対して矩形領域部分についてビットがオンに対応
するデータと行単位に論理積をとり黒ドツトを累計する
黒ドツト計数手段とを備えたことを特徴とする。The present invention provides a binary image information black dot counting device that counts black dots in a rectangular area on binary image information stored in a binary image information storage area. storage means having a storage area, and binary image information provided from the outside on the storage area for binary image information by adding white dots between rows so that each row starts from a word boundary. A writing means for writing into the value image information development area, and a cutting area, which is a square area where each row starts from a word boundary and the number of dots on one side corresponds to the word size, from the upper end of the rectangular area on the binary image information development area. A search means that performs a search that includes the entire rectangular area by shifting vertically or horizontally in size units, and data and row units corresponding to bits being turned on for the rectangular area portion of the cut out area searched by this search means. and a black dot counting means for calculating the logical product and totaling the black dots.
書込手段が外部から与えられる二値画像情報記憶領域上
の二値画像情報に対して各行がワード境界から始まるよ
うに行と行の間に白のドツトを付加して記憶手段の二値
画像情報展開領域に書込み、検索手段が各行がワード境
界から始まり一辺のドツト数がワードサイズ分の正方形
の領域である切出領域を二値画像情報展開領域上の矩形
領域の上端からワードサイズ単位に縦または横にシフト
して矩形領域全体を包含した検索を行う。黒ドツト計数
手段がこの検索手段により検索された切出領域に対して
矩形領域部分についてビットがオンに対応するデータと
行単位に論理積をとり黒ドツトを累計する。The writing means writes a binary image in the storage means by adding white dots between the lines so that each line starts from a word boundary to the binary image information on the storage area for binary image information given from the outside. The information is written in the information development area, and the search means extracts a square area where each line starts from a word boundary and the number of dots on one side is equal to the word size, in word size units from the top of the rectangular area on the binary image information development area. Performs a search that includes the entire rectangular area by shifting vertically or horizontally. A black dot counting means performs logical AND on a row-by-row basis with data corresponding to bits being turned on in the rectangular region portion of the cut-out region searched by the search means, and accumulates black dots.
これにより、二値画像情報上の矩形領域の黒ドツトを高
速に計数することができる。Thereby, black dots in a rectangular area on binary image information can be counted at high speed.
次に本発明実施例について図面を参照して説明する。第
1図は本発明実施例の構成を示すブロック図である。Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.
本発明実施例は、二値画像情報を記憶する二値画像情報
展開領域11を有する記憶手段1と、外部から与えられ
た二値画像情報記憶領域20上の二値画像情報に対して
各行がワード境界からはじまる・ように行と行の間に白
のドツトを付加して二値画像情報展開領域11に書き込
む書込手段2と、各行がワード境界から始まり一辺のド
ツト数がワードサイズ分の正方形の領域である切出領域
を二値画像情報展開領域11上の矩形領域の上端からワ
ードサイズ単位に縦または横にシフトして矩形領域全体
を包含した検索を行う検索手段3と、この検索手段3に
より検索された切出領域に対して矩形領域部分について
ビットがオンに対応するデータと行単位に論理積をとり
黒ドツトを累計する黒ドツト計数手段4とを備える。The embodiment of the present invention has a storage means 1 having a binary image information expansion area 11 for storing binary image information, and a storage means 1 having a binary image information storage area 20 provided from the outside. A writing means 2 writes data into the binary image information development area 11 by adding white dots between lines starting from a word boundary, and each line starts from a word boundary and the number of dots on one side is equal to the word size. a search means 3 that performs a search that includes the entire rectangular area by vertically or horizontally shifting a cutout area that is a square area from the upper end of the rectangular area on the binary image information development area 11 in word size units; A black dot counting means 4 is provided for performing a logical AND operation on a row-by-row basis with data whose bits correspond to ON in a rectangular region with respect to the cut-out region searched by the means 3, and totaling black dots.
第2図は本発明実施例の書込手段2の書込み動作を示す
図である。この書込手段2は、二値画像情報記憶領域2
0上の二値画像情報の各行のサイズがワードサイズの整
数倍になるように各行、の最後に白のドツトを付加して
二値画像情報展開領域11上に二値画像情報を出力する
。FIG. 2 is a diagram showing the write operation of the write means 2 according to the embodiment of the present invention. This writing means 2 includes a binary image information storage area 2
A white dot is added to the end of each line so that the size of each line of the binary image information on 0 is an integral multiple of the word size, and the binary image information is output onto the binary image information development area 11.
第3図は本発明実施例の検索手段3の検索動作を説明す
る図である。FIG. 3 is a diagram illustrating the search operation of the search means 3 according to the embodiment of the present invention.
この検索手段3は、二値画像情報展開領域11上の矩形
領域12全体を含むように矩形領域12の上端から切出
領域13を移動して二値画像情報展開領域11上を参照
する。The search means 3 moves the cutout area 13 from the upper end of the rectangular area 12 so as to include the entire rectangular area 12 on the binary image information expansion area 11, and refers to the binary image information expansion area 11.
第4図は本発明実施例の黒ドツト計数手段4の計数動作
を説明する図である。この黒ドツト計数手段4は、矩形
領域12の部分がオンに対応したレジスタ5のデータと
行ごとにワード単位の論理積をとりレジスタ5のオンの
ビットを累計する。FIG. 4 is a diagram illustrating the counting operation of the black dot counting means 4 according to the embodiment of the present invention. The black dot counting means 4 performs logical AND for each row with the data in the register 5 corresponding to the on state in the rectangular area 12, and accumulates the number of on bits in the register 5.
次に、このように構成された本発明実施例の動作につい
て説明する。Next, the operation of the embodiment of the present invention configured as described above will be explained.
第5図は本発明実施例の書込手段2における外部から与
えられた二値画像情報記憶領域20上の二値画像情報に
対して各行がワード境界から始まるように行と行の間に
白のドツトを付加して二値画像情報展開領域11への書
込みを行う動作の流れ図である。二値画像情報記憶領域
20上の二値画像情報の横のドツト数を1ワ一ド分のド
ツト数で割った余りを1ワ一ド分のドツト数から引くと
、行と行の間に付加する白のドツトが求められる(ステ
ップ51)。二値画像情報記憶領域20上の行位置Iが
二値画像情報の先頭の行となり(ステップ52)、二値
画像情報記憶領域20上の二値画像情報のI行目の最後
にステップ51で求めたドツト数にだけ白のドツトが付
加されて二値画像情報展開領域11上の二値画像情報の
■行目に出力される(ステップ53〜ステツプ55)。FIG. 5 shows the binary image information on the binary image information storage area 20 given from the outside in the writing means 2 of the embodiment of the present invention, with white space between the lines so that each line starts from a word boundary. 2 is a flowchart of an operation for adding dots and writing to the binary image information development area 11. When the number of horizontal dots of the binary image information on the binary image information storage area 20 is divided by the number of dots for one word and the remainder is subtracted from the number of dots for one word, A white dot to be added is determined (step 51). The line position I on the binary image information storage area 20 becomes the first line of the binary image information (step 52), and the line position I on the binary image information storage area 20 becomes the first line of the binary image information (step 51). White dots are added to the determined number of dots and output to the second row of the binary image information on the binary image information development area 11 (steps 53 to 55).
次に、二値画像情報記憶領域20上の二値画像情報の行
位置■を1つ進め、二値画像情報記憶領域20上の二値
画像情報の行数を越えるまでステップ53〜ステツプ5
7を繰り返す。Next, the line position ■ of the binary image information on the binary image information storage area 20 is advanced by one, and steps 53 to 5 are carried out until the number of lines of the binary image information on the binary image information storage area 20 is exceeded.
Repeat step 7.
第6図は本発明実施例の検索手段3の各行がワード境界
から始まり一辺のドツト数がワードサイズ分の正方形の
領域である切出領域13を二値画像情報展開領域11上
の矩形領域12の上端からワードサイズ単位に縦または
横にシフトして矩形領域12全体を包含した検索の流れ
を示す流れ図である。FIG. 6 shows that each row of the search means 3 according to the embodiment of the present invention cuts out a cutout area 13, which is a square area starting from a word boundary and having the number of dots on one side equal to the word size, into a rectangular area 12 on the binary image information development area 11. 12 is a flowchart showing the flow of a search that includes the entire rectangular area 12 by shifting vertically or horizontally in word size units from the upper end of the rectangular area 12.
まず矩形領域の黒ドツト数0が0となり(ステップ61
)、二値画像情報展開領域ll上の行位置りが矩形領域
12の先頭の行となる(ステップ62)。次いで二値画
像情報展開領域11上の矩形領域12の左端を含む切出
領域13の左端位置Mが求まり(ステップ63)、黒ド
ツト計数手段4が起動され(ステップ64)、切出領域
13の左端位置を1ワ一ド分のドツト数を進め、矩形領
域12の右端を含む切出領域13までステップ65〜ス
テツプ66を繰り返す。そして、切出領域13の上端位
置を1ワ一ド分のドツト数進め、矩形領域12の下端を
含む切出領域13までステップ63〜ステツプ68を繰
り返す。First, the number of black dots in the rectangular area becomes 0 (step 61
), the line position on the binary image information expansion area ll becomes the first line of the rectangular area 12 (step 62). Next, the left end position M of the cut-out area 13 including the left end of the rectangular area 12 on the binary image information development area 11 is determined (step 63), and the black dot counting means 4 is activated (step 64). The left end position is advanced by the number of dots by one word, and steps 65 and 66 are repeated until the cutout area 13 including the right end of the rectangular area 12 is reached. Then, the upper end position of the cutout region 13 is advanced by the number of dots equivalent to one word, and steps 63 to 68 are repeated until the cutout region 13 including the lower end of the rectangular region 12 is reached.
第7図は本発明実施例の検索手段3により起動された黒
ドツト計数手段4の検索手段3において検索された切出
領域13に対して矩形領域12の部分についてビットが
オンに対応するデータと行単位に論理積をとり黒ドツト
を累計する流れを示す流れ図である。切出領域13内の
行位置Nが切出領域の先頭の行となり(ステップ71)
、切出領域13に含まれる矩形領域12の黒ドツトが計
数される(ステップ72〜ステツプ74)。次いで切出
領域13内の行位置Nを1つ進め(ステップ75、ステ
ップ76)、1ワ一ド分のドツト数を越えるまでステッ
プ72〜ステツプ76を繰り返す。FIG. 7 shows data corresponding to bits being turned on in the rectangular area 12 for the cutout area 13 searched by the search unit 3 of the black dot counting unit 4 activated by the search unit 3 of the embodiment of the present invention. 12 is a flowchart showing the flow of calculating logical product on a row-by-row basis and summing up black dots. The line position N in the cutout area 13 becomes the first line of the cutout area (step 71).
, black dots in the rectangular area 12 included in the cutout area 13 are counted (steps 72 to 74). Next, the row position N in the cutting area 13 is advanced by one (steps 75 and 76), and steps 72 to 76 are repeated until the number of dots exceeds one word.
第8図は本発明実施例における画像の計数例を示す図で
、左に示す二値画像情報記憶領域20上の矩形領域の情
報に対し、右に示すように黒ドツトが計数される。FIG. 8 is a diagram showing an example of image counting in the embodiment of the present invention, in which black dots are counted as shown on the right for information in a rectangular area on the binary image information storage area 20 shown on the left.
なお、第4図でワードサイズを4としているがワードサ
イズは4以外の正数であってもよい。In addition, although the word size is set to 4 in FIG. 4, the word size may be a positive number other than 4.
以上説明したように本発明によれば、二値画像情報上の
矩形領域の黒ドツトを高速に計数できる効果がある。As explained above, according to the present invention, black dots in a rectangular area on binary image information can be counted at high speed.
第1図は本発明実施例の構成を示すブロック図。
第2図は本発明実施例の書込手段の書込み動作の説明図
。
第3図は本発明実施例の検索手段の検索動作を説明する
図。
第4図(a)〜((至)は本発明実施例の黒ドツト計数
手段の計数動作を説明する図。
第5図は本発明実施例の書込手段の動作の流れを示す流
れ図。
第6図は本発明実施例の検索手段の動作の流れを示す流
れ図。
第7図は本発明実施例の黒ドツト計数手段の動作の流れ
を示す流れ図。
第8図は本発明実施例における画像の計数例を示す図。
第9図は従来例における画像の計数例を示す図。
1・・・記憶手段、2・・・書込手段、3・・・検索手
段、4・・・黒ドツト計数手段、5・・・レジスタ、1
1・・・二値画像情報展開領域、12・・・矩形領域、
13・・・切出領域、20・・・二値画像情報記憶領域
。FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. FIG. 2 is an explanatory diagram of the write operation of the write means according to the embodiment of the present invention. FIG. 3 is a diagram explaining the search operation of the search means according to the embodiment of the present invention. FIGS. 4(a) to 4(-) are diagrams explaining the counting operation of the black dot counting means of the embodiment of the present invention. FIG. 5 is a flowchart showing the flow of the operation of the writing means of the embodiment of the present invention. Figure 6 is a flowchart showing the flow of operation of the retrieval means in the embodiment of the present invention. Figure 7 is a flowchart showing the flow of operation of the black dot counting means in the embodiment of the invention. A diagram showing an example of counting. Fig. 9 is a diagram showing an example of counting images in a conventional example. 1... Storage means, 2... Writing means, 3... Searching means, 4... Black dot counting. Means, 5...Register, 1
1... Binary image information development area, 12... Rectangular area,
13... Cutout area, 20... Binary image information storage area.
Claims (1)
の矩形領域の黒ドットを計数する二値画像情報黒ドット
計数装置において、 二値画像情報を記憶する二値画像情報展開領域を有する
記憶手段と、 外部から与えられた二値画像情報記憶領域上の二値画像
情報に対して各行がワード境界から始まるように行と行
との間に白のドットを付加して二値画像情報展開領域に
書き込む書込手段と、各行がワード境界から始まり一辺
のドット数がワードサイズ分の正方形の領域である切出
領域を二値画像情報展開領域上の矩形領域の上端からワ
ードサイズ単位に縦または横にシフトして矩形領域全体
を包含した検索を行う検索手段と、 この検索手段により検索された切出領域に対して矩形領
域部分についてビットがオンに対応するデータと行単位
に論理積をとり黒ドットを累計する黒ドット計数手段と を備えたことを特徴とする二値画像情報黒ドット計数装
置。[Claims] 1. In a binary image information black dot counting device that counts black dots in a rectangular area on binary image information stored in a binary image information storage area, A storage means having a value image information development area, and a white dot between the lines so that each line starts from a word boundary for the binary image information on the binary image information storage area given from the outside. A writing means for adding and writing into the binary image information development area, and a cutting area, which is a square area where each row starts from a word boundary and the number of dots on one side is equal to the word size, into a rectangular area on the binary image information development area. a search means that performs a search that includes the entire rectangular area by shifting vertically or horizontally from the upper end in word size units, and a bit corresponding to the rectangular area portion being turned on for the cutout area searched by this search means. A binary image information black dot counting device characterized by comprising black dot counting means for performing logical product on data and row by row and accumulating black dots.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4588089A JPH02224188A (en) | 1989-02-27 | 1989-02-27 | Device for counting black dots of binary image information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4588089A JPH02224188A (en) | 1989-02-27 | 1989-02-27 | Device for counting black dots of binary image information |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH02224188A true JPH02224188A (en) | 1990-09-06 |
Family
ID=12731541
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP4588089A Pending JPH02224188A (en) | 1989-02-27 | 1989-02-27 | Device for counting black dots of binary image information |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH02224188A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1998009248A1 (en) * | 1996-08-27 | 1998-03-05 | Centurfax Limited | Apparatus for measuring percentage dot in printing and the like applications |
-
1989
- 1989-02-27 JP JP4588089A patent/JPH02224188A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1998009248A1 (en) * | 1996-08-27 | 1998-03-05 | Centurfax Limited | Apparatus for measuring percentage dot in printing and the like applications |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US3648254A (en) | High-speed associative memory | |
JPH02228879A (en) | Method of compacting data | |
JPH02224188A (en) | Device for counting black dots of binary image information | |
JPS594706B2 (en) | Print pattern generator | |
JPH02255989A (en) | Binary picture information extracting device | |
JP2853321B2 (en) | Binary image information synthesis method | |
JPH01133182A (en) | Binary image information erasing system | |
JPH0528646A (en) | Method for setting alternation sector | |
KR20010056528A (en) | Data tiling method for retrieving and handling large volume of data | |
JPH03278279A (en) | Copying system for binary image information | |
JP2765051B2 (en) | Combination method of binary image information | |
JPH0520144A (en) | Data access system | |
JPS6266326A (en) | Array processing system for japanese data | |
JPH03232072A (en) | System for moving binary picture information | |
JPS6398785A (en) | Inverting system for binary picture information | |
JPS63239521A (en) | Data processing system for magnetic tape device | |
JPH0245172A (en) | Printer | |
JPH03260870A (en) | Projection system for data base assist | |
JPH0596811A (en) | Printing method | |
JPH05216724A (en) | File memory device | |
JPH0766349B2 (en) | Shifter circuit | |
JPS5922983B2 (en) | Information processing method | |
JPH04340664A (en) | Shape data management device | |
JPS63131247A (en) | Garbage collection system | |
JPS6051924A (en) | External character access system |