Add a couple new methods, trying some different formatting.

cascade256 2015-12-14 17:41:47 -08:00
parent e69b169399
commit 358ca04f44

@ -49,6 +49,34 @@ Example:
var zeroes = new Matrix.Zeroes(512, 512);
var ones = new Matrix.Ones(512, 512);
##Image Operations
###absDiff(image1, image2)
Sets this matrix to a image with the absolute difference between image1 and image2.
**image1: Matrix**
**image2: Matrix**
**output: none**
###adaptiveThreshold(maxVal, adaptiveMethod, thresholdType, blockSize, C)
Returns the thresholded image. This matrix needs to be a single channel image.
**maxVal: number:** This is the value that pixels are set to if the conditions are satisfied. 255 for white should be fine for most cases.
**adaptiveMethod: number:** This is how to set which method to use, 0 for ADAPTIVE_THRESH_MEAN_C, and 1 for ADAPTIVE_THRESH_GAUSSIAN_C.
**thresholdType: number:** This is the type of threshold to do, 0 for THRESH_BINARY and 1 for THRESH_BINARY_INV.
**blockSize: number:** This is the area around the pixel for comparing against.
**C: number:** This is subtracted from the mean of every pixel.
**output: Matrix**
##Accessing Data
For color images, be careful with get, row, and col. They return a number that represents the pixel by bit-shifting all the channels together.