How to reduce an image given a factor?
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Ameer Hamza
2018 年 4 月 24 日
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 件のコメント
Ameer Hamza
2018 年 4 月 25 日
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!