mirror of
https://github.com/NanjingForestryUniversity/supermachine-wood.git
synced 2025-11-08 10:13:53 +00:00
添加了直方图选点功能(未测试)
This commit is contained in:
parent
442ee49b0e
commit
aee4cf9715
@ -277,6 +277,8 @@ class WoodClass(object):
|
||||
x = np.concatenate((x, x_hsv), axis=2)
|
||||
x = np.reshape(x, (x.shape[0]*x.shape[1], x.shape[2]))
|
||||
hist, bins = np.histogram(x[:, 0], bins=10)
|
||||
hist = hist[1:]
|
||||
bins = bins[1:]
|
||||
# x = x[np.argsort(x[:, 0])]
|
||||
# x = x[-self.k:, :]
|
||||
hist_number = np.argmax(hist)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user