Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
geomultisens
gms_preprocessing
Commits
799e34de
Commit
799e34de
authored
Oct 24, 2017
by
Daniel Scheffler
Browse files
Fixed reshape error within KMeansRSImage.
parent
ab157d0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
gms_preprocessing/algorithms/L2B_P.py
View file @
799e34de
...
...
@@ -174,7 +174,7 @@ class KMeansRSImage(object):
def
compute_clusters
(
self
):
# implement like this: https://www.pyimagesearch.com/2014/05/26/opencv-python-k-means-color-clustering/
pixels2d
=
self
.
im
.
reshape
(
self
.
im
.
rows
*
self
.
im
.
cols
,
3
)
pixels2d
=
self
.
im
.
reshape
(
(
self
.
im
.
rows
*
self
.
im
.
cols
,
self
.
im
.
bands
)
)
kmeans
=
KMeans
(
n_clusters
=
self
.
n_clusters
,
random_state
=
0
)
out
=
kmeans
.
fit
(
pixels2d
)
...
...
Daniel Scheffler
@danschef
mentioned in commit
21a55e19
·
Feb 06, 2018
mentioned in commit
21a55e19
mentioned in commit 21a55e19bb30ecf639e3ca2eba3641e423566c63
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment