block segmentation into 10x10 blocks and getting the mean intensity of each block

9 ビュー (過去 30 日間)
Samantha Villanueva
Samantha Villanueva 2020 年 9 月 9 日
回答済み: Ameer Hamza 2020 年 9 月 9 日
Hello please help me. I would like to block segment my images into 10x10 pixel blocks and then use these blocks for feature extraction in which I would get the mean intensity of the image blocks. Please help me code this thank you

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 9 月 9 日
For example
im = rgb2gray(im2double(imread('peacock.jpg')));
im_new = blockproc(im, [10, 10], @(x) mean(x.data, 'all'));

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by