sklearn.feature_extraction.image.img_to_graph(img, mask=None, return_as=<class ‘scipy.sparse.coo.coo_matrix’>, dtype=None)
[source]
Graph of the pixel-to-pixel gradient connections
Edges are weighted with the gradient values.
Read more in the User Guide.
Parameters: |
|
---|
For scikit-learn versions 0.14.1 and prior, return_as=np.ndarray was handled by returning a dense np.matrix instance. Going forward, np.ndarray returns an np.ndarray, as expected.
For compatibility, user code relying on this method should wrap its calls in np.asarray
to avoid type issues.
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.image.img_to_graph.html