MATLAB Answers

divide an image region into 4x4 blocks

8 views (last 30 days)
fereshte
fereshte on 27 Mar 2014
Edited: fereshte on 28 Mar 2014
How do I divide an image region into 4x4 blocks and then For each block, calculate the mean value of the block?

  0 Comments

Sign in to comment.

Accepted Answer

Joseph Cheng
Joseph Cheng on 27 Mar 2014
You can try to use blockproc(A,[4 4],fun) where fun is a function which does mean(mean(block_struct.data))

More Answers (1)

Image Analyst
Image Analyst on 28 Mar 2014

  1 Comment

fereshte
fereshte on 28 Mar 2014
thank you.
1.can you divide image to 3*3 blocks with blockproc_demo2.m?
2.how i can calculate mean just for fifth window in 3*3 blocks?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!