超像素與分割

Python 影像處理

Rebeca Gonzalez

Data Engineer

分割

Python 影像處理

分割

Python 影像處理

影像表示法

Python 影像處理

超像素

Python 影像處理

超像素的優點

  • 更有意義的區域
  • 計算更有效率
Python 影像處理

分割

  • 監督式
  • 非監督式

Python 影像處理

非監督式分割

簡單線性反覆式分群(SLIC)

Python 影像處理

非監督式分割(SLIC)

# Import the modules
from skimage.segmentation import slic
from skimage.color import label2rgb

# Obtain the segments segments = slic(image)
# Put segments on top of original image to compare segmented_image = label2rgb(segments, image, kind='avg')
show_image(image) show_image(segmented_image, "Segmented image")
Python 影像處理

非監督式分割(SLIC)

Python 影像處理

更多區塊

# Import the modules
from skimage.segmentation import slic
from skimage.color import label2rgb

# Obtain the segmentation with 300 regions segments = slic(image, n_segments= 300) # Put segments on top of original image to compare segmented_image = label2rgb(segments, image, kind='avg')
show_image(segmented_image)
Python 影像處理

更多區塊

Python 影像處理

一起來練習吧!

Python 影像處理

Preparing Video For Download...