필터 지우기
필터 지우기

Combining 5 images from a camera and add them together to yield one image.

조회 수: 4 (최근 30일)
Hello I am using the image aquistion toolbox to obtain images froma a camera.
I am set up the capture 5 frames, and I obtain them by
frame=getdata(vid,5); %Just get n frames #
size(frame)
class(frame)
Here are the outputs of size(frame) and class are:
ans =
1824 2736 1 5
ans =
'uint16'
The size returns height, width, colourbands, frames
whats the best way to create a composite image where all the images are just added together
I have this but I was hoping fior a faster way:
frames=[];
for i=1:5
frames=frames+frame(:,:,:,i);
end

채택된 답변

Srivardhan Gadila
Srivardhan Gadila 2020년 10월 30일
You can refer to the documentation of sum function and use the following syntax S = sum(A,dim).
frame = rand(1824,2736,1,5);
frames = sum(frame,4);
The following also may help you depending on the rest of your code: gpuArray, Vectorization.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for IP Cameras에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by