How do I find the gradient of an image which is divided into 32*32 blocks and is having standard deviation of every particular block?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Prachi Sharma
am 28 Sep. 2016
Kommentiert: Image Analyst
am 28 Sep. 2016
So,I have this image, of 512*512 resolution,I have divided it into 32*32 blocks and then I have found the standard deviation of every block.Now,I am required to find the gradient of the resulting image,having the same size 512*512.According to the code I need to find the gradient of resulting image I2?
This is the code I have used till now-
function stds(b)
a=imresize(b,[512 512]);
myfun = @(block_struct) uint8(std2(block_struct.data)*ones(size(block_struct.data)));
I2 = blockproc(a,[32 32],myfun);
figure;
imshow(a);
figure;
imshow(I2,[]);
0 Kommentare
Akzeptierte Antwort
Massimo Zanetti
am 28 Sep. 2016
Whatever is your image, to compute gradient use
[Gmag,Gdir] = imgradient(I);
Is that what you need?
16 Kommentare
Image Analyst
am 28 Sep. 2016
I don't know why you're chopping the image up into tiles in the first place. Why? Why not just work on the full resolution image?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Computer Vision with Simulink finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!