Divide an Image of an Arbitrary Size Into 512 * 512 Blocks
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Nour Aburaed
il 27 Giu 2018
Risposto: Image Analyst
il 27 Giu 2018
Hello Everyone. This is my first time posting a question here, I will try to explain as best as I can (sorry for the not-so-good English lol).
I have an image of size 11772 x 11396. I want to divide it into 512 x 512 non-overlapping blocks. I tried to use reshape(img, 512, 512, []), but it gave me an error that basically means the number of pixels in the original image is not divisible by 512. What is the best way to overcome this problem?
This is the exact error message (in case it is needed): Error using reshape Product of known dimensions, 262144, not divisible into total number of elements, 134153712.
Thanks.
0 Commenti
Risposta accettata
Image Analyst
il 27 Giu 2018
See the FAQ: https://matlab.wikia.com/wiki/FAQ#How_do_I_split_an_image_into_non-overlapping_blocks.3F for two or three ways to do it.
0 Commenti
Più risposte (1)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!