WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

Colormap ändert sich ständig?

 

toby1007
Forum-Anfänger

Forum-Anfänger


Beiträge: 13
Anmeldedatum: 16.04.08
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 26.05.2008, 11:38     Titel: Colormap ändert sich ständig?
  Antworten mit Zitat      
Hi @ all

Ich schreibe zur zeit eine GUI in Matlab für die Bildverarbeitung.
Die GUI hat mehrere Axes Objekte die jeweils ihre eigene Colormap haben sollten. das Problem ist hier aber das die Colormap ständig geändert wird wenn ich die Colormap des nächsten Axes Objekt ändern will.

Quellcode:


Code:

function [h_image1,colorma,T,R]=Filterauswahl(h_image,Filter,option1,option2,option3)

switch Filter
     
     case 'im2gray'
        h_image1=rgb2gray(h_image);
        colorma='Gray';
     case 'im2bw'
        h_image1=im2bw(h_image,graythresh(h_image));
        colorma='default';
    case 'histogramm'
        h_image1=imhist(h_image);
        colorma='default';
    case 'Kantendetektion'
        h_image1=edge(h_image,'canny');
        colorma='default';
    case 'Median'
        h_image1=medfilt2(h_image);
        colorma='default';
    case 'Tiefpass'
        fil=fspecial('gaussian',3);
        h_image1=filter2(h_image,fil);
        colorma='default';
    case 'FFT'
        hi=fft2(h_image);
        h_image1=log(abs(hi));
        colorma='jet';
    case 'Hough'
        [h_image1,T,R]=hough(h_image);
        colorma='hot';
    otherwise
        disp('Error');
 
end;


Code:

function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
im=getimage(handles.orgIm);
val=get(handles.popupmenu3,'Value');
filter=get(handles.popupmenu3,'String');
temp=filter{val}
[hi1,col]=Filterauswahl(im,temp,0,0,0);
axes(handles.im1);
image(hi1);
colormap(col);
axis equal;
axis tight;
axis off;
hold on;
im=getimage(handles.im1);
val=get(handles.popupmenu1,'Value');
filter=get(handles.popupmenu1,'String');
temp=filter{val}
[hi1,col1]=Filterauswahl(im,temp,0,0,0);
axes(handles.im2);
image(hi1);
colormap(col1);
axis equal;
axis tight;
axis off;
hold on;
im=getimage(handles.im2);
val=get(handles.popupmenu2,'Value');
filter=get(handles.popupmenu2,'String');
temp=filter{val}
[hi1,col2]=Filterauswahl(im,temp,0,0,0);
axes(handles.im3);
image(hi1);
colormap(col2);
axis equal;
axis tight;
axis off;
hold on;
im=getimage(handles.im3);
val=get(handles.popupmenu4,'Value');
filter=get(handles.popupmenu4,'String');
temp=filter{val}
[hi1,col3]=Filterauswahl(im,temp,0,0,0);
axes(handles.im4);
image(hi1);
colormap(col3);
axis equal;
axis tight;
axis off;
hold on;
im=getimage(handles.im4);
val=get(handles.popupmenu5,'Value');
filter=get(handles.popupmenu5,'String');
temp=filter{val}
[hi1,col4]=Filterauswahl(im,temp,0,0,0);
axes(handles.im5);
image(hi1);
colormap(col4);
axis equal;
axis tight;
axis off;
hold on;
im=getimage(handles.im5);
val=get(handles.popupmenu6,'Value');
filter=get(handles.popupmenu6,'String');
temp=filter{val}
[hi1,col5]=Filterauswahl(im,temp,0,0,0);
axes(handles.im6);
image(hi1);
colormap(col5);
axis equal;
axis tight;
axis off;
hold on;
im=getimage(handles.im6);
val=get(handles.popupmenu7,'Value');
filter=get(handles.popupmenu7,'String');
temp=filter{val}
[hi1,col6]=Filterauswahl(im,temp,0,0,0);
axes(handles.im7);
image(hi1);
colormap(col6);
axis equal;
axis tight;
axis off;
hold on;


Ich hoffe Ihr könnt mir dabei helfen!?

MFG Tobias
Private Nachricht senden Benutzer-Profile anzeigen


outsider
Forum-Meister

Forum-Meister


Beiträge: 806
Anmeldedatum: 03.09.07
Wohnort: München
Version: R2012b
     Beitrag Verfasst am: 27.05.2008, 20:52     Titel:
  Antworten mit Zitat      
das sollte helfen
Using Multiple Colormaps in a Single Figure
http://www.mathworks.com/support/tech-notes/1200/1215.html

evtl. auch das
How can I create a colormap that maps a certain axes range?
http://www.mathworks.com/support/so.....I51.html?solution=1-16I51


MfG
Private Nachricht senden Benutzer-Profile anzeigen
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.