Info

此问题已关闭。 请重新打开它进行编辑或回答。

2:1 zoom in of pictures

3 次查看(过去 30 天)
elTurco
elTurco 2023-6-2
关闭: DGM 2023-6-2
Hello everyone.
I want to reduce 4 images of 256 x 256 pixels in a ratio of 2:1.
After reducing it, I want to combine it side by side and one under the other so that it is a 2x2 matrix and make it a single picture.
I want to calculate the mean and standard deviation of this image I have obtained.
How can i do it? Is anyone help me?
Best regards.
% Read the four standard images
image1 = imread('image1.jpg');
image2 = imread('image2.jpg');
image3 = imread('image3.jpg');
image4 = imread('image4.jpg');
% Resize the images to the desired size of 256x256 pixels
image1_resized = imresize(image1, [256 256]);
image2_resized = imresize(image2, [256 256]);
image3_resized = imresize(image3, [256 256]);
image4_resized = imresize(image4, [256 256]);
% Create a blank canvas for the combined image
combined_image = uint8(zeros(256, 512, 3));
% Place the resized images side by side in the combined image
combined_image(:, 1:256, :) = image1_resized;
combined_image(:, 257:512, :) = image2_resized;
combined_image(:, 513:768, :) = image3_resized;
combined_image(:, 769:1024, :) = image4_resized;
% Display the combined image
imshow(combined_image);

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by