extract 4*4 matrix from 8*8

6 views (last 30 days)
sir i have 256*256 image i want to extract top left 4*4 matrix from every 8*8 blocks of that image..please send me the code

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 3 Apr 2014
blockproc(yourimage,[8 8],@(x)x.data(1:4,1:4))
  2 Comments
Jitesh Bhanushali
Jitesh Bhanushali on 3 Apr 2014
sir what is code if i want to add zeros to 4*4 matrix and make it 8*8 in the image
Azzi Abdelmalek
Azzi Abdelmalek on 3 Apr 2014
blockproc(im,[8 8],@(x) [x.data(1:4,1:4) zeros(4);zeros(4,8)]);

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!