Skip to content

Instantly share code, notes, and snippets.

View juniorhero's full-sized avatar
:octocat:

Athul Jayaram juniorhero

:octocat:
View GitHub Profile
imgurl = strcat(pn,fn);
set(handles.edit1,'string',imgurl);
I = imread(imgurl);
imshow(I,'Parent',handles.axes1);
guidata(hObject, handles);
image=get(handles.edit1, 'string');
imshow(image,'Parent',handles.axes2);
function pushbutton1_Callback(hObject, eventdata, handles)
a=get(handles.edit1, 'string');
b=imread(a);
c=rgb2gray(b);
imshow(c,'Parent',handles.axes2);
if (strcmp('a','radiobutton1')
imshow(c,'Parent',handles.axes2);
elseif (strcmp('b','radiobutton2'))
imshow(b,'Parent',handles.axes2);
end
F = getframe(handles.axes2);
Image = frame2im(F);
imwrite(Image,'D:/folder/output.jpg','jpg');
saveas( handles.axes2 , 'D:/maj proj/samples/output.jpg' );
set(handles.text6,'String','Saved Output');
@juniorhero
juniorhero / gist:a371904529a51264a153cf3c015e8c87
Created September 4, 2016 21:18
Read image from Axes in Matlab GUI
im=getimage(handles.axes1);
bu=im2double(b);
heq = histeq(bu);
imshow(heq,'Parent',handles.axes2)