blockproc and find best matching block with drms
Show older comments
i have problem with my work with matlab. i would like to know how to find best matching block with Drms. before that, i have to divide rgb image (64x64) to overlapping blocks (16*16) and nonoverlapping blocks (8x8) and transform it to gray images. my problem is, how to compare every block between nonoverlapping and overlapping and to get result of Drms ? every block in non overlapping block must be compare to every block in overlapping blocks. this is my program, hopefully you can help me. thanks..
clear all;
clc;
gambar=imread('lena.jpeg');
r=gambar(:,:,1);
g=gambar(:,:,2);
b=gambar(:,:,3);
r=rgb2gray(gambar)
fun = @(block_struct) (block_struct.data, );
q=blockproc(r,[16 16],fun);
fun = @(block_struct) (block_struct.data, );
p=blockproc(r,[8 8],fun);
a=1;
x=1;
while a<50;
for b=a:(15+a)
c=b
end;
a=a+4;
end;
while x<50;
for y=x:(15+x)
z=y
end;
x=x+4;
end;
i don't have idea to put what function i should put in fun
Answers (0)
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!