How can I connect MATLAB to IDS camera?

조회 수: 16 (최근 30일)
Eyal  Hendry
Eyal Hendry 2020년 11월 9일
답변: UDAYA PEDDIRAJU 2024년 8월 30일
Hello,
I have a GigE IDS camera. How can I connect it to MATLAB?
Is there a work around without using IMAQ toolbox?
THANKS!
  댓글 수: 1
KAVITHA
KAVITHA 2024년 7월 3일
편집: KAVITHA 2024년 7월 3일
supportPackageInstaller
% Create a GigE camera object
g = gigecam;
% Search for available GigE cameras
cameraList = imaqhwinfo(g);
% Get the camera's video input object
vidObj = videoinput('gige', cameraList.DeviceIDs{1});
% Set video input parameters (if needed)
% Example:
% set(vidObj, 'Timeout', 10);
% Start acquiring images
start(vidObj);
% Capture a single image
img = getsnapshot(vidObj);
% Display the image
imshow(img);
% Stop the acquisition when done
stop(vidObj);
delete(vidObj);
clear vidObj;

댓글을 달려면 로그인하십시오.

답변 (1개)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU 2024년 8월 30일
Hi Eyal,
Try Using the IMAQ Toolbox (Recommended):
  • If you haven't already, install the Image Acquisition Toolbox from MathWorks.
  • Use the videoinput function to create a video input object that represents your camera.
  • Set the necessary properties like the camera's IP address, resolution, and frame rate.
  • Use the start method to start acquiring frames from the camera.
  • Use the step method to read frames from the camera.
% Create a video input object
vid = videoinput('gige', 1);
% Configure the object (adjust parameters as needed)
set(vid, 'FramesPerTrigger', 1, 'TriggerSource', 'immediate');
% Start acquisition
start(vid);
% Read frames
while true
image = step(vid);
% Process the image as needed
end
Refer: https://www.mathworks.com/help/imaq/videoinput.html

태그

Community Treasure Hunt

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

Start Hunting!

Translated by