Effacer les filtres
Effacer les filtres

can I get some idea from the expert of MATLAB?

1 vue (au cours des 30 derniers jours)
Raushan
Raushan le 18 Juil 2022
I want to use 4 Basler Ace cameras to capture images using MATLAB. How can I start writting MATLAB script for this.
Any help will be appreciated!
  7 commentaires
Walter Roberson
Walter Roberson le 18 Juil 2022
https://www.mathworks.com/products/image-acquisition.html Image Acquisition Toolbox might be what you want.
Raushan
Raushan le 20 Juil 2022
I tried Image acquisition app in matlab for 1 camera and got preview and captured some image too. Here is the code for capturing one image from one camera
vid = videoinput('gentl', 2, 'Mono8');
src = getselectedsource(vid);
vid.FramesPerTrigger = 1;
vid.ROIPosition = [1273 253 806 909];
start(vid);
stoppreview(vid);
imwrite(getdata(vid), 'E:\Raushan\7-19-22\pic_5.tiff');
I want to use 4 basler ace camera camera to captured 4 image at the same time. Can you please help me to proceed with. I will appriciate any kind of help.

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 18 Juil 2022
Modifié(e) : Image Analyst le 18 Juil 2022
Machine vision cameras can often be seen as generic webcams, though not with all the functionality or resolutions you'd get with the Image Acquisition Toolbox. For example, see my camera list below.
I have three cameras: (1) integrated webcam inside the laptop computer, (2) external Logitech c930e webcam, and (3) external Lumenera machine vision camera.
The upper list is a list of all possible resolution modes for the Lumenera camera that are available with the Image Acquisition Toolbox. You can see there are a lot. The camera uses its own third party (manufacturer) adapter called lumeneraimaq-1. It does not use a winvideo adapter in that case.
However the Lumenera camera also shows up at the bottom as winvideo-3, but it has only two resolution modes to choose from. And of course a lot of other functionality that the camera has is missing, like flipping/mirroring, white balancing, adjusting gains of each color channel independently, frame rate, etc. If I want to use the Lumenera camera as a dumb webcam, I can select the winvideo-3 adapter for it and I believe it would still work. I haven't tried it because why would I want to give up all the functionality I have available to me?
So you might be able to run your Basler camera as just a dumb webcam if you want.
camera = webcam; % Connect to the camera
net = alexnet; % Load the neural network
while true
im = snapshot(camera); % Take a picture
image(im); % Show the picture
im = imresize(im,[227 227]); % Resize the picture for alexnet
label = classify(net,im); % Classify the picture
title(char(label)); % Show the class label
drawnow
end
  12 commentaires
Raushan
Raushan le 24 Juil 2022
Modifié(e) : Raushan le 24 Juil 2022
To give end condition I want to implement these: First time when the cameras will take images we will have 3 images then I want to say to find “y” coordinates of these images. Now, when the cameras will take another 3 images after 10min then I want to find the difference in Y coordinates of new images and old images . And if there is difference in “y” coordinates then I want to say keep taking images. And if the difference is too high I want say stop taking images.
Please help me out to implement this.
Thank you very much!
Walter Roberson
Walter Roberson le 24 Juil 2022
Modifié(e) : Walter Roberson le 24 Juil 2022
Take 3 initial images.
Make them the old images
while true
wait 10 minutes
trigger
record the 3 images
compare the images to the old images
if they are different enough, break
make the images just recorded the old images
end of loop

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Support Package for IP Cameras dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by