Integrating Newton Andor camera with Matlab.

9 visualizzazioni (ultimi 30 giorni)
Paramjit Yadav
Paramjit Yadav il 27 Lug 2024
Risposto: R il 28 Lug 2024
Dear friends,
I am trying to integrate the Newton Andor 920 camera with MATLAB. Generally, we have 'gentl' adaptors for capturing the video with matlab. But here the company doesnot provide the direct adaptor to use in MATLAB.
Hence, I request to please let me know if the Newton Andor 920 camera has now a built in adaptor to use. Or if someone has found a way to use Newton Andor 920 camera with matlab. or If some has an idea to develope an adaptor in MATLAB for it then please let me know.
Thanking you,
Kind regards

Risposte (1)

R
R il 28 Lug 2024
As far as I know, the Newton Andor 920 camera does not come with a built-in adaptor specifically for MATLAB.
However, there are a few approaches you can consider:
  1. MATLAB supports integration with hardware through the Image Acquisition Toolbox. You can write a custom adaptor using the toolbox’s custom adaptor framework. Detailed instructions and examples are available in the MATLAB documentation at: Creating Custom Adaptors - MATLAB & Simulink (mathworks.com)
  2. Andor cameras typically come with Software Development Kits (SDKs) that allow for custom integration. You can use these SDKs to develop your own adaptor in MATLAB. The SDK documentation will provide necessary functions and API calls that you can leverage. Newton CCD requires either Solis for Spectroscopy or Andor SDK. In the documentation of Andor SDK, it is explicitly mentioned that it can be integrated with MATLAB.
Here's a basic example of how you might create a MATLAB adapter for some of the SDK3 API functions:
Step-by-Step Guide
  1. Initialize the SDK Library:
function initializeLibrary()
% Load the SDK library
if ~libisloaded('atcore')
loadlibrary('atcore.dll', 'atcore.h');
end
% Initialize the library
calllib('atcore', 'AT_InitialiseLibrary');
end
2. Open a Camera Handle:
function handle = openCamera()
% Pre-allocate handle
handle = 0;
% Open the camera
[error, handle] = calllib('atcore', 'AT_Open', handle);
if error ~= 0
error('Failed to open camera. Error code: %d', error);
end
end
3. Set an Integer Feature:
function setIntegerFeature(handle, featureName, value)
% Set an integer feature
error = calllib('atcore', 'AT_SetInt', handle, featureName, value);
if error ~= 0
error('Failed to set integer feature. Error code: %d', error);
end
end
4. Get an Integer Feature:
function value = getIntegerFeature(handle, featureName)
% Pre-allocate value
value = 0;
% Get the integer feature
[error, value] = calllib('atcore', 'AT_GetInt', handle, featureName, value);
if error ~= 0
error('Failed to get integer feature. Error code: %d', error);
end
end
5. Close the Camera Handle:
function closeCamera(handle)
% Close the camera
error = calllib('atcore', 'AT_Close', handle);
if error ~= 0
error('Failed to close camera. Error code: %d', error);
end
end
6. Finalize the SDK Library:
function finalizeLibrary()
% Finalize the library
calllib('atcore', 'AT_FinaliseLibrary');
% Unload the SDK library
if libisloaded('atcore')
unloadlibrary('atcore');
end
end
Example Usage:
% Initialize the library
initializeLibrary();
% Open the camera
handle = openCamera();
% Set an integer feature (example: setting exposure time)
setIntegerFeature(handle, 'ExposureTime', 10000);
% Get an integer feature (example: getting exposure time)
exposureTime = getIntegerFeature(handle, 'ExposureTime');
disp(['Exposure Time: ', num2str(exposureTime)]);
% Close the camera
closeCamera(handle);
% Finalize the library
finalizeLibrary();
This is just a sample implementation, you need to refer to Chapter 2, API (Application Programming Interface) of the Andor SDK Manual for a more accurate implementation.
You can also refer to submissions on MATLAB File Exchange on which some custom solutions for Andor are provided:
  1. Real time frame analysis - for Andor cameras - File Exchange - MATLAB Central (mathworks.com)
  2. Read Andor Camera Dat Image - File Exchange - MATLAB Central (mathworks.com)
  3. sifReader - Read Andor Newton .sif files into matlab. - File Exchange - MATLAB Central (mathworks.com)
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by