How to open image using fopen and preprocess in GUI
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I want to select raw image using "pushbutton" 'Select Image'
Then using another "Pushbutton" 'Preprocess' I want to pre process the same
The whole code is
fi=fopen('JPCLN001.img','r','b');
img=fread(fi,[2048 2048],'*uint16','b');
img1=mat2gray(img, [0,4096]);
img2=imrotate(img1,-90);
img2=flip(img2,2); %Horizantal Flip
%subplot(1,2,1);
figure,imshow(img2),title('Original');
img3=imcomplement(img2);
%subplot(1,2,2);
figure,imshow(img3),title('negative');
medf=medfilt2(img3,[3 3]);
%subplot(1,2,1);
figure,imshow(medf),title('Med_filtered');
img4=imadjust(medf);
%subplot(1,2,2);
figure,imshow(img4),title('Contrast1');
img5=histeq(img4);
%subplot(1,2,1);
figure,imshow(img5),title('Hist_Equa');
0 comentarios
Respuestas (2)
Walter Roberson
el 5 de Jul. de 2015
Editada: Image Analyst
el 5 de Jul. de 2015
Have the callback function for uicontrol('style','push') call uigetfile() . Store the information about the directory and the file name in a place that can be found by the pushbutton for preprocessing.
2 comentarios
Jan
el 5 de Jul. de 2015
@Dnyanesh Kanade: As soon as you try it by your own, you will not be new in this field anymore. Read the suggested tutorials and you are an experienced GUI programmer. Just try it and post, what you have written so far in case of problems.
Jan
el 5 de Jul. de 2015
To learn the basics about creating GUI programmatically (not using GUIDE) see: http://www.mathworks.com/matlabcentral/fileexchange/24861-41-complete-gui-examples
3 comentarios
Image Analyst
el 5 de Jul. de 2015
I've uploaded several tutorials into my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862, along with several hundred others I've uploaded to the Answers forum. What do you need? Steve Eddins blog also posts Image Processing Tutorials: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
Jan
el 5 de Jul. de 2015
@Dnyanesh Kanade: You did not ask a question about image processing, but about using buttons. The usage of buttons is explained very well in these tutorials.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!