Rのimagerパッケージを使って画像のfftを行い、fftパワースペクトラムを表示したいのですが、以下のエラーが出ます。解決方法を教えてください。
library(imager)
img = grayscale( boats )
plot(img)
ff <- FFT(img,inverse=FALSE)
plot(ff$real,main="Real part of the transform")
plot(ff$imag,main="Imaginary part of the transform")
power <- sqrt(ff$real^2+ff$imag^2)
plot(power,main="Power spectrum")
###############################################
error message:
Error in FFT_realim(im.real, inverse = inverse) : CImgList::FFT(): Specified real and imaginary parts (256,384,1,1) have non 2^N dimension along the Y-axis.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/07/18 01:47
2019/07/19 07:58