フィルターのクリア

Image acquisition speed using a photometrics camera

2 ビュー (過去 30 日間)
ahmed niri
ahmed niri 2017 年 3 月 31 日
コメント済み: Ali Özgür Argunsah 2018 年 11 月 26 日
I have an imaging camera that I wanted to use and so I developed a Matlab GUI for this camera. The GUI displays 16 bits 128x128 images acquired from the camera at a specific rate. To change and manipulate properties of the camera I am using the MMCore library. The image acquisition works smoothly (as I am only displaying and not saving the images). Overtime as the images are being acquired, the speed of the acquisition slows down significantly (even if I have a circular buffer).
The code used for the displaying the images is as follows:
import mmcorej.*;
mmc = CMMCore;
mmc.loadDevice('Camera', 'PVCAM', 'Camera-1')
mmc.initializeDevice(mmc.getCameraDevice());
mmc.initializeCircularBuffer();
mmc.detectDevice(mmc.getCameraDevice());
mmc.setCircularBufferMemoryFootprint(1000);
mmc.startContinuousSequenceAcquisition(500);
cap = mmc.getBufferTotalCapacity();
img = zeros(128,128, 7000);
sig = zeros(1, 7000);
i=2;
n=0;
format shortg;
while (mmc.isSequenceRunning())
i=i+1;
if (mmc.getRemainingImageCount()> 0)
img1 = mmc.popNextImage;
[pixelType] = pixel(mmc);
[img1] = camprop(mmc, img1,pixelType);
img(:,:,i) = transpose(img1);
imagesc(img(:,:,i));
sig(i) = img(50,50,i);
sig(2)=1500;
Y =[sig(i),sig(i-1)];
X = [i , i-1];
subplot(2,1,1);
plot(X, Y);
hold on;
drawnow;
subplot(2,1,2);
imagesc(img(:,:,i));
drawnow;
end
if i== 1000
mmc.stopSequenceAcquisition();
end
end
exposuretime = mmc.getExposure();
i
mmc.clearCircularBuffer();
mmc.unloadAllDevices();
How can I make sure the frames will not slow down in Matlab?
Thank you in advance
  3 件のコメント
ahmed niri
ahmed niri 2017 年 4 月 21 日
編集済み: ahmed niri 2017 年 4 月 21 日
Hi Carl, the memory usage does increase over time. Once the library is imported, the majority of memory gets used and then increases when we are acquiring more images. There is however enough memory for me to allocate 1000MB. Thanks
Ali Özgür Argunsah
Ali Özgür Argunsah 2018 年 11 月 26 日
Did you solve this problem?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Support Package for IP Cameras についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by