colfiltを使った演算について
Show older comments
colfiltを使って、任意のブロックサイズの分散を1画素ごとずらしながら求めようとしています。
しかし、エラー:reshape要素数を変更してはなりません。と出てしまいます。
プログラムは以下の様に書きました。
img=imread('1111.bmp');
img2=imread('2222.bmp');
fun=@(block_struct) std2(block_struct)^2;
varimg=colfilt(img,[5 5],'sliding',fun);%imgの分散
varimg2=colfilt(img2,[5 5],'sliding',fun);%img2の分散
この時何が問題で、プログラムにエラーが出ているのでしょうか?
ご教授お願い致します。
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!