divide an image region into 4x4 blocks

How do I divide an image region into 4x4 blocks and then For each block, calculate the mean value of the block?

 Akzeptierte Antwort

Joseph Cheng
Joseph Cheng am 27 Mär. 2014

0 Stimmen

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

Weitere Antworten (1)

Image Analyst
Image Analyst am 28 Mär. 2014

0 Stimmen

1 Kommentar

fereshte
fereshte am 28 Mär. 2014
Bearbeitet: fereshte am 28 Mär. 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?

Melden Sie sich an, um zu kommentieren.

Tags

Gefragt:

am 27 Mär. 2014

Bearbeitet:

am 28 Mär. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by