i split the image pixels into many small matrices
5 ビュー (過去 30 日間)
古いコメントを表示
i split the image pixels into many small overlapping matrices
block(:,:,kk+j)=grey_img((i:i+2),(j:j+2))
i want to recombine this overlapping matrices how please help
2 件のコメント
Rik
2019 年 10 月 23 日
How do you want to recombine this? Purely based on the variable name I think the blockproc function might be a better choice.
Rik
2019 年 10 月 23 日
Comment posted as answer by parvatham vijay:
Thank you
how to use blockproc for dividing the 256x256 matrix into 3x3 matrix with overlapping,kindly help
採用された回答
Rik
2019 年 10 月 23 日
The blockproc function works on distinct blocks. If you want a sliding window operation you need to use a function like nlfilter.
A = imread('cameraman.tif');%load an included 256x256 example image
fun=@(x) max(x(:));
B=nlfilter(A,[3 3],fun);
%show input and output
figure(1),clf(1)%only use clf during debugging
subplot(1,2,1)
imshow(A)
title('original')
subplot(1,2,2)
imshow(B)
title('filtered')
The function can be as complicated as you want it to be.
2 件のコメント
Rik
2019 年 10 月 27 日
what is function @(x), i couldn't get idea,pl.explain how to use function
Thank you
その他の回答 (1 件)
parvatham vijay
2019 年 11 月 1 日
1 件のコメント
Rik
2019 年 11 月 1 日
Please stop posting your comments (or questions) as answer. Also, your question is unformatted, making it difficult to understand. Please use the layout tools to make your question more readable.
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!