Code covered by the BSD License  

Highlights from
Detect & Present movements. Mammal Visual system

image thumbnail

Detect & Present movements. Mammal Visual system

by

 

24 Oct 2011 (Updated )

This function tracks and presents moving regions in real time from still camera or file.

[adaptorsWithDevices, deviceNames]=findInstalledDevices()
function [adaptorsWithDevices, deviceNames]=findInstalledDevices()
%% Identifying Available Devices names and adaptors

%% Identifying Installed Adaptors
% The |imaqInfoHW| function provides a structure with an
% |InstalledAdaptors| field that lists all adaptors on the current system 
% that the toolbox can access.
AdaptorsInfo = imaqhwinfo;

% AdaptorsInfo.InstalledAdaptors
nAdaptors = length(AdaptorsInfo.InstalledAdaptors);
isAdaptorWithDevice=true(1,nAdaptors);
deviceNames={};
for iAdaptor=1:nAdaptors
    %% Obtaining Device Information
    % Calling |imaqInfoHW| with an adaptor name returns a structure that provides
    % information on all accessible image acquisition devices.
    InfoHW = imaqhwinfo(AdaptorsInfo.InstalledAdaptors{iAdaptor});
    if isempty(InfoHW.DeviceInfo)
        isAdaptorWithDevice(iAdaptor)=false;
    else
        nDevice=length(InfoHW.DeviceInfo);
        for iDevice=1:nDevice
            deviceNames=cat(2, deviceNames, InfoHW.DeviceInfo(iDevice).DeviceName);
        end
    end
end
adaptorsWithDevices=AdaptorsInfo.InstalledAdaptors(isAdaptorWithDevice);

Contact us