Creating an acquisition video using micromanager matlab core
Afficher commentaires plus anciens
Hello Everyone,
I am currently trying to create a GUI for Micromanager to control a microscope. I am trying to create an acquisition but am having trouble doing so. All I want the gui to do is create an acquisition file with the video or pictures that were taken, and also show a live feed in a separate figure. When I run my code below, the acquisition is running and thats about it. I have been trying to fix this for a couple of days but am making no progress. Your help will be greatly appreciated
import mmcorej.*;
mmc = CMMCore;
mmc.loadSystemConfiguration('C:/Program Files/Micro-Manager-1.4/MMConfig_demo.cfg');
mmc.prepareSequenceAcquisition('Camera')
mmc.startSequenceAcquisition(NumShots, Ms.*MultipleFactor , false)
Sequencing = mmc.isSequenceRunning()
while Sequencing == 1 %mmc.isSequencingRunning() outputs 1 to indicate that it is sequencing
Sequencing == mmc.isSequenceRunning()
img = mmc.getLastImage(); %Retrieves last image taken
width = mmc.getImageWidth();
height = mmc.getImageHeight();
if mmc.getBytesPerPixel==2 %Not sure exactly what this does but is shown in the matlab code
pixelType='uint16';
else
pixelType='uint8';
end
img_final =typecast(img,pixelType); %Formats the picture so that live video is adjusted properly
img_final =reshape(img_final, [width, height]);
img_final =transpose(img_final);
%display image
fig3 = figure(3);
imshow(img_final);
drawnow;
if Sequencing == 0
close(fig3);
end
end
2 commentaires
Sebastian Bech-Terkilsen
le 17 Oct 2018
Hi Sukhraj, do you still need help?
barath V
le 16 Avr 2019
Hii iam also facing a similar pblm,a reply to this question will be greatly beneficial.
Réponses (1)
Karsten Schulz
le 15 Fév 2020
Modifié(e) : Karsten Schulz
le 15 Fév 2020
0 votes
fig3 = figure(3); ?? (Unrecognized function or variable 'fig3'.)
Catégories
En savoir plus sur Image Acquisition Toolbox Supported Hardware dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!