Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

histogram-analyze

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

histogram-analyze

make histogram and analyze it

  • 1.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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.
	

Keywords

FAQs

Package last updated on 27 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc