Creating an acquisition video using micromanager matlab core

7 Ansichten (letzte 30 Tage)
sukhraj virdee
sukhraj virdee am 4 Jun. 2018
Bearbeitet: Karsten Schulz am 15 Feb. 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 Kommentare
Sebastian Bech-Terkilsen
Sebastian Bech-Terkilsen am 17 Okt. 2018
Hi Sukhraj, do you still need help?
barath V
barath V am 16 Apr. 2019
Hii iam also facing a similar pblm,a reply to this question will be greatly beneficial.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

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

Community Treasure Hunt

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

Start Hunting!

Translated by