Graph of the pixel-to-pixel gradient connections.
Edges are weighted with the gradient values.
Read more in the User Guide.
2D or 3D image.
An optional mask of the image, to consider only part of the pixels.
The class to use to build the returned adjacency matrix.
The data of the returned sparse matrix. By default it is the dtype of img.
The computed adjacency matrix.
Examples
>>> import numpy as np >>> from sklearn.feature_extraction.image import img_to_graph >>> img = np.array([[0, 0], [0, 1]]) >>> img_to_graph(img, return_as=np.ndarray) array([[0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1], [0, 1, 1, 1]])
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4