Creating an acquisition video using micromanager matlab core
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
barath V
2019-4-16
Hii iam also facing a similar pblm,a reply to this question will be greatly beneficial.
回答(1 个)
Karsten Schulz
2020-2-15
编辑:Karsten Schulz
2020-2-15
fig3 = figure(3); ?? (Unrecognized function or variable 'fig3'.)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!