How to reduce an image given a factor?
5 views (last 30 days)
Show older comments
Hello, can someone help me how to make an image be reduced given a factor. For example I have to do the following To reduce we will form blocks of (factor x factor) pixels, we will add their gray values and we will divide by the number of summed values. In this way, we will apply super-sampling with a medium low pass filter. How do I make the blocks and the average? I do not get it. One help please Thanks
0 Comments
Answers (1)
Ameer Hamza
on 24 Apr 2018
You can use imresize(), to resize your image by a given factor. You can specify the interpolation method, using 'method' property as follow
resizedImage = imresize(image, factor, 'method', 'bicubic');
14 Comments
Ameer Hamza
on 25 Apr 2018
It is normal for a filter to get blur on applying a low pass filter.
It appears warning is talking about the fact that the blocks will not always fit inside the complete image e.g. if the number of columns is odd and you are using 2*2 block then at least one column will be left out. More problem will happen if you will use a large n*n block. In that case you will need to decide how to handle those pixels.
See Also
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!