필터 지우기
필터 지우기

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 CenterFile Exchange에서 MATLAB 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