Instanciate a new SpectrumChart
id of canvas to draw a spectrum chart
Adapt canvas' appearance (width/height) according to image
to keep aspect ratio and dimensions
Clear context's canvas
Find threshold min and max values
density array of image pixels
black limit for threshold
min and max values for threshold
Find Threshold minimum
density array of image pixels
index of minimum value to keep for black value
Find Threshold peak according to black limit option (set by user)
density array of image pixels
black limit for threshold
index of peak value [0; 255]
HTML Canvas element
Context 2d of canvas
Get scaled dimensions of canvas
width of image
height of image
aspect ratio object {ratio, width, height}
Update Chart
density array of image pixels
black limit for threshold
value for xAxis to draw
min and max values to draw vertical lines
Generated using TypeDoc
SpectrumChart to draw a Chart of black white density pixel from a grayscale image
Lucas Fridez lucas.fridez@he-arc.ch