How to fuse three images?

Asked by Rami about 15 hours ago
Latest activity Answered by Image Analyst about 12 hours ago

I have three images of three object. Object C covers the physical dimensions of objects A and B. I need to show all objects on a single image with diffrent colors. I able to fused two images with object C and A or C and B with following code:

    A = imread(1..);
    B = imread(2..);
    C = imread(3..);
figure; imshow(C,'InitialMag','fit');
green = cat(3, zeros(size(C)),ones(size(C)), zeros(size(C)));
hold on 
h = imshow(green); 
hold off
% Use 'h' influence map as the AlphaData for the solid green image.
set(h, 'AlphaData', A) 

How can I show object A, B and C (diffrent colors on the same image). Any help regarding the same will be appreciable. Thanks

0 Comments

Rami

2 Answers

Answer by Jeff EA about 13 hours ago

I'm reading quite a bit into your question, but it sounds like you have three binary images saved as rgb images.

A = rgb2gray(imread(1..);
B = rgb2gray(imread(2..);
C = rgb2gray(imread(3..);
overlay_im = cat(3, C, A, B);
imshow(overlay_im);

If you post your images, it's more likely you will receive good advice.

0 Comments

Jeff EA
Answer by Image Analyst about 12 hours ago

Jeff's answer is a good one. You might also take a look at imshowpair() or imfuse() in the Image Processing Toolbox.

0 Comments

Image Analyst

Contact us