Creating an acquisition video using micromanager matlab core

1 visualización (últimos 30 días)
sukhraj virdee
sukhraj virdee el 4 de Jun. de 2018
Editada: Karsten Schulz el 15 de Feb. de 2020
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 comentarios
Sebastian Bech-Terkilsen
Sebastian Bech-Terkilsen el 17 de Oct. de 2018
Hi Sukhraj, do you still need help?
barath V
barath V el 16 de Abr. de 2019
Hii iam also facing a similar pblm,a reply to this question will be greatly beneficial.

Iniciar sesión para comentar.

Respuestas (1)

Karsten Schulz
Karsten Schulz el 15 de Feb. de 2020
Editada: Karsten Schulz el 15 de Feb. de 2020
fig3 = figure(3); ?? (Unrecognized function or variable 'fig3'.)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by