Image processing application: counting bubbles and unmolten grains

../../_images/MV_HFV_012.jpg 問題文

1. Open the image file MV_HFV_012.jpg and display it. Browse through the keyword arguments in the docstring of imshow to display the image with the “right” orientation (origin in the bottom left corner, and not the upper left corner as for standard arrays).

この Snaning Element Microscopy 画像は泡(黒)と非融解な砂粒(黒っぽいグレー)を含むガラス(白っぽいグレーの基質)のサンプルです. これらの3つの相で覆われた比を決定し, 砂粒と泡のそれらの大きさや典型的なサイズ等を見積りたい.

  1. 測定情報を表示している下のパネル部分を切り取りましょう.

3. Slightly filter the image with a median filter in order to refine its histogram. Check how the histogram changes.

4. Using the histogram of the filtered image, determine thresholds that allow to define masks for sand pixels, glass pixels and bubble pixels. Other option (homework): write a function that determines automatically the thresholds from the minima of the histogram.

5. Display an image in which the three phases are colored with three different colors.

  1. 異なる相のごみをとるために数理形態学を使いなさい.

7. Attribute labels to all bubbles and sand grains, and remove from the sand mask grains that are smaller than 10 pixels. To do so, use ndimage.sum or np.bincount to compute the grain sizes.

  1. 泡の平均的大きさを計算しなさい. 解答案