error in using improfile
Afficher commentaires plus anciens
I have a image below
in this i have used the following code
fg is the binay image
fg=logical(fg);
[area, bbox] = step(hblob, fg);
image_out = img;%it is frame extracted from video
image_out(22:23,:,:) =0;
image_out(1:15,1:30,:) = 0;
image_out(110:111,:,:) = 0;
Idx = bbox(:,2) > line_row;
ratio = zeros(length(Idx),1);
ratio(Idx) = single(area(Idx,1))./single(bbox(Idx,3).*bbox(Idx,4));
ratiob = ratio > 0.4;
count = int32(sum(ratiob));
bbox(~ratiob,:) = int32(-1);
image_out = step(hshapeins, image_out, bbox);
image_out = step(htextins, image_out, count);
xline=[3.0000 154.0000]
yline=[23.0000 23.0000]
%
c=improfile(image_out,xline, yline)
res{n}=sum(c(:));
in this for all 120 images i get values as 0,even if car vehicle the line it is showing zero,y i am getting like this ,plz help
Réponses (0)
Catégories
En savoir plus sur Image Category Classification dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!