SLIC Module in SciKit

Jeremy Dunne jdunn4000 at gmail.com
Mon Nov 18 11:09:31 EST 2013


Hi Stefan,

This is everything that I am importing, does order matter ? 

#!/usr/bin/python
import os
import numpy as np
from scipy import ndimage as ndi
from skimage.segmentation.boundaries import find_boundaries
import scipy.ndimage.measurements as msr
import slic as slic
import skimage.color as skic
from sklearn import svm
from sklearn.preprocessing import StandardScaler
from sklearn.cross_validation import StratifiedKFold
from sklearn.grid_search import GridSearchCV
import scipy.ndimage.morphology as morph
from  skimage.filter import threshold_otsu
from sklearn import decomposition
from scipy.ndimage import convolve
import gabor as gb
import ogr_gdal as og
import matplotlib.pyplot as plt
from params import *

Alot but the only issue is slic, if I comment it out code run until it 
needs slic. Is it supported in skimage ? 

Error

Traceback (most recent call last):
  File 
"C:\Users\jeremydunn\Desktop\GroundSure\Algorithm\Wales_Drew\Tadas\Algorithm\run3.py", 
line 2, in <module>
    from algorithm import *
  File 
"C:\Users\jeremydunn\Desktop\GroundSure\Algorithm\Wales_Drew\Tadas\Algorithm\algorithm.py", 
line 7, in <module>
    import slic as slic
ImportError: No module named slic

Cheers. 

Jeremy. 

On Monday, 18 November 2013 15:51:34 UTC, Stefan van der Walt wrote:
>
> On Mon, Nov 18, 2013 at 5:34 PM, Jeremy Dunne <jdun... at gmail.com<javascript:>> 
> wrote: 
> > Nope that's not the issue. Although I checked to make sure. From the 
> code it 
> > is called as below 
> > 
> > import slic as slic 
>
> You cannot import slic by itself, you need to import 
> ``skimage.segmentation.slic``, or just import segmentation and use 
> ``segmentation.slic``. 
>
> Stéfan 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20131118/70a9a051/attachment.html>


More information about the scikit-image mailing list