83
A. Asano, Kansai Univ. 2014年度春学期 画像情報処理 浅野 晃 関西大学総合情報学部 イントロダクション―画像科学と数学

2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

Embed Size (px)

DESCRIPTION

関西大学総合情報学部 「画像情報処理」(担当:浅野晃)

Citation preview

Page 1: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

2014年度春学期 画像情報処理

浅野 晃 関西大学総合情報学部

イントロダクション―画像科学と数学

Page 2: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

Page 3: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

画像処理と画像科学

Page 4: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像処理は手軽にできます

Page 5: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像科学とは?

個別の処理を説明していたらきりがありません。

ある目的をはたす画像処理の背景にある数学を説明します。

Page 6: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

デジタル画像とは

Page 7: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

デジタル画像とは

Page 8: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

デジタル画像とは

画像は,離散的な点(画素, pixel)の集まり

でできている

Page 9: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

デジタル画像とは

画像は,離散的な点(画素, pixel)の集まり

でできている

Page 10: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

デジタル画像とは

画像は,離散的な点(画素, pixel)の集まり

でできている

60 60 6065 65 6570 70 70

Page 11: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

デジタル画像とは

画像は,離散的な点(画素, pixel)の集まり

でできている

60 60 6065 65 6570 70 70

各画素は,明るさ(輝度)を表す整数である

Page 12: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

デジタル画像とは

画像は,離散的な点(画素, pixel)の集まり

でできている

60 60 6065 65 6570 70 70

各画素は,明るさ(輝度)を表す整数である

※カラー画像の1画素=3原色のそれぞれの輝度を表す整数

Page 13: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

Page 14: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

第1部画像とフーリエ変換

Page 15: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像を明暗の波に分解

Page 16: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像を明暗の波に分解

なぜ,波で理解しようとする?

Page 17: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像を明暗の波に分解

心理的理由

なぜ,波で理解しようとする?

Page 18: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像を明暗の波に分解

人は,大まかな形の違いは気になるが,細かい部分の差は気にならない

心理的理由

なぜ,波で理解しようとする?

Page 19: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像を明暗の波に分解

人は,大まかな形の違いは気になるが,細かい部分の差は気にならない

心理的理由

「細かい部分」は細かい波で表される

なぜ,波で理解しようとする?

Page 20: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像を明暗の波に分解

人は,大まかな形の違いは気になるが,細かい部分の差は気にならない

心理的理由 物理的理由

「細かい部分」は細かい波で表される

なぜ,波で理解しようとする?

Page 21: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像を明暗の波に分解

人は,大まかな形の違いは気になるが,細かい部分の差は気にならない

世の中の画像は,波の足し合わせでできていると考えられる

心理的理由 物理的理由

「細かい部分」は細かい波で表される

なぜ,波で理解しようとする?

Page 22: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像を明暗の波に分解

人は,大まかな形の違いは気になるが,細かい部分の差は気にならない

世の中の画像は,波の足し合わせでできていると考えられる

なぜならば光は「波」だから.

心理的理由 物理的理由

「細かい部分」は細かい波で表される

なぜ,波で理解しようとする?

Page 23: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像の生成(結像)画像は回折格子の重ね合わせであり,それぞれの回折格子で回折された光が像面で干渉して,画像が再現される

Page 24: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像の生成(結像)画像は回折格子の重ね合わせであり,それぞれの回折格子で回折された光が像面で干渉して,画像が再現される

Page 25: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像の生成(結像)画像は回折格子の重ね合わせであり,それぞれの回折格子で回折された光が像面で干渉して,画像が再現される

画像は回折格子,すなわち波の重ね合わせである

Page 26: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像の生成(結像)画像は回折格子の重ね合わせであり,それぞれの回折格子で回折された光が像面で干渉して,画像が再現される

画像は回折格子,すなわち波の重ね合わせであるこの計算が「フーリエ変換」

Page 27: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

Page 28: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

第2部画像情報圧縮

Page 29: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の必要性

Page 30: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の必要性

この画像では,1画素の明るさを0~255の整数で表す

Page 31: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の必要性

この画像では,1画素の明るさを0~255の整数で表す1画素に,2進数8桁 = 8ビット = 1バイト必要

Page 32: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の必要性

この画像では,1画素の明るさを0~255の整数で表す1画素に,2進数8桁 = 8ビット = 1バイト必要500万画素のデジカメの画像は,約5メガバイト必要

Page 33: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の必要性

この画像では,1画素の明るさを0~255の整数で表す1画素に,2進数8桁 = 8ビット = 1バイト必要500万画素のデジカメの画像は,約5メガバイト必要

Figure 1. Example of panoramic radiograph.

pothesis.

2. Extraction of trabeculae

2.1. Region for extraction of trabeculae

The images used for our experiments are captured frompanoramic radiographs by a scanner with the transparentfilm adapter. Since the panoramic radiographic films, asshown in Fig. 1 for example, are taken by rotating an X-ray source and a film around the head of patient, images ofskin and other organs are overlapped on the film. The imageis degraded since bones are overlapped each other near thetemporomandibular joint and the cervical vertebra is over-lapped on anterior teeth. Thus a region of interest in the leftpart of the mandible is extracted because of its sharpness,as shown in Fig. 1.

2.2. Extraction procedure

Since it is easier to extract thick tooth roots of similar di-rections than to extract thin trabeculae of various directionsin the region of interest, our strategy of the extraction oftrabeculae excluding tooth roots is extracting the image oftooth roots at first and removing it from the original image.

The procedure of extraction is as follows:

1. Applying the median filter to remove backgroundnoise on the original image. The filter window usedfor the median filtering in our experiment is a squareof 15!41 pixels.

2. Extracting the morphological skeleton using thestrcutring element of binary rhombus whose diagonalsare 13 pixels long. This step extracts both trabeculaeand roots.

3. Separating the skeleton image into the upper half andthe lower half, and measuring the angle of the rootsrelative to the perpendicular line of the patient on eachof the separated images. This is achieved by extracting

the longest line segment in each half using the Radontransformation, and measureing the angles of these linesegments. If the measured angle is less than zero, it isassumed that no root is found in the image, and thefollowing steps for the removal of roots are skipped.

4. Applying erosion to each of the separated images usinga linear structuring element of the direction measuredin the above. This operation removes almost all trabec-ulae whose directions are different from the structuringelements.

5. Applying opening to the results of the above step usingthe same structuring elements. This operation removesremaining trabeculae.

6. Applying dilation to the results of the above step withan elliptic structuring element. This operation embold-ens the roots, which are thinned by the above erosion.

7. Removing the image of the roots obtained in the abovestep from the skeleton image obtained in Step 2. Theresultant image is the extraction of the trabeculae ex-cluding the tooth roots.

3. Experimental results of extraction

The images used in the experiments are scanned withthe resolution of 800 dpi, and the size of scanned images is1600!900 pixels. The brightness has been modified afterthe scanning.

Figures 2 shows an example of the results of extraction.Figure 2 (i) shows the original image, which is extractedfrom a panoramic radiograph as shown in Fig. 1 and ro-tated 90 degree counter-clockwise. The tooth roots, whichare the horizontal thick lines, are overlapped on the trabec-ulae. Figure 2 (ii) shows the result of skeletonization. Boththe trabeculae and the roots are extracted. Figure 2 (iii) isobtained by applying the erosion to the upper and the lowerparts separately with the linear structuring element of 25pixels in the directions of roots measured in Step 3. Almostall the trabeculae are removed while the roots are preserved.Figure 2 (iv) shows the result of further opening with thesame structuring element as the previous erosion. The re-mained trabeculae are removed by this operation. The dila-tion of Fig. 2 (iv) yields Fig. 2 (v), in which the roots areemphasized. The final result of the trabecular extraction,shown in Fig. 2 (vi), is obtained by removing Fig. 2 (v)from Fig. 2 (ii). The trabeculae are solely extracted.

こういう画像は,1画素 = 16ビットで,2倍の10メガバイト必要なこともある

Page 34: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の必要性

この画像では,1画素の明るさを0~255の整数で表す

カラー画像ならば,3倍の15メガバイト必要

1画素に,2進数8桁 = 8ビット = 1バイト必要500万画素のデジカメの画像は,約5メガバイト必要

Figure 1. Example of panoramic radiograph.

pothesis.

2. Extraction of trabeculae

2.1. Region for extraction of trabeculae

The images used for our experiments are captured frompanoramic radiographs by a scanner with the transparentfilm adapter. Since the panoramic radiographic films, asshown in Fig. 1 for example, are taken by rotating an X-ray source and a film around the head of patient, images ofskin and other organs are overlapped on the film. The imageis degraded since bones are overlapped each other near thetemporomandibular joint and the cervical vertebra is over-lapped on anterior teeth. Thus a region of interest in the leftpart of the mandible is extracted because of its sharpness,as shown in Fig. 1.

2.2. Extraction procedure

Since it is easier to extract thick tooth roots of similar di-rections than to extract thin trabeculae of various directionsin the region of interest, our strategy of the extraction oftrabeculae excluding tooth roots is extracting the image oftooth roots at first and removing it from the original image.

The procedure of extraction is as follows:

1. Applying the median filter to remove backgroundnoise on the original image. The filter window usedfor the median filtering in our experiment is a squareof 15!41 pixels.

2. Extracting the morphological skeleton using thestrcutring element of binary rhombus whose diagonalsare 13 pixels long. This step extracts both trabeculaeand roots.

3. Separating the skeleton image into the upper half andthe lower half, and measuring the angle of the rootsrelative to the perpendicular line of the patient on eachof the separated images. This is achieved by extracting

the longest line segment in each half using the Radontransformation, and measureing the angles of these linesegments. If the measured angle is less than zero, it isassumed that no root is found in the image, and thefollowing steps for the removal of roots are skipped.

4. Applying erosion to each of the separated images usinga linear structuring element of the direction measuredin the above. This operation removes almost all trabec-ulae whose directions are different from the structuringelements.

5. Applying opening to the results of the above step usingthe same structuring elements. This operation removesremaining trabeculae.

6. Applying dilation to the results of the above step withan elliptic structuring element. This operation embold-ens the roots, which are thinned by the above erosion.

7. Removing the image of the roots obtained in the abovestep from the skeleton image obtained in Step 2. Theresultant image is the extraction of the trabeculae ex-cluding the tooth roots.

3. Experimental results of extraction

The images used in the experiments are scanned withthe resolution of 800 dpi, and the size of scanned images is1600!900 pixels. The brightness has been modified afterthe scanning.

Figures 2 shows an example of the results of extraction.Figure 2 (i) shows the original image, which is extractedfrom a panoramic radiograph as shown in Fig. 1 and ro-tated 90 degree counter-clockwise. The tooth roots, whichare the horizontal thick lines, are overlapped on the trabec-ulae. Figure 2 (ii) shows the result of skeletonization. Boththe trabeculae and the roots are extracted. Figure 2 (iii) isobtained by applying the erosion to the upper and the lowerparts separately with the linear structuring element of 25pixels in the directions of roots measured in Step 3. Almostall the trabeculae are removed while the roots are preserved.Figure 2 (iv) shows the result of further opening with thesame structuring element as the previous erosion. The re-mained trabeculae are removed by this operation. The dila-tion of Fig. 2 (iv) yields Fig. 2 (v), in which the roots areemphasized. The final result of the trabecular extraction,shown in Fig. 2 (vi), is obtained by removing Fig. 2 (v)from Fig. 2 (ii). The trabeculae are solely extracted.

こういう画像は,1画素 = 16ビットで,2倍の10メガバイト必要なこともある

Page 35: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の必要性

この画像では,1画素の明るさを0~255の整数で表す

カラー画像ならば,3倍の15メガバイト必要

1画素に,2進数8桁 = 8ビット = 1バイト必要500万画素のデジカメの画像は,約5メガバイト必要

Figure 1. Example of panoramic radiograph.

pothesis.

2. Extraction of trabeculae

2.1. Region for extraction of trabeculae

The images used for our experiments are captured frompanoramic radiographs by a scanner with the transparentfilm adapter. Since the panoramic radiographic films, asshown in Fig. 1 for example, are taken by rotating an X-ray source and a film around the head of patient, images ofskin and other organs are overlapped on the film. The imageis degraded since bones are overlapped each other near thetemporomandibular joint and the cervical vertebra is over-lapped on anterior teeth. Thus a region of interest in the leftpart of the mandible is extracted because of its sharpness,as shown in Fig. 1.

2.2. Extraction procedure

Since it is easier to extract thick tooth roots of similar di-rections than to extract thin trabeculae of various directionsin the region of interest, our strategy of the extraction oftrabeculae excluding tooth roots is extracting the image oftooth roots at first and removing it from the original image.

The procedure of extraction is as follows:

1. Applying the median filter to remove backgroundnoise on the original image. The filter window usedfor the median filtering in our experiment is a squareof 15!41 pixels.

2. Extracting the morphological skeleton using thestrcutring element of binary rhombus whose diagonalsare 13 pixels long. This step extracts both trabeculaeand roots.

3. Separating the skeleton image into the upper half andthe lower half, and measuring the angle of the rootsrelative to the perpendicular line of the patient on eachof the separated images. This is achieved by extracting

the longest line segment in each half using the Radontransformation, and measureing the angles of these linesegments. If the measured angle is less than zero, it isassumed that no root is found in the image, and thefollowing steps for the removal of roots are skipped.

4. Applying erosion to each of the separated images usinga linear structuring element of the direction measuredin the above. This operation removes almost all trabec-ulae whose directions are different from the structuringelements.

5. Applying opening to the results of the above step usingthe same structuring elements. This operation removesremaining trabeculae.

6. Applying dilation to the results of the above step withan elliptic structuring element. This operation embold-ens the roots, which are thinned by the above erosion.

7. Removing the image of the roots obtained in the abovestep from the skeleton image obtained in Step 2. Theresultant image is the extraction of the trabeculae ex-cluding the tooth roots.

3. Experimental results of extraction

The images used in the experiments are scanned withthe resolution of 800 dpi, and the size of scanned images is1600!900 pixels. The brightness has been modified afterthe scanning.

Figures 2 shows an example of the results of extraction.Figure 2 (i) shows the original image, which is extractedfrom a panoramic radiograph as shown in Fig. 1 and ro-tated 90 degree counter-clockwise. The tooth roots, whichare the horizontal thick lines, are overlapped on the trabec-ulae. Figure 2 (ii) shows the result of skeletonization. Boththe trabeculae and the roots are extracted. Figure 2 (iii) isobtained by applying the erosion to the upper and the lowerparts separately with the linear structuring element of 25pixels in the directions of roots measured in Step 3. Almostall the trabeculae are removed while the roots are preserved.Figure 2 (iv) shows the result of further opening with thesame structuring element as the previous erosion. The re-mained trabeculae are removed by this operation. The dila-tion of Fig. 2 (iv) yields Fig. 2 (v), in which the roots areemphasized. The final result of the trabecular extraction,shown in Fig. 2 (vi), is obtained by removing Fig. 2 (v)from Fig. 2 (ii). The trabeculae are solely extracted.

こういう画像は,1画素 = 16ビットで,2倍の10メガバイト必要なこともある

動画ならば,(1/30)秒でこれだけのデータ量!

Page 36: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

JPEG方式による画像圧縮画像を波の重ね合わせで表わし,一部を省略して,データ量を減らす

Page 37: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

JPEG方式による画像圧縮画像を波の重ね合わせで表わし,一部を省略して,データ量を減らす

Page 38: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

JPEG方式による画像圧縮画像を波の重ね合わせで表わし,一部を省略して,データ量を減らす

8×8ピクセルずつのセルに分解

Page 39: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

JPEG方式による画像圧縮画像を波の重ね合わせで表わし,一部を省略して,データ量を減らす

ひとつのセルを,これらの波の重ね合わせで表す8×8ピクセルずつの

セルに分解

Page 40: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

JPEG方式による画像圧縮画像を波の重ね合わせで表わし,一部を省略して,データ量を減らす

ひとつのセルを,これらの波の重ね合わせで表す8×8ピクセルずつの

セルに分解

細かい部分は,どの画像でも大してかわらないから,省略しても気づかない

Page 41: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

JPEG方式による画像圧縮画像を波の重ね合わせで表わし,一部を省略して,データ量を減らす

ひとつのセルを,これらの波の重ね合わせで表す8×8ピクセルずつの

セルに分解

細かい部分は,どの画像でも大してかわらないから,省略しても気づかない

省略すると,データ量が減る

Page 42: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の例データ量:80KB データ量:16KB

Page 43: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の例データ量:80KB データ量:16KB

Page 44: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

画像情報圧縮の例データ量:80KB データ量:16KB

(8×8ピクセルのセルが見える)

Page 45: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

Page 46: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

第3部マセマティカル・モルフォロジ

Page 47: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

マセマティカル・モルフォロジとは

Page 48: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

THE BIRTH OF MATHEMATICAL MORPHOLOGY

G. Matheron, J. SerraCentre de Morphologie Mathematique - Ecole des Mines de Paris35, rue Saint-Honore - 77305 Fontainebleau (FRANCE)Email: [email protected]

ForewordIt may be useful to add a few lines in preamble of the document below, in orderto explain the context. Following G. Matheron’s retirement, in December 1996,one could hear the most fanciful tales concerning the birth of MathematicalMorphology. I told G. Matheron about them, which prompted our decisionto clarify this question publicly before the Research Committee of the Ecoledes Mines. We sketched an outline together and I took charge of the firstdraft, which I transmitted to G. Matheron a few weeks later. We discussed itand produced the final version published here for the first time. We attendedtogether the Research Committee meeting, during which we were granted aright of reply of a half hour. This was the last act of presence of G. Matheronat the Ecole des Mines de Paris. When somebody asked him which memorieshe had today of these remote days, he answered ”They were the happiest inmy life”.

1. IntroductionL’action commence par conferer aux objets des caracteres qu’ils ne

possedaient pas par eux-memes, et l’experience porte sur la liaison en-tre les caracteres introduits par l’action dans l’objet (et non pas sur lesproprietes anterieures de celui-ci).

Jean Piaget

At the time we begin to write this text, almost thirty years have passed,since that morning of April 1968, when we moved to the ”Maintenon pavilion”,on Saint-Honore street, in Fontainebleau. As if to celebrate this anniversary,the famous Encyclopaedia of Mathematics (Reidel publisher) has opened itspages to Mathematical Morphology and has just established it as a section ofmathematics .

Who were we ? What was our background ? How would the reflections andexperiments that two men had pursued individually for four years, one in thefriendly environment of IRSID (French Steel Institute), the other in the not sofriendly environment of B.RG.M.(French Geological Survey), give a seed thatwould finally grow into a plant ?

H. Talbot, R. Beare (Eds): Proceedings of ISMM2002Redistribution rights reserved CSIRO Publishing. ISBN 0 643 06804 X

1

マセマティカル・モルフォロジとは

Page 49: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

6 Matheron, G. and Serra, J.

Figure 2. Detail of a thin section from the mine of La Mouriere (red bed), onwhich the first experimental, and manual, study of Mathematical Morphology wasfocused, and the first use of the texture analyser [SER 66]. Limonite oolites, darkand sometimes formed around a quartz germ, are cemented by chlorite.

画像はただの点の並びではなく,「構造」があるはずだ

マセマティカル・モルフォロジとは

Page 50: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

モルフォロジの演算のしかた

Page 51: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

モルフォロジの演算のしかた

(○=画素)

画像=図形 X

Page 52: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

モルフォロジの演算のしかた

(○=画素)

構造要素 B(structuring element)

(●=原点)

画像=図形 X

Page 53: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

モルフォロジの演算のしかた

画像を構造要素で操作する

(○=画素)

構造要素 B(structuring element)

(●=原点)

画像=図形 X

Page 54: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

Page 55: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

Page 56: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

Page 57: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形 構造要素が図形上を移動し,

Page 58: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形 構造要素が図形上を移動し,

Page 59: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

Page 60: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

その位置での構造要素全体を保存

Page 61: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

その位置での構造要素全体を保存

Page 62: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

その位置での構造要素全体を保存

Page 63: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

その位置での構造要素全体を保存

Page 64: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

その位置での構造要素全体を保存

Page 65: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

opening

その位置での構造要素全体を保存

Page 66: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

原図形のうち構造要素が入りきらない部分を取り除く

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

opening

その位置での構造要素全体を保存

Page 67: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

原図形のうち構造要素が入りきらない部分を取り除く

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

opening

その位置での構造要素全体を保存

Page 68: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

原図形のうち構造要素が入りきらない部分を取り除く

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

opening

その位置での構造要素全体を保存

(構造要素のサイズにもとづく定量的操作)

Page 69: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

要は「はめこみ」

原図形

原図形のうち構造要素が入りきらない部分を取り除く

構造要素が図形に完全に含まれたら

構造要素が図形上を移動し,

opening

その位置での構造要素全体を保存

(構造要素のサイズにもとづく定量的操作)

ラフ集合論とmorphological openingRough set theory and morphological opening

浅野 晃Akira Asano

広島大学 大学院工学研究科情報工学専攻Department of Information Engineering, Graduate School of Engineering, Hiroshima University

[email protected] / kuva.mis.hiroshima-u.ac.jp

1 まえがきラフ集合論は,集合の近似を行なう考え方のひとつで,人間の認知のモデル化の基盤に適していることから,感性工学など各種の応用が行なわれている.ラフ集合論の演算と,本来画像処理の手法であるマセマティカル・モルフォロジ(以下モルフォロジ)の演算の共通性は,すでにいくつかの論文で指摘されている.本稿では,ラフ集合理論にモルフォロジにおける openingに相当する演算を導入し,その応用の可能性を検討する.2 ラフ集合論ラフ集合論 [1]とは,集合を「近似」する理論のひと

つである.ラフ集合理論では,集合の要素間に「同値」の関係を定義し,同値な要素によってひとつのクラスタを構成する.このクラスタの集合は,元の集合にくらべて「ラフ」な集合になっている.同値関係は,通常「識別不能関係」で定義される.全体集合の各要素がいくつかの属性をもつとする.このとき,ある属性のセットに含まれる属性の属性値が,ある2つの要素についてすべて一致するとき,これらの要素は同値であるとする.この関係を,その属性セットに関する識別不能関係という.ラフ集合論において,集合を近似する方法には,「下近似」と「上近似」の2つがある.対象の集合を X とするとき,下近似とは,上記のクラスタをXの内部に,Xをはみ出さない限りにおいて可能な限り多く配置して,「ラフ」な集合を作るもので,R(X)で表される.一方,上近似とは,全体集合に配置されたクラスタを,Xを含む限りにといて可能な限り取り去ることで,「ラフ」な集合を作るもので,R(X)で表される.上記の演算は,xを全体集合の要素とするとき,以下

の式で表される.R(X) = {x|[x]A ! X} (1)R(X) = {x|[x]A " X #= $} (2)

ここで,[x]A は,属性セット Aに関して xと同値な要素の集合,つまり xの属するクラスタで,xの同値類という.3 モルフォロジモルフォロジ [2]は,画像処理において図形のもつ構

造を定量的に表現するための演算体系として提案されたもので,集合演算によって定義されている.以下,2値画像の場合のモルフォロジについて簡単に説明する.

モルフォロジでは,2値画像中にある物体を,物体を構成する点(通常,輝度が白,あるいは値が1)を表すベクトルの集合で表す.通常の離散的な画像の場合は,2値画像は「白画素の座標」の集合で表されるということになる.さらに,この画像集合への作用を表す別の画像集合を考え,これを構造要素 (structuring element)とよぶ.構造要素は,フィルタでいうウィンドウに相当し,通常は処理の対象となる画像よりもずっと小さいものを想定する.モルフォロジの基本となる演算は “opening” である.

処理される画像集合をX,構造要素をBで表すとき,Xの B による openingは,次の性質をもつ.

XB = {Bz |Bz % X, z ! Z2}, (3)

ここで Bz は Bを zだけ移動したもの (translation)で,以下のように定義される.

Bz = {b + z | b ! B}. (4)

XのBによる openingは「Xからはみださないように,B をX の内部でくまなく動かしたときの,B そのものの軌跡」であり,「X から,B が収まりきらないくらい小さな部分だけを除去して,他はそのまま保存する」という作用を表している.したがって,

Opening XB は,下のように,さらに基本的な演算に分解することができる.

XB = (X & B) ' B (5)

前半のX & B は,erosionとよばれる演算で,X & B = {x|Bx % X} (6)

というものである.すなわち,X & B は「X からはみださないように,B を X の内部でくまなく動かしたときの,B の原点の軌跡」である.ここで,B は B の反転を表し,

B = {(b|b ! B} (7)

と定義される.また,後半は Minkowski和とよばれる演算で,

X ' B =!

b!B

Xb. (8)

と定義される.なお,X ' Bを dilationといい,次の性質をもつ.

X ' B = {x|Bx " X #= $}. (9)

ラフ集合論とmorphological openingRough set theory and morphological opening

浅野 晃Akira Asano

広島大学 大学院工学研究科情報工学専攻Department of Information Engineering, Graduate School of Engineering, Hiroshima University

[email protected] / kuva.mis.hiroshima-u.ac.jp

1 まえがきラフ集合論は,集合の近似を行なう考え方のひとつで,人間の認知のモデル化の基盤に適していることから,感性工学など各種の応用が行なわれている.ラフ集合論の演算と,本来画像処理の手法であるマセマティカル・モルフォロジ(以下モルフォロジ)の演算の共通性は,すでにいくつかの論文で指摘されている.本稿では,ラフ集合理論にモルフォロジにおける openingに相当する演算を導入し,その応用の可能性を検討する.2 ラフ集合論ラフ集合論 [1]とは,集合を「近似」する理論のひと

つである.ラフ集合理論では,集合の要素間に「同値」の関係を定義し,同値な要素によってひとつのクラスタを構成する.このクラスタの集合は,元の集合にくらべて「ラフ」な集合になっている.同値関係は,通常「識別不能関係」で定義される.全体集合の各要素がいくつかの属性をもつとする.このとき,ある属性のセットに含まれる属性の属性値が,ある2つの要素についてすべて一致するとき,これらの要素は同値であるとする.この関係を,その属性セットに関する識別不能関係という.ラフ集合論において,集合を近似する方法には,「下近似」と「上近似」の2つがある.対象の集合を X とするとき,下近似とは,上記のクラスタをXの内部に,Xをはみ出さない限りにおいて可能な限り多く配置して,「ラフ」な集合を作るもので,R(X)で表される.一方,上近似とは,全体集合に配置されたクラスタを,Xを含む限りにといて可能な限り取り去ることで,「ラフ」な集合を作るもので,R(X)で表される.上記の演算は,xを全体集合の要素とするとき,以下

の式で表される.R(X) = {x|[x]A ! X} (1)R(X) = {x|[x]A " X #= $} (2)

ここで,[x]A は,属性セット Aに関して xと同値な要素の集合,つまり xの属するクラスタで,xの同値類という.3 モルフォロジモルフォロジ [2]は,画像処理において図形のもつ構

造を定量的に表現するための演算体系として提案されたもので,集合演算によって定義されている.以下,2値画像の場合のモルフォロジについて簡単に説明する.

モルフォロジでは,2値画像中にある物体を,物体を構成する点(通常,輝度が白,あるいは値が1)を表すベクトルの集合で表す.通常の離散的な画像の場合は,2値画像は「白画素の座標」の集合で表されるということになる.さらに,この画像集合への作用を表す別の画像集合を考え,これを構造要素 (structuring element)とよぶ.構造要素は,フィルタでいうウィンドウに相当し,通常は処理の対象となる画像よりもずっと小さいものを想定する.モルフォロジの基本となる演算は “opening” である.

処理される画像集合をX,構造要素をBで表すとき,Xの B による openingは,次の性質をもつ.

XB = {Bz |Bz % X, z ! Z2}, (3)

ここで Bz は Bを zだけ移動したもの (translation)で,以下のように定義される.

Bz = {b + z | b ! B}. (4)

XのBによる openingは「Xからはみださないように,B をX の内部でくまなく動かしたときの,B そのものの軌跡」であり,「X から,B が収まりきらないくらい小さな部分だけを除去して,他はそのまま保存する」という作用を表している.したがって,

Opening XB は,下のように,さらに基本的な演算に分解することができる.

XB = (X & B) ' B (5)

前半のX & B は,erosionとよばれる演算で,X & B = {x|Bx % X} (6)

というものである.すなわち,X & B は「X からはみださないように,B を X の内部でくまなく動かしたときの,B の原点の軌跡」である.ここで,B は B の反転を表し,

B = {(b|b ! B} (7)

と定義される.また,後半は Minkowski和とよばれる演算で,

X ' B =!

b!B

Xb. (8)

と定義される.なお,X ' Bを dilationといい,次の性質をもつ.

X ' B = {x|Bx " X #= $}. (9)

Page 70: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

サイズ分布の応用例

Page 71: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

サイズ分布の応用例

真皮コラーゲン画像

光・電磁波を照射してキメの細かさを取り戻す

Page 72: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

サイズ分布の応用例

真皮コラーゲン画像

2値化画像

照射前

光・電磁波を照射してキメの細かさを取り戻す

Page 73: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

サイズ分布の応用例

真皮コラーゲン画像

2値化画像 サイズ分布

照射前

光・電磁波を照射してキメの細かさを取り戻す

←細かい 粗い→

Page 74: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

サイズ分布の応用例

真皮コラーゲン画像

2値化画像 サイズ分布

照射前

光のみ,3週間後

光・電磁波を照射してキメの細かさを取り戻す

←細かい 粗い→

Page 75: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

サイズ分布の応用例

真皮コラーゲン画像

2値化画像 サイズ分布

照射前

光のみ,3週間後

光と電磁波3週間後

光・電磁波を照射してキメの細かさを取り戻す

←細かい 粗い→

Next: textureNext: kansei

Page 76: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

Page 77: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

第4部CTスキャナ 投影からの画像の再構成

Page 78: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

CTスキャナとは

CT(computed tomography) = 計算断層撮影法

http://www.toshiba-medical.co.jp/tmd/products/ct/aquilion/prime_new/

体の周囲からX線撮影を行い,そのデータから断面像を計算で求める

Page 79: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

CTを実現するには

x

y

!

s

軸s

g(s, !)

u

物体

投影

0

g(0,

!)

s

図 2: Radon変換.

Ray-sum

Radon変換は投影を x, y平面での積分で表していますが,投影は本来投影方向の線積分ですから,1変数の積分で表されるほうが自然です。そこで,(6)式を1変数の積分で表してみましょう。

図 2で投影方向に沿った (s, u)座標は,(x, y)座標を !だけ回転したものですから,両者の関係は!

s

u

"=

!cos ! sin !

! sin ! cos !

"!x

y

"(7)

と表されます。したがって,(s, u)と (x, y)は#

s = x cos ! + y sin !

u = !x sin ! + y cos !,(8)

#x = s cos ! ! u sin !

y = s sin ! + u cos !(9)

という関係で互いに変換されます。

g(s, !)は,f(x, y)のうち「x, y座標の原点から s隔たり,法線ベクトルが ! 方向」の X線によって貫かれる部分の合計です。したがって,g(s, !)は,(x, y)が (9)式の関係を満たして uが変化する時のf(x, y)の積分,すなわち

g(s, !) =

$ !

"!f(s cos ! ! u sin !, s sin ! + u cos !)du (10)

という1変数の積分で表されます。g(s, !)のこの表現を ray-sumといいます。

浅野 晃/画像情報処理(2012 年度春学期) 第12回 (2012. 7. 4) http://racco.mikeneko.jp/  3/6 ページ

ある方向からX線を照射し,その方向での吸収率(投影)を調べる

すべての方向からの投影がわかれば,元の物体における吸収率分布がわかる(Radonの定理)

Page 80: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

Page 81: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

A. A

sano

, Kan

sai U

niv.

第5部パターン認識

Page 82: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

パターン認識とは

画像や音声などを,なんらかのカテゴリーに分ける

・郵便番号の手書き数字を,0~9に分類する

・顔写真の人物を特定する 顔写真をもとに年齢・性別などを推定する

画像などから特徴量を取り出し,各特徴量を基底(つまり座標軸)とする空間で,画像を分類する

Page 83: 2014年度春学期 画像情報処理 第1回 イントロダクション (2014. 4.9)

2014年度春学期 画像情報処理

A. A

sano

, Kan

sai U

niv.

例・サポートベクタマシンこの平面が特徴量空間(つまり特徴量が2つ)で,●や◯が特徴量空間内の1点=1つの画像を表す

●と◯の境界線を最適にひく。

最適な境界

サポートベクトル

図 9: サポートベクタマシンによる最適な境界

な認識問題に対応できるようになったためです。

基本的なサポートベクタマシン

まず最初に,前節のニューラルネットワークについての説明で述べた「線形分離可能」な問題について考えます(図 7)。この問題について,それぞれの集合(○と●)を「最適に」分離する超平面を求めます。ここでいう「最適な」分離超平面とは,それぞれの集合に現在存在する点を完全に分離するだけでなく,それぞれの集合に存在するであろう「未知」の点をも分離することができる,という意味です。しかし,「次元のわな」として述べたように,通常のパターン認識問題では,空間の次元は既知の点の数よりもはるかに大きく,既知の点は空間中に非常に疎にしか分布していないので,確率分布の推定は実際は非常に難しいことになります。

そこで,確率分布の推定を必要としない,別の簡単な方法を考えます。この方法では,「最適」な境界を,「それぞれの集合のどちらからももっとも離れている境界」と考えます。言い換えると,この境界はそれぞれの集合の「ちょうど中間」を通ります。それぞれの集合の分布をあらわす確率分布は不明ですが,このような境界は,どちらの集合からももっとも離れているのですから,それぞれの集合の未知の点ももっともうまく分離できると期待されます。それぞれの集合に属する点のうち,この境界にもっとも近い点をサポートベクトルといいます。このような境界は,それぞれの集合の凸閉包(集合に属するすべての点を囲む最小の凸図形)を結ぶ最短の線分の中点を通り,その線分に垂直な超平面となります。

xを空間中のある点(ベクトル)とするとき,境界超平面は,下の式で表される超平面のひとつです。

wTx+ b = 0. (7)

ここで,wは重みベクトル,bはバイアス項とよばれます。集合に属するあるベクトル xiと境界超平面の距離はマージンとよばれ,つぎのように表されます。

|wTxi + b|!w! . (8)

(7)式で表される超平面は,wと bに共通の定数をかけても同じものになります。そこで,次のような制約を導入します。

mini

|wTxi + b| = 1. (9)

浅野 晃/画像情報処理(2012 年度春学期) 第14回 (2012. 7. 18) http://racco.mikeneko.jp/  8/9 ページ