0
$\begingroup$

I have two splited images from diference matlab files. Now i need to merge them, near to each other. I tried supblot, imadd,cat methods, but nothing works. Please help me. enter image description here

rezult after sublot experiment.enter image description here

$\endgroup$
1
$\begingroup$
combinedImage = [leftImage, rightImage];
$\endgroup$
0
$\begingroup$

Not exactly sure what you want to do.

If you want to put both images into one matrix, then you could do something like:

% just some sample data
img1 = repmat(0:0.01:1,100,1);
img2 = repmat(1:-0.015:0,120,1);

% create new image with enough space next to each other
newImage = zeros(max(size(img1,1),size(img2,1)),size(img1,2)+size(img2,2));
newImage(1:size(img1,1),1:size(img1,2)) = img1;
newImage(1:size(img2,1),size(img1,2) + (1:size(img2,2))) = img2;
% visualize
imshow(newImage)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.