From: Neha Kaul on 11 May 2010 17:28 Hi, I'm an inexperienced matlab user and I'm trying to find the standard deviation for each pixel in a sequence of images. Each image is 512x512 and between 500-1000 frames long, so something like this is computationally expensive... mat1 = zeros(512,512,100,'uint16'); for readin = 1:100 [mat1(:,:,readin)] = imread('002.tif',readin); end mat1std = std(double(mat1),1,100); I would really appreciate any help or ideas for me to pursue. Thanks! Neha
From: ImageAnalyst on 11 May 2010 17:36 Neha Check this out from just yesterday: http://www.mathworks.com/matlabcentral/newsreader/view_thread/281746#743890
From: Walter Roberson on 11 May 2010 17:54 Neha Kaul wrote: > Hi, > > I'm an inexperienced matlab user and I'm trying to find the standard > deviation for each pixel in a sequence of images. Each image is 512x512 > and between 500-1000 frames long, so something like this is > computationally expensive... > mat1 = zeros(512,512,100,'uint16'); > for readin = 1:100 > [mat1(:,:,readin)] = imread('002.tif',readin); > end > mat1std = std(double(mat1),1,100); > > I would really appreciate any help or ideas for me to pursue. In that std() call, the 100 should be 3, as you wish to take the standard deviation along the third coordinate, not along the 100'th coordinate. You will not receive a run-time error in asking for the 100'th coordinate, as every array has an implicit "x 1" indefinitely often. Your 512 x 512 x 100 matrix is considered to be simultaneously 512 x 512 x 100 x 1 x 1 x 1 x 1 x 1 x 1 x 1 x 1 [...] x 1 %until the 100th dimension
|
Pages: 1 Prev: fzero logical error Next: arithmetic on ROI in scatter plots |