selecting color from block

I have divided an image into blocks ,now i want to extract color from each block ,can u tell which method to apply,can i find average of pixels for this,and i want to show blocks of image,i.e 64 blocks in image,(like grid)

9 件のコメント

Walter Roberson
Walter Roberson 2012 年 1 月 14 日
What does it mean to you to "extract color from each block" ?
Pat
Pat 2012 年 1 月 14 日
walter please see page number 23 and Fig 3.3
http://www.sendspace.com/file/x7jqv7
Walter Roberson
Walter Roberson 2012 年 1 月 14 日
You mean the part that says,
"After the image partitioning stage, a single representative color is selected from
each block. Any method to select the representative color can be applied, but
the standard recommends the use of the average of the pixel colors in a block
as the corresponding representative color, since it is simpler and the description
accuracy is sufficient in general."
If so, then like it says, ANY method to select the representative color can be applied. Pick a pixel at random if you like.
Pat
Pat 2012 年 1 月 14 日
s walter that i meant and i need output as tiny icon as indicated ,is it possible
plz tell how to divied image into 64 blocks in single command ,say in single line plz
Pat
Pat 2012 年 1 月 14 日
imageSize = size(img);
blockLen = round(imageSize(1:2)/8);
out = blocproc(img,blockLen,@myFunction)
can u tell what i should write in (i just need output in 64 blocks)
@myFunction
Walter Roberson
Walter Roberson 2012 年 1 月 14 日
Is that a call to blkproc() or to blockproc() ? The arguments are different between the two.
Walter Roberson
Walter Roberson 2012 年 1 月 14 日
function P = myFunction(X)
R = randperm(numel(X));
P = X(R(1));
end
Pat
Pat 2012 年 1 月 14 日
what is X why u r using function command there
Pat
Pat 2012 年 1 月 14 日
walter plz tell how to get those images as indicated in that paper plz and i want to calculate mean of each block also please guide

回答 (0 件)

この質問は閉じられています。

タグ

質問済み:

Pat
2012 年 1 月 14 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by