0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

skimage.features.hogを使用しようとしたときに発生。

発生したコード

from skimage.feature import hog
from skimage import data, exposure

#hogとhog画像の取得
fd, hog_image = hog(
    img, orientations=8, 
    pixels_per_cell=(16, 16),
    cells_per_block=(10, 10), 
    visualize=True, 
    multichannel=True,
    feature_vector=True
  )

使用していたskimageのバージョンは0.20.0でしたが、どうやら引数が変わったみたいです。

代わりにchannel_axisという引数が入ったようです。

変更後

from skimage.feature import hog
from skimage import data, exposure

#hogとhog画像の取得
fd, hog_image = hog(
    img, orientations=8, 
    pixels_per_cell=(16, 16),
    cells_per_block=(10, 10), 
    visualize=True, 
    channel_axis=2,
    feature_vector=True
  )

これで無事に動きました。

download.png

download.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?