summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-09-18 09:20:09 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2012-09-18 09:20:09 -0400
commita1b55f03e2fe40d4e14278745eae473b73fe81fe (patch)
tree67457ae93ce9fef852c9f3f878d3a03711250a70
parentfcee9aa72ba3f547c42d82df828a7bc19b09bd14 (diff)
downloadbeam_profiler-a1b55f03e2fe40d4e14278745eae473b73fe81fe.tar.gz
beam_profiler-a1b55f03e2fe40d4e14278745eae473b73fe81fe.zip
separate function to grab images
-rw-r--r--grabimage.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/grabimage.m b/grabimage.m
new file mode 100644
index 0000000..c57f41d
--- /dev/null
+++ b/grabimage.m
@@ -0,0 +1,9 @@
+function img=grabimage(shutter_time, Naverages)
+% This funcion calls the external program which takes an image from camera
+% with apropriate settings.
+cmnd_string = horzcat('grabNimages_1394cam.exe', ' -s ',num2str(shutter_time),' -n ',num2str(Naverages));
+[status,result] = system(cmnd_string);
+% by default our grabber save png image to this file name
+image_name = 'test.png';
+img=imread(image_name);
+