How to divide an image into blocks(non overlapping) and access each block separately to calculate centroid for each block and get result as vector for each block

4 views (last 30 days)
I need to divide image to separated blocks for example 5x5 blocks and then calculate centroid for each block and get result as vector for each block im new user so im confused and i want to know how to calculate centroid foe each block thank you

Answers (1)

Image Analyst
Image Analyst on 10 Mar 2017
Or else see my attached demos. Use blockproc() if your blocks are non-overlapping and move in "jumps" of the block size. Use nlfilter() if the blocks move by just one pixel each time.
  4 Comments
Babatunde oladapo
Babatunde oladapo on 7 Jun 2018
Thanks for replying to my questions. However, I still haven't gotten solutions to my questions.
If you could help, attached is the task I wanted answers to.
Thank you

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!