'How to convert results of Scikit-image Segmentation into a .shp format
I am running SLIC Superpixel segmentation using skimage. I would like to get the segment results as a .shp file format with associated coordinate NZTM. The segmentation result is numpy.ndarray with 2 dimensions. My original imagery has the NZTM - New Zealand Transverse Mercator. How to do this? Below are my script
import arcpy
import skimage
import skimage.io as skio
from skimage.segmentation import slic
from PIL import Image
import matplotlib.pyplot as plt
from shapely.geometry import shape, Point, Polygon, LineString
import numpy as np
from skimage.color import rgb2gray
from skimage.filters import sobel
from skimage.segmentation import slic
from skimage.segmentation import mark_boundaries
from skimage.util import img_as_float
#############Load the image
im1 = skio.imread(r'C:\Data\Deep_Learning\SLICO\kang1019_clip1.png')
segments_slic = slic(im1, n_segments=400, compactness=10, sigma=1,
start_label=1)
Thank you for your help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
