Thread Subject:
dividing RGB Images

Subject: dividing RGB Images

From: Muhammad Imran

Date: 1 Jul, 2012 08:59:08

Message: 1 of 1

I have an image of 256x384
i want to divide the image into 4x4 bloks can any one help me. i have code but this works for gray scale images.

[r c d] = size(I);
bs=4; % Block Size (4x4)
nob=(r/bs)*(c/bs); % Total number of 4x4 Blocks
nob
% Dividing the image into 4x4 Blocks
kk=0;

 
for i=1:(r/bs)
for j=1:(c/bs)
   
    
Block1(:,:,kk+j )=I((bs*(i-1)+1:bs*(i-1)+bs),(bs*(j-1)+1:bs*(j-1)+bs));
 end
kk=kk+(r/bs);
end



this code works for grascle images but i have rgb or luv image
please help me

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us