JPS62169279A - Picture data processing method - Google Patents
Picture data processing methodInfo
- Publication number
- JPS62169279A JPS62169279A JP1013586A JP1013586A JPS62169279A JP S62169279 A JPS62169279 A JP S62169279A JP 1013586 A JP1013586 A JP 1013586A JP 1013586 A JP1013586 A JP 1013586A JP S62169279 A JPS62169279 A JP S62169279A
- Authority
- JP
- Japan
- Prior art keywords
- picture
- objects
- image
- image data
- processing method
- 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
- 238000003672 processing method Methods 0.000 title claims description 6
- 238000000034 method Methods 0.000 claims description 6
- 238000003384 imaging method Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 6
- 238000002372 labelling Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 241000726096 Aratinga Species 0.000 description 1
- 230000008033 biological extinction Effects 0.000 description 1
- 241000894007 species Species 0.000 description 1
- 238000009987 spinning Methods 0.000 description 1
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、画像データの処理方法に係り、特に曲面を有
する物体の数を求めるに好適な画像データ処理方法に関
する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an image data processing method, and particularly to an image data processing method suitable for determining the number of objects having curved surfaces.
従来、処理すべき物体を撮像し、二の撮像によって得ら
nた画像データを2値化処理し、2値化処理後の画像デ
ータにおける島を求め、この島にラベルを付すことによ
って、島の数を求めること更には島の平均面積を求める
こと等の画像データ処理が実施されている。Conventionally, an object to be processed is imaged, the image data obtained by the second imaging process is binarized, an island is found in the image data after the binarization process, and a label is attached to the island. Image data processing such as determining the number of islands and further determining the average area of the islands has been carried out.
例えば、特開昭58−37773号においては1つの画
面内の複数個のパターンとして存在する各局に対し、ラ
ベル付けを行い、島同志が連結されているか否かをチェ
フクする技術が開示さnている。For example, Japanese Patent Application Laid-open No. 58-37773 discloses a technique for labeling each station that exists as multiple patterns on one screen and checking whether or not islands are connected. There is.
しかし、連結さnたものが本当に1つの島であるか、複
数の島が隣接している為に連結した島と認識されている
のかについての判断はできず、この点における配慮がな
されていない。However, it is not possible to determine whether the connected islands are really one island or whether they are recognized as connected islands because they are adjacent to each other, and no consideration has been given to this point. .
上記した如き従来技術においては、連結された島として
認識さnたものが、本当に1つの島として良いものなの
か、そnとも複数の物体が近接している為に1つの島と
して認識しているものなのかの判断はできない。この結
果、画像処理によって得らnた島の数によって画像内の
物体の実際の数を認識することができない。認識したと
してもそnは不正確なものとなる。また、画像内の物体
の平均面禎や周囲長等を求める場合、実際の物体数を島
の数から求めようとすnば正確な値が得られない。In the above-mentioned conventional technology, it is difficult to know whether what is recognized as a connected island is actually a single island, or whether it is recognized as a single island because multiple objects are close to each other. It is not possible to determine whether it is present or not. As a result, the actual number of objects in the image cannot be recognized by the number of islands obtained by image processing. Even if it is recognized, it will be inaccurate. Further, when calculating the average surface area, circumference, etc. of objects in an image, accurate values cannot be obtained if the actual number of objects is calculated from the number of islands.
本発明の目的は、連結された島から正確な物体数を得る
ことのできる画像データ処理方法を提供することである
。An object of the present invention is to provide an image data processing method that can obtain an accurate number of objects from connected islands.
上記目的は、島の中に含まれる高輝度エリアの数を求め
、その数により、連結した島を分離する事により、達成
される。The above objective is achieved by determining the number of high brightness areas included in an island and separating connected islands based on that number.
すなわち、第3図のような画像を白と黒に分ける2値化
をした場合、物体からの鏡面反射により高輝度エリア(
穴部)が生じ、第4図のようになる。物体がm独で存在
する場合は、島は独立し、鏡面反射による穴(高輝度エ
リア)も1つとなる。In other words, when an image like the one shown in Figure 3 is binarized into white and black, high brightness areas (
A hole) is formed, as shown in Figure 4. When there are only one object, each island is independent and there is only one hole (high brightness area) due to specular reflection.
また、物体が隣接した場合は、物体の影により2値化し
た像は連結さn1見かけ上1つの島になる。しかし、鏡
面反射による穴部は、互いに独立しており、2値化前の
特徴を表わしている。Further, when objects are adjacent to each other, the binarized images due to the shadows of the objects are connected n1 to apparently become one island. However, the holes caused by specular reflection are independent of each other and represent the characteristics before binarization.
従って、独立した高輝度エリア(穴)を計数する事によ
り、正確な島の数を求めることができ、物体の正確な数
の認識ができる。Therefore, by counting the independent high-intensity areas (holes), the accurate number of islands can be determined, and the accurate number of objects can be recognized.
上記したように、2値化処理後の画像データから得られ
る島について、各局の内側の高輝度エリアの数を求める
ことによって、複数の物体が接近していても、その複数
の物体数を求めることができる。これによって、画像内
の物体の正確な数値を得ることができる。As mentioned above, by calculating the number of high brightness areas inside each station for the island obtained from the image data after binarization processing, even if multiple objects are close, the number of multiple objects can be calculated. be able to. This allows accurate numerical values of objects within the image to be obtained.
以下、本発明の一実施例を説明する。 An embodiment of the present invention will be described below.
第2図は、本発明の対象となる映像処理装置の構成例で
ある。対象物の像を電気的映像信号に変換する撮像装置
として、TVカメラ11が設置され、前記TVカメラ1
1から出力さnる映像信号を映像処理装置11の画像入
力部nで、°1”又°0”のデジタル信号に変換する。FIG. 2 shows a configuration example of a video processing device to which the present invention is applied. A TV camera 11 is installed as an imaging device that converts an image of an object into an electrical video signal.
The image input section n of the video processing device 11 converts the video signal outputted from 1 into a digital signal of 0.degree.1" or 0.0".
画像人力部丘で、デジタル信号に変換さnた映像信号は
、切替回路13を介して、画像メモリ14に入力される
。一画面分の入力が完了すると、画像メモリ14へのT
Vカメラ11からの入力は、切替回路により、遮断され
、演算プロセッサ15からのアクセスが可能なように切
替えらnる。The video signal converted into a digital signal at the image processing department is input to the image memory 14 via the switching circuit 13. When the input for one screen is completed, T is stored in the image memory 14.
The input from the V-camera 11 is blocked by a switching circuit and switched to allow access from the arithmetic processor 15.
演算プロセッサ15は、画像メモリ14より@ 1゜又
は”O′の値を読出して、RAMメモリ19の中に、第
5図のようにラベル付(符号付)を行う。The arithmetic processor 15 reads the value of @1° or "O" from the image memory 14 and labels (signs) it in the RAM memory 19 as shown in FIG.
ラベル付の操作は、第1A図および第1B図のフローチ
ャートのような手順で行う。The labeling operation is performed according to the procedure shown in the flowcharts of FIGS. 1A and 1B.
まず、画像メモリ14内に記憶さnたデータは、第5図
のラベルの付いていない状態に相当し、ハツチング部が
メモリ上の°l°、ハブチング無が”0“を意味し、図
のように配列されている。First, the data stored in the image memory 14 corresponds to the unlabeled state in FIG. They are arranged as follows.
画像プロセッサ15は、テレビの水平走査線と同様にY
軸を固定し、X軸方向にメモリを読出してゆく。The image processor 15 uses Y
The axis is fixed and the memory is read in the X-axis direction.
まず、画面の端が“1″かどうかを調べ、1”であnば
、°O”から′1°に変化したものとして、RAMメモ
リー19内の変化点テーブルに、X座標アドレスを書込
む。また、” 1°でなかった場合は、′1mを発見す
る迄、順次読出アドレスを更新してゆき、発見した時点
で変化点テーブルに、X座標アドレス値を書込む(第1
A図のステップF101〜F107の処理)。°l″が
発見された後は、同様に“1”から”0”に変化する点
を捜して画像メモリ14の読出Xアドレスを増加し、変
化点を検知した時点で変化点テーブルにアドレス値を書
込む(第1A図、第1B図のFIO8〜F113の処理
)。次は、“ 1”その次は10”の順にくり返してゆ
き、画像メモリ14のX座標最終アドレス検知で、X最
終アドレス値を変化点テーブルに誓込む(F102.F
201.F108、F201の処理)。First, check whether the edge of the screen is "1", and if it is "1", write the X coordinate address into the change point table in the RAM memory 19, assuming that the edge has changed from "°O" to '1°. . In addition, if it is not ``1 degree,'' update the read address sequentially until ``1 m is found, and at the time it is found, write the X coordinate address value in the change point table (first
Processing of steps F101 to F107 in Figure A). After "°l" is discovered, similarly search for a point that changes from "1" to "0" and increase the readout X address of the image memory 14, and when a change point is detected, the address value is added to the change point table. (processing of FIO8 to F113 in Figures 1A and 1B).Next, it repeats in the order of "1" and then 10, and when the X coordinate final address of the image memory 14 is detected, the X final address is written. Insert the value into the change point table (F102.F
201. Processing of F108 and F201).
このようにして、1ライン完了するとY軸アドレスを1
段ずつずらせてゆき、同様に変化点テーブルに記録して
ゆく。In this way, when one line is completed, the Y-axis address is set to 1.
Shift it step by step and record it in the change point table in the same way.
変化点テーブルは、第6図のようにY軸毎に割当られて
おり、°0″から“1”への変化、1゜から”0°への
変化(以降鳴り返し)のように格納アドレスが決ってい
る。The change point table is assigned to each Y axis as shown in Figure 6, and storage addresses are assigned for each Y axis, such as a change from °0" to "1" and a change from 1° to "0° (hereinafter referred to as echo). has been decided.
各変化点テーブルの割出が完了すると、演算プロセッサ
15は、各変化点テーブルの連結度合を調べる。When the determination of each change point table is completed, the arithmetic processor 15 examines the degree of connection of each change point table.
すなわち、第5図で、Y1軸の変化点アドレスは為とX
、2’t’あり、° 1“の区間は、X5からXLZ迄
である。ここで′1′は新たに発生したものであるから
、X5からX12の間をラベル1とする。Y2軸につい
て、変化点アドレスを調べると、まずX4からX8まで
が″ 11の区間である。ここでYl軸の°1″の区間
との重なりを見ると、X5からX8の区間で重なってい
る。こしにより、ラベル屋はlと付ける。同様GこX1
0からX13の11゜の区間の重なりもあるため、ラベ
ル1とする。ここで、X8からXlOの0”の区間は分
岐ラベルとして登録し、仮ラベル2を付ける。In other words, in Figure 5, the change point address of the Y1 axis is
, 2't', and the range of ° 1'' is from X5 to XLZ.Here, '1' is a new occurrence, so label 1 is between X5 and X12.About the Y2 axis When we examine the change point address, we find that the area from X4 to X8 is "11". Here, if we look at the overlap with the °1" section of the Yl axis, we can see that it overlaps in the section from X5 to
Since the 11° section from 0 to X13 overlaps, it is labeled as 1. Here, the section from X8 to 0'' from XlO is registered as a branch label, and a temporary label 2 is attached.
同様に行ってゆき、Y5軸で2個の分岐を作っていた1
”の領域が合流した事により、仮ラベル2は島内の高輝
度エリア(穴部)として正式ラベル2を付ける。I went in the same way and created two branches on the Y5 axis.
” have merged, temporary label 2 is attached as official label 2 as a high brightness area (hole) within the island.
二のようにして、重なり状態を第7図のように、発生1
分岐1合流、消滅の4種に、分岐・合流が1種類の″l
”のラベル内で発生した場合に内部の穴にラベルを付け
るようにする。2, the overlapping state is changed to occurrence 1 as shown in Figure 7.
There are 4 types of branching, merging, and extinction, and 1 type of branching and merging.
” to label the internal hole if it occurs within the label.
このようにして、ラベル付が完了すると、穴の個数の総
計を求める。In this manner, when labeling is completed, the total number of holes is determined.
曲面を有する物体、例えば球状の物体では、鏡面反射に
よる高輝度エリア(穴)は、物体1つに対し必ず1個で
あるため、例えば画面内の物体の平均子種を求める場合
等には、ラベル付された11”の面積の総和と穴部の面
積の総和の総計を穴の個数で除してやれば、鏡面反射等
層こ影響されず、正確な、平均面積を求めることができ
る。For objects with curved surfaces, such as spherical objects, there is always one high brightness area (hole) due to specular reflection, so when calculating the average child species of objects within the screen, for example, By dividing the sum of the labeled areas of 11" and the sum of the areas of the holes by the number of holes, an accurate average area can be obtained without being affected by specular reflection.
本実施例によれば、簡易なプログラムにより画像中に含
まれる島の数が求められ、従来難かしかった画像の統計
的処理が可能となる。According to this embodiment, the number of islands included in an image is determined by a simple program, and statistical processing of images, which has been difficult in the past, becomes possible.
すなわち、島の連結により従来できなかった画像の平均
面積の算出や周囲長1辺長の算出が可能となり、画素に
重みを乗算することにより、物体の面積や長さを求める
ことが可能となる。In other words, by connecting islands, it becomes possible to calculate the average area of an image and the length of one side of the perimeter, which was previously impossible, and by multiplying pixels by weights, it becomes possible to find the area and length of an object. .
以上説明したように本発明によれば、連結された島から
その島に含まれる正確な物体数を得ることができ、画像
内の物体の正確な数を求めることができる。As explained above, according to the present invention, it is possible to obtain the accurate number of objects included in the connected islands from the connected islands, and it is possible to obtain the accurate number of objects in the image.
第1A図と第1B図は本発明の一実施例における動作フ
ロー図、第2図は本発明の一実施例におけるハード構成
図、第3図は画像内の物体例を示す図、第4図は第3図
の物体を2値化処理したものを示す図、f55図は2値
化処理後の画像データに対してラベル付を行った状態を
示す図、第6図は変化点テーブル構成を示す図、第7図
はラベル付の様子を説明するための図である。
11・・・・・・TVカメラ、100・・・・・・画像
処理装置、12・・・・・・画像入力部、13・・・・
・・切替回路、14・・・・・・画像メモリ、15・・
・・・・演算プロセッサ、16・・・・・・メモリ%1
7牙2図
第3図
3−−−−− ÷ 3
4−一−−−94
牙4図
第5図
16図
Yo Y+
Yz冬生
一一一丁
7く7\
コ 行目ライン
コ +目うイン
: 前回ライン
= +回うイン
コff’1回ライン
コタロラ4ン1A and 1B are operation flow diagrams in an embodiment of the present invention, FIG. 2 is a hardware configuration diagram in an embodiment of the present invention, FIG. 3 is a diagram showing an example of an object in an image, and FIG. 4 is a diagram showing the object in Figure 3 that has been binarized, Figure f55 is a diagram that shows the image data after the binarization process has been labeled, and Figure 6 is the change point table configuration. The figure shown in FIG. 7 is a diagram for explaining the labeling state. 11...TV camera, 100...image processing device, 12...image input unit, 13...
...Switching circuit, 14... Image memory, 15...
... Arithmetic processor, 16 ... Memory %1
7 Fang 2 Fig. 3 Fig. 3 ------- ÷ 3 4-1---94 Fang 4 Fig. 5 Fig. 16 Yo Y+
Yz Fuyuo 111-cho 7ku7\ ko line line ko + eye uin: previous line = + spinning parakeet ff' 1st line kotarora 4n
Claims (1)
画像データを処理し、該画像データに含まれる前記物体
に対応する島を求める画像データ処理方法において、前
記撮像により得られた画像データを2値化し、該2値化
後の画像データにおける島の内部の高輝度エリアの数を
求めることによって前記物体の数を認識することを特徴
とする画像データ処理方法。1. In an image data processing method that images an object to be processed, processes the image data obtained by the imaging, and obtains an island corresponding to the object included in the image data, the image data obtained by the imaging is An image data processing method characterized in that the number of objects is recognized by digitizing the object and determining the number of high brightness areas inside the island in the binarized image data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1013586A JPS62169279A (en) | 1986-01-22 | 1986-01-22 | Picture data processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1013586A JPS62169279A (en) | 1986-01-22 | 1986-01-22 | Picture data processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS62169279A true JPS62169279A (en) | 1987-07-25 |
Family
ID=11741841
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP1013586A Pending JPS62169279A (en) | 1986-01-22 | 1986-01-22 | Picture data processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS62169279A (en) |
-
1986
- 1986-01-22 JP JP1013586A patent/JPS62169279A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3132565B2 (en) | Defect inspection method and apparatus | |
JPS6130684B2 (en) | ||
CN1898555B (en) | Substrate inspection device | |
JPS63254577A (en) | Selection of size within video real time | |
JPS62169279A (en) | Picture data processing method | |
JPH1031730A (en) | Calibration method | |
JP2935803B2 (en) | Defect inspection equipment | |
JPH0291505A (en) | Inspecting device for solder surface of circuit board | |
JP3575551B2 (en) | Residue inspection method | |
JP2535399B2 (en) | Similar character discrimination method | |
JPH0129643Y2 (en) | ||
JPH0353383A (en) | Pattern checking device | |
JPS60156175A (en) | Method and apparatus of picture analysis | |
JPH01112468A (en) | Inspection instrument for printed board | |
JP2843389B2 (en) | Bonding ball inspection device | |
JPS6352267A (en) | State monitoring device | |
JP3171949B2 (en) | Wire bonding inspection method | |
JP2625429B2 (en) | Image processing method | |
JPS62297983A (en) | Method for detecting area of connected graphic form | |
JPS61153507A (en) | Three-dimensional shape recognizing device | |
JP4519272B2 (en) | Pattern inspection apparatus and pattern inspection method | |
JPS63124945A (en) | Detecting method for pattern defect | |
JP2598323B2 (en) | Method for removing fine particles from binary image | |
JPH0353382A (en) | Pattern checking device | |
JPH0298789A (en) | Image reader |