1.1.4 • Published 8 years ago

histogram-analyze v1.1.4

Weekly downloads
1
License
MIT License
Repository
github
Last release
8 years ago

Histogram-analyze

Histogram-analyze is a simple histogram analyzing tool working on Browser, Requirejs, Node.

How to use

Histogram-analyze have 3 features

  • histogram1D
  • circularHistogram1D
  • histogram2D

constructor

new HistogramAnalze.histogram1D( 5 ); //  [0,0,0,0,0]
new HistogramAnalze.circularHistogram1D( 5 , 1 ); //  [1,1,1,1,1]
new HistogramAnalyze.histogram2D( 3, 3, 1 ); // [  [1,1,1],  
										 //	   [1,1,1], 	
										 //	   [1,1,1] ]

common

.max() 
.min()
.cv(kernel) 
.medianSmoothing(kSize[, repeat])
.gaussianSmoothing(kSize[, repeat])
.flatten(saturate) // make 0 below saturate * max 
.findpeaks()

use like this

var histogram1D = HistogramAnalyze.histogram1D

histogram1D([1,0,4,5,20,4,3,3,11,1,2,1])
	.flatten(0.1)
	.findpeaks()
	
    
//  =  [{ l_end: 1, x: 4, r_end: 6, size: 36, rate: 0.72 }
//      { l_end: 7, x: 8, r_end: 9, size: 14, rate: 0.28 }]

histogram1D([1,0,4,5,20,4,3,3,11,1,2,1])
    .smoothing(3,2)
	.flatten(0.1)
	.findpeaks()
    
//  =  [{ l_end: 0, x: 4, r_end: 7, size: 42.446, rate: 0.791 }]

// size is the sum from l_end to r_end
// rate is size / total.

// same on hist2D cirHist1D.
	
1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago