IS THERE ANY INBUILT TO CALCUALTE MEAN AND VARIANCE IN MATLAB
Show older comments
Step 1 : Read a color image 0 with size NX N. Step 2: Calculate the trichromatic coefficients for each pixel according to equation (1) Step 3: Decompose the image recursively by quadtree partitioning. 1) Partition the image in 4 non-overlapped blocks with size N/2xN/2
2) For each such a block, calculate the average trichromatic coefficient and variances according to equations (2)-(3). THIS IS MY ALGORITHM WHICH I AM IMPLEMENTING...BUT I GOT THE PROBLM IN CALCULATING THE MEAN OF A BLOCK..ABOVE I HAVE MENTION THE STEPS OF MY ALGO.
Answers (1)
Jos (10584)
on 9 Oct 2013
If a block means a N-by-M matrix called, e.g., BLOCK, you can get the mean of all N*M elements using
mean(BLOCK(:))
Categories
Find more on Neighborhood and Block Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!