How to know the best block size in block image processing (blockproc)?

1 view (last 30 days)
Hi, I have been using the following code to make a thumbnail of an image (matlab blockproc demo):
fun = @(block_struct) imresize(block_struct.data,0.15);
I = imread('pears.png');
I2 = blockproc(I,[100 100],fun);
figure;
imshow(I);
figure;
imshow(I2);
But I don´t understand why is it using the [100 100] block size. How can you guess it? I have tried with 'bestblk' function but it gives me a different value that makes the thumbnail not perfect (not scaling exactly) rather than with the [100 100] value that the thumbnail is perfect. How to guess that perfect value? Why is 'bestblk' not giving that value?. This is the code:
[m,n,band]=size(I);
[mb,nb] = bestblk([m n]);

Answers (0)

Community Treasure Hunt

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

Start Hunting!