How to get white background in image superimposition

조회 수: 6 (최근 30일)
Turbulence Analysis
Turbulence Analysis 2020년 12월 26일
답변: Priyanka Rai 2021년 1월 5일
Him
I am superimposing two images, at the end i am getting some blue background, which I need to get rid of.. Instead I intend to get white background.
Please suggest me on procedure to get this..
%%% First image
G = imshow(flipud(rgb1));
ax1=gca;
colormap(ax1,'jet');
% c = colorbar(ax1,'Location', 'east','FontSize',20,'TickLabelInterpreter', 'latex');
% c.Title.Interpreter = 'latex';
% c.Title.FontSize = 16;
G.AlphaData = 0.5;
set(gca, 'YDir','normal')
axis equal
hold on;
%%%% second image
GH = imshow(flipud(rgb2));
ax2=gca;
colormap(ax2,'hot')
% c1 = colorbar(ax2,'Location', 'west','FontSize',20,'TickLabelInterpreter', 'latex');
GH.AlphaData = 0.5;
set(gca, 'YDir','normal')
axis equal

답변 (1개)

Priyanka Rai
Priyanka Rai 2021년 1월 5일
You can try remove a background and then add white as background.
Refer this documentation on image background color property:
There are many ways to remove background. For a colored image, you can try this
For a gray scale image, you can try this
You can do background subtraction (for fluorescence and x-ray), background division (most ordinary situations), or background replacement (for video), depending on the situation.
Also, you can try using connected components. With simple problems, it could work. Please refer :

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by