GigE Camera & User choice
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
David Tarkowski
2011-11-22
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).
回答(1 个)
Wendy Fullam
2012-9-25
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 GigE Vision Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!