One way is just to print the figure window after you have overlayed both images using your code
mshow(screen);
hold on
OverlayImage = imshow( trmp );
caxis auto
colormap( OverlayImage.Parent, jet );
colorbar( OverlayImage.Parent );
rslt=set(OverlayImage, 'AlphaData', 0.4 );
print -djpeg filename
This will create a JPG image, will you can read using imread function. However, due to JPEG comression, you might not want this solution.
img_overlay = imfuse(screen, trmp);
Best Answer