How to get the objects that are detected into bins?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
So far my code is right:
function V_all = generate_histograms_rwcoseg(im,param,numbins)
addpath('/Users/mitchellelmer/Documents/MATLAB/rwcoseg-files/');
global bins;
display('Generating histograms using rwcoseg...');
[textonr, textonmask] = winn_filters(im);
if(iscell(textonr)==0)
A=textonr;
B=textonmask;
clear textonr;
clear textonmask;
textonr{1}=A;
textonmask{1}=B;
end
H = cluster_hist(textonr, textonmask,numbins);
for i=1:length(H)
labels = H{i};
labels = labels;
V=create_V(labels);
V_all{i}=V;
end
%V_all=write_file(V_all,param);
display('Histograms using rwcoseg generating done');
end
function V=create_V(labels) n=size(labels,1); V=[zeros(n.*n,1) (1:n.*n)']; maxlabel1 = max(max(labels)); for i = 1:maxlabel1 im1coords = find(labels==i); V(im1coords,1)=i; end [maxv ind]=sort(V(:,2)); V=V(ind,:); end
But now I need to make the objects that it found and display them into bins or vectors?
If you have the answer o any ideas please let me know!
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!