any quick way of computing normalization and indexing



hi,

I have a large matrix A of size(m*n*9), now I want to normalize it at
each pixel, so for example

A(1,1,:) = [1 2 3 4 5 6 7 8 9] and I want
normA(1,1,:) = A(1,1,:)/sum(A(1,1,:));

I now use an iteration to do this computation, but it's very slow as
the matrix is large. Is there any other elegant way of doing it?

Also, I want to find out the index of the max value of A. So in the
example above, I want to compute an index matrix ind(1,1) = 7; again,
any clever way of doing this?

thanks for your kindly advice.
.



Relevant Pages

  • Re: any quick way of computing normalization and indexing
    ... hebe wrote: ... > I have a large matrix A of size, now I want to normalize it ... > each pixel, so for example ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Re: Low cost vision system, thoughts
    ... processing on the image just to normalize the RGB data into some known ... you use a threshold to reduce to ... if pixel < threshold then pixel=0 ... What happens when a light red reflects fluorescent light vs when it reflects ...
    (comp.robotics.misc)
  • Re: Richardson-Lucy deconvolution ?
    ... corresponding pixel in the observed image, and p_is the ... i.e. the fraction of the pixel at j observed at i.. ... There are two widely used ways to initialize the RL iteration. ... Regarding the convergence, you could check some norm of the difference ...
    (sci.image.processing)
  • Re: Low cost vision system, thoughts
    ... on the image just to normalize the RGB data into some known color space. ... you use a threshold to reduce to ... if pixel < threshold then pixel=0 ...
    (comp.robotics.misc)
  • Re: any quick way of computing normalization and indexing
    ... hebe wrote: ... > I have a large matrix A of size, now I want to normalize it at ... sumwill give you the pixel sum at each location, ... repmat can reproduce this matrix 9 times to give you ...
    (comp.soft-sys.matlab)

Loading