%% In file 'imageViewer.m'
function imageViewer ()
MainFrm = figure ( ...
'position', [100, 100, 250, 350]);
TitleFrm = axes ( ...
'position', [0, 0.8, 1, 0.2], ...
'color', [0.9, 0.95, 1], ...
'xtick', [], ...
'ytick', [], ...
'xlim', [0, 1], ...
'ylim', [0, 1] );
Title = text (0.05, 0.5, 'Computer Vision', 'fontsize', 30);
ImgFrm = axes ( ...
'position', [0, 0.2, 1, 0.6], ...
'xtick', [], ...
'ytick', [], ...
'xlim', [0, 1], ...
'ylim', [0, 1]);
ButtonFrm = uicontrol (MainFrm, ...
'style', 'pushbutton', ...
'string', 'GET IMAGE', ...
'units', 'normalized', ...
'position', [0, 0, 1, 0.2], ...
'callback', { @previewImage, ImgFrm });
end
%% callback subfunction (in same file)
function previewImage (hObject, eventdata, ImageFrame)
pkg load image-acquisition;
cam=videoinput("v4l2", "/dev/video0");
set(cam, "VideoFormat", "RGB3");
set(cam, "VideoResolution", [320 240]);
start(cam,2);
preview(cam);
stop(cam);
start(cam,2);
img = getsnapshot(cam);
%Img = imread (fullfile(fpath, fname));
axes(ImageFrame);
imshow(img, []);
axis image off
stop(cam);
end
ref:
http://wiki.octave.org/Uicontrols
https://wiki.octave.org/Image_acquisition_package
.
Subscribe to:
Post Comments (Atom)
Setting DeepCool AK400 Digital CPU fan di Manjaro Linux
Baru rakit PC dan pakai AK400 Digital untuk CPU fannya, setelah install linux ternyata tulisan digitalnya gak tampil, cari-cari di interne...
-
Melepas pandang Menembus cakrawala masa Melayang bebas Dan saksikan indahnya dunia Oh...terbang tinggi mengangkasa Tinggalkan...
-
Penampilan Something Wrong Band di acara Care to Dare di cafe Arcaf semalam
-
I'm using Harbour MiniGUI Extended Edition to develop some applications, previously using HMG 19, and now trying to update to HMG 20.04....
1 comment:
Izin promo ya Admin^^
Bosan gak tau mau ngapain, ayo buruan gabung dengan kami
minimal deposit dan withdraw nya hanya 15 ribu rupiah ya :D
Kami Juga Menerima Deposit Via Pulsa
- Telkomsel
- XL axiata
- OVO
- DANA
segera DAFTAR di WWW.AJOKARTU.COMPANY ....:)
Post a Comment