arrays - How to store values continuously without overwriting the previous one? -


my project "optical flow estimation flame detection in videos" in while extracting feature values, can retain last intensity value of frame.

here code

function [iy, ix, it] = grad3d(imnew,bfinescale,binitialize) persistent siz gx gg imprev;   if nargin>2 && binitialize   [gx, gg]= makefilters();  if bfinescale     siz = size(imnew);    imprev= single(imnew); else% if ~bfinescale     siz = floor(size(imnew)/2);     %initialize imprev half size     imprev = imresizenn(single(imnew),siz);     end end  if ~bfinescale  imnew = imresizenn(conv2(single(imnew),gg,'same'),siz);  else imnew = single(imnew);  

end

 ix = conv2(gg,gx,imnew + imprev,'same');   iy = conv2(gx,gg,imnew + imprev,'same');   = conv2(gg,gg,imnew - imprev,'same'); %l3 

% finally, store away current image use on next frame imprev = imnew; testfeature = mean(imprev); save testfeature testfeature

[gx, gg]= makefilters() x = (-1:1);  gg = single(gaussgen(0.67,3)); gx = single(-x.*gg*3); 

in highlighted coding(testfeature=mean(imprev)). can able intensity value of last frame extracted...but need values extracted frames. need value stored row wise in matrix file.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -