python图片处理模块skimage

安装skimage模块

1
pip install scikit-image

方法函数

1
2
3
import skimage
dir(skimage)
['_INPLACE_MSG', '_STANDARD_MSG', '__SKIMAGE_SETUP__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '__warningregistry__', '_raise_build_error', '_shared', '_test', 'data_dir', 'doctest', 'doctest_verbose', 'dtype_limits', 'img_as_bool', 'img_as_float', 'img_as_int', 'img_as_ubyte', 'img_as_uint', 'pkg_dir', 'test', 'test_verbose', 'util']

用法-帮助

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
help(skimage)
Help on package skimage:

NAME
skimage - Image Processing SciKit (Toolbox for SciPy)

DESCRIPTION
``scikit-image`` (a.k.a. ``skimage``) is a collection of algorithms for image
processing and computer vision.

The main package of ``skimage`` only provides a few utilities for converting
between image data types; for most features, you need to import one of the
following subpackages:

Subpackages
-----------
color
Color space conversion.
data
Test images and example data.
draw
Drawing primitives (lines, text, etc.) that operate on NumPy arrays.
exposure
Image intensity adjustment, e.g., histogram equalization, etc.
feature
Feature detection and extraction, e.g., texture analysis corners, etc.
filters
Sharpening, edge finding, rank filters, thresholding, etc.
graph
Graph-theoretic operations, e.g., shortest paths.
io
Reading, saving, and displaying images and video.
measure
Measurement of image properties, e.g., similarity and contours.
morphology
Morphological operations, e.g., opening or skeletonization.
novice
Simplified interface for teaching purposes.
restoration
Restoration algorithms, e.g., deconvolution algorithms, denoising, etc.
segmentation
Partitioning an image into multiple regions.
transform
Geometric and other transforms, e.g., rotation or the Radon transform.
util
Generic utilities.
viewer
A simple graphical user interface for visualizing results and exploring
parameters.

Utility Functions
-----------------
img_as_float
Convert an image to floating point format, with values in [0, 1].
img_as_uint
Convert an image to unsigned integer format, with values in [0, 65535].
img_as_int
Convert an image to signed integer format, with values in [-32768, 32767].
img_as_ubyte
Convert an image to unsigned byte format, with values in [0, 255].

PACKAGE CONTENTS
_build
_shared (package)
color (package)
data (package)
draw (package)
exposure (package)
external (package)
feature (package)
filters (package)
future (package)
graph (package)
io (package)
measure (package)
morphology (package)
novice (package)
restoration (package)
run-hessian
scripts (package)
segmentation (package)
setup
transform (package)
util (package)
viewer (package)

FUNCTIONS
test = _test(doctest=False, verbose=False)
This would run all unit tests, but nose couldn't be
imported so the test suite can not run.

DATA
__SKIMAGE_SETUP__ = False
__warningregistry__ = {'version': 0, ("the imp module is deprecated in...
data_dir = r'C:Python36libsite-packagesskimagedata'
doctest = functools.partial(<function _test at 0x000001912DC78598>, do...
doctest_verbose = functools.partial(<function _test at 0x000001912DC78...
pkg_dir = r'C:Python36libsite-packagesskimage'
test_verbose = functools.partial(<function _test at 0x000001912DC78598...

VERSION
0.13.1

FILE
c:python36libsite-packagesskimage__init__.py

示例

1
2
3

imgs = skimage.io.imread(file_name)
ttt = np.mean(imgs)