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
5 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
Image Analyst
2017 年 3 月 10 日
See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_split_an_image_into_non-overlapping_blocks.3F
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 件のコメント
Babatunde oladapo
2018 年 6 月 7 日
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
Image Analyst
2018 年 6 月 7 日
You should start your own question for this. In the meantime see the attached demo for how to mask a portion of the picture.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!