GigE Camera & User choice

2 visualizzazioni (ultimi 30 giorni)
Colm
Colm il 22 Nov 2011
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 Commento
David Tarkowski
David Tarkowski il 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).

Accedi per commentare.

Risposte (1)

Wendy Fullam
Wendy Fullam il 25 Set 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).

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by