Fusing one rgb image with one grayscale image using imfuse function
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I used imfuse to combine one rgb image with one grayscale image. After fusing, the rgb image became dimmer. Please suggest how I can increase the intensity of the rgb image.
I used final_image=imfuse(image_rgb, image_gray, 'blend');
0 Commenti
Risposta accettata
DGM
il 14 Lug 2022
Modificato: DGM
il 14 Lug 2022
The contribution of either image is reduced by half, because that's what a 50% opacity blend is. It's the simple arithmetic mean of two images. Imfuse() can't do any other proportion. It's a simple, inflexible visual comparison tool, not an image composition tool.
Assuming that your images have the same page geometry, and assuming you're using R2016b or newer:
A = imread('cameraman.tif'); % single-channel
B = imread('cmantifBG.png'); % RGB
alph = 0.3;
blended = alph*im2double(A) + (1-alph)*im2double(B);
blended = im2uint8(blended);
montage({A B blended})
If you want something other than simple linear alpha blending, you'll have to elaborate with an example image and a description of what the output should look like.
There are other methods of combining two images, but what's appropriate depends on the object contrast/polarity and which objects are important.
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!