I m trying to implement Edge Histogram Descriptor. How can I create 5-bin histogram of directional edges in a sub-image of an image.
2 views (last 30 days)
Show older comments
for row=1:blockSizeR:rows
for col=1:blockSizeC:columns
row1=row;
row2=row1+blockSizeR-1;
row2=min(rows,row2);
col1=col;
col2=col1+blockSizeC-1;
col2=min(columns,col2);
K=RS(row1:row2,col1:col2);
store1(i,j)={K}; %storing values of each block of image into a cell array A.
if j<=3 && i<=4
j=j+1;
else
i=i+1;
j=1;
end
figure(1),subplot(4,4,blockNumber),imshow(K);%showing result of 4x4 matrix of subimages
blockNumber=blockNumber+1;
0 Comments
Answers (1)
Image Analyst
on 11 May 2014
What's the purpose of storing all the (badly-named) K? Why?
Also, I don't see any histogram line, like
[counts, grayLevels] = imhist(K);
Also I don't see any edge detection in your code either. Why not? Are you trying to do HOG (Histogram of Gradients)?
0 Comments
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!