Creating an acquisition video using micromanager matlab core
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
barath V
am 16 Apr. 2019
Hii iam also facing a similar pblm,a reply to this question will be greatly beneficial.
Antworten (1)
Karsten Schulz
am 15 Feb. 2020
Bearbeitet: Karsten Schulz
am 15 Feb. 2020
fig3 = figure(3); ?? (Unrecognized function or variable 'fig3'.)
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!