GigE Camera & User choice
2 views (last 30 days)
Show older comments
I have several GigE cameras ranging from Mono8 to Mono16. The code I have written asks a user to input the number of bits the camera they want to use is. But once A user clicks OK Matlab crashes. My code is below:
prompt = {'Mono:'};
dlg_title = 'Mono:';
num_lines = 1;
def = {'16'};
inputs = str2num(char(inputdlg(prompt, dlg_title, num_lines, def)));
if (inputs == 8)
X = 'Mono8';
elseif (inputs == 10)
X = 'Mono10';
elseif (inputs == 12)
X = 'Mono12';
else
X = 'Mono16';
end
vid = videoinput('gige', 1, X);
src = getselectedsource(vid);
vid.FramesPerTrigger = 1;
start(vid);
data = getdata(vid);
axes(handles.axes2);
imshow(data);
1 Comment
David Tarkowski
on 22 Nov 2011
This is probably something that you should contact tech support about. If you're using R2011a, you could also look at the <http://www.mathworks.com/support/bugreports/search_results?search_executed=1&keyword=gige&release_filter=Exists+in&release=0&selected_products=&commit=Search bug reports> and see if the patch fixes your issue (there are a number of bug reports against R2011a, but they should all contain the same fixes).
Answers (1)
Wendy Fullam
on 25 Sep 2012
Answered in comments.
This is probably something that you should contact tech support about. If you're using R2011a, you could also look at the <http://www.mathworks.com/support/bugreports/search_results?search_executed=1&keyword=gige&release_filter=Exists+in&release=0&selected_products=&commit=Search bug reports> and see if the patch fixes your issue (there are a number of bug reports against R2011a, but they should all contain the same fixes).
0 Comments
See Also
Categories
Find more on GigE Vision Hardware in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!