Info

This question is closed. Reopen it to edit or answer.

I want that when I click on browse image in push button1 then it automatically convert in to contrast enhancement and show picture in axes and also show the picture in contrast enhancement button which is in button2

1 view (last 30 days)
function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [filename pathname]=uigetfile({'*.jpg'},'file selector'); fileName = uigetfile('*.jpg'); imshow(fileName) set(handles.edit1,'string',filename); set(handles.edit2,'string',pathname); axes(handles.axes1)
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) pout= imread('image.jpg'); pout=rgb2gray(pout);
%pout=imresize(pout,[25 25]); pout_imadjust = imadjust(pout);
pout_histeq = histeq(pout); pout_adapthisteq = adapthisteq(pout);
figure,imshow(pout); title('Original');
figure, imshow(pout_imadjust); title('contrast enhancement');

Answers (0)

Community Treasure Hunt

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

Start Hunting!