Not getting 360 values from Histogram
    2 ビュー (過去 30 日間)
  
       古いコメントを表示
    
I should get 360 values of histogram of distances from centroid (signature of object) as mentioned here : http://www.2shared.com/photo/baX-TtQ6/follow.html
But I am getting only ten values from histogram.
--------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
MATLAB Code :
clear all; close all; imtool close all; clc;
image = imread('C:\Users\Explorer\Desktop\aa_contour.jpg');
BW = im2bw(image);
stats = regionprops(BW, 'Centroid') ;
c = stats.Centroid ;
boundary = bwboundaries(BW);
thisBoundary = boundary{1}; % Or whatever blob you want.
x = thisBoundary(:,1);
y = thisBoundary(:,2);
distances = sqrt((x - c(1)).^2 + (y - c(2)).^2) ;
[nelements, centers] = hist(distances)
bar(centers, nelements);
grid on;
------------------------------------------------------------------------------------
Output
nelements = 178 80 66 60 56 52 52 50 48 49
centers =
 Columns 1 through 3
 183.161086305936          204.483258917807          225.805431529678
 Columns 4 through 6
 247.12760414155          268.449776753421          289.771949365293
 Columns 7 through 9
311.094121977164          332.416294589035          353.738467200907
 Column 10
375.060639812778
-----------------------------------------------------------------------------------
0 件のコメント
採用された回答
  Image Analyst
      
      
 2014 年 2 月 11 日
        hist() by default makes 10 bins. Specify 360 in the arg list if you want 360 bins.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Histograms についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

