Is it possible to subsample an image by deleting data then interpolating to create a blurred image, while keeping the resulting image the same size as the original image?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Tevin
am 18 Dez. 2023
Bearbeitet: Walter Roberson
am 19 Dez. 2023
Is it possible to subsample an image by deleting data then interpolating to create a blurred image, while keeping the resulting image the same size as the original image?
The code I am using below does the subsampling and interpolation but changes the image size. It looks smaller. See a part of my code below.
originalImage = imread(imagePath);
zeroPaddedImage = zeros(size(originalImage), 'like', originalImage);
zeroPaddedImage(:, 1:subsamplingFactor:end) = originalImage(:, 1:subsamplingFactor:end);
blurredImage = imresize(zeroPaddedImage, 1/subsamplingFactor, 'bicubic');
0 Kommentare
Akzeptierte Antwort
Matt J
am 18 Dez. 2023
Bearbeitet: Matt J
am 19 Dez. 2023
siz=size(originalImage);
tempImage=originalImage( 1:subsamplingFactor:end, 1:subsamplingFactor:end, :);
blurredImage = imresize(tempImage, siz(1:2), 'bicubic');
10 Kommentare
Matt J
am 19 Dez. 2023
originalImage=load('Images').originalImage;
subsamplingFactor=20;
siz=size(originalImage);
tempImage=originalImage( 1:subsamplingFactor:end, 1:subsamplingFactor:end, :);
blurredImage = imresize(tempImage, siz(1:2), 'bicubic');
montage({originalImage,blurredImage})
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!