Open thomasmichaelkane opened 5 months ago
Hi Thomas,
that is indeed surprising. I assume that something goes wrong in the 'checkCamera' function which is used to set up some of the camera settings. If this function fails, it returns an empty video object which would explain your problem. It is probably about a setting that is not supported by the hardware.
Can you try the following lines and check if they all run without an error?
imaqreset
adaptorName = 'winvideo';
vidObj = videoinput(adaptorName); %get video object
src = getselectedsource(vidObj);
try
handles.FrameRate.Style = 'popupmenu'; %change menu style to indicate available frame rates
handles.FrameRate.String = set(src, 'FrameRate');
src.FrameRate = handles.FrameRate.String{1}; %use highest available frame rate
catch
handles.FrameRate.String = {'30'};
end
%setup and display live video feed in preview window
vidRes = get(vidObj,'VideoResolution');
nbands = get(vidObj,'NumberOfBands');
handles.CurrentResolution.String = [num2str(vidRes(1)) ' x ' num2str(vidRes(2))]; %update current resolution indicator
imshow(zeros(vidRes(2),vidRes(1),nbands),[]); %create image object for preview
%set default camera configuration
handles.ROIposition = [0 0 vidRes]; %default ROIposition
set(vidObj,'TriggerFrameDelay',0);
set(vidObj,'FrameGrabInterval',1);
set(vidObj,'TriggerRepeat',0);
set(vidObj,'ROIposition',handles.ROIposition);
set(vidObj,'FramesPerTrigger',Inf);
triggerconfig(vidObj,'manual');
preview(vidObj)
ah for adaptorName you would have to set 'matrox'.
adaptorName = 'matrox ';
Hi
I believe I have followed the instructions correctly. I am using a matrox adaptor frame grabber, which I can identify:
and use:
and is also found initially by WidefieldImager:
However, it also then shows a warning stating that the camera cannot be found. I'm not sure how to navigate this problem. Do you have any ideas whats going wrong?