how can i remove the blue color?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
code:
close all;
clear all;
P = @(x,y,c,w) exp(-((x-repmat(c(1),size(x,1),size(x,2))).^2 + (y-repmat(c(2),size(y,1),size(y,2))).^2)./w);
W = 1; % Width (constant here, can vary as a vector if you like)
C = [[18 15 5];[10 10 10]]; % Peak centers
x = linspace(0,20,150); % Define ‘x’ vector
[X,Y] = meshgrid(x);
pks = zeros(size(X)); % Preallocate ‘pks’
for k1 = 1:size(C,2) % Loop through ‘C’ (centers) vector
pks = pks + P(X,Y,C(:,k1),W) ;
end
A=pcolor(pks);
%figure control
set(A,'facecolor', 'interp','FaceAlpha',1);
set(gca,'xtick',[],'ytick',[])
ha = axes('units','normalized','position',[0 0 1 1]);
uistack(ha,'bottom');
I=imread('foot1.jpg');
hi = imagesc(I);
set(ha,'handlevisibility','off','visible','off');
shading interp;
i have a foot image(foot1.jpg) that is attached with this code i'm obtaining the figure1 my purpuse is to remove the blue color and keep the multicolored circles inside the foot how can i do it?
0 Commenti
Risposte (3)
Iain
il 7 Ago 2014
You can change the colormap to gray. - That'll make it go from black (low values) to white (high values)
You can generate the image first, then draw the foot on top of it.
You can alter the "alphadata" for the image, so that it is transparent where you want to see what was behind it.
2 Commenti
Iain
il 7 Ago 2014
In which case, you'll have to alter the alphadata of the image so that it is transparent where you do not want to see anything on top of the foot.
Adam
il 7 Ago 2014
Modificato: Adam
il 7 Ago 2014
colormapeditor
will allow you to change just small parts of the colourmap so you can put a black or white background as just the first pixel of the colourmap and start the blue colour at the second instead.
In the colourmap editor just single click under the colourbar to add abother control point and double click the control point to set its colour.
0 Commenti
Image Analyst
il 7 Ago 2014
Just add the images
someWeight = 0.3; % Or whatever you want.
newImage = double(I) + someWeight * pks;
imshow(newImage, []);
colormap(jet(256)); % or whatever you want.
0 Commenti
Vedere anche
Categorie
Scopri di più su Blue in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!