how to divide image into 8x8 and 32x32 blocks in matlab -


Picture 'lena.tif' will be split with 8x8 size in 2 blocks; Average value and standard deviation in all those blocks Should be calculated, after which these results can be saved with an image of 32x32 size. Imagine the pictures and explain the result?

Please help me with the full solution because I Initially matlab

I think you mean: split the image into 8x8 block of 256x256; For each calculated meaning and standard deviation; Save the results as 32x32 matrix.

It can be done very easily:

 % // load image im = double (imread ('lena.png')); % // 256x256 grayscale image% // Compute block mean and std m = blockproc (im, [8 8], @ (b) mean (bdata (:))); The% / 32x32 matrix of the block means s = blockproc (im, [8 8], @ (b) std (b.data (:))); % /% 32 x 32 matrix of block STD is normal [0,1] m = m-min (m (:)); M = m / Max (m (:)); S = s-min (s (:)); S = s./max (s (:)); Write% n = 256; N-level grayscale image imlite (S * N, Gray (N) to save the N / S to write M / S.% // Number of levels (M * N, Gray (N), 'Lena_Men.' '%) / P>             > P> enter image details here   
  • standard deviation

    Enter image details here

  • Comments

    Popular posts from this blog

    Verilog Error: output or inout port "Q" must be connected to a structural net expression -

    jasper reports - How to center align barcode using jasperreports and barcode4j -

    c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -