-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathnotes.txt
34 lines (16 loc) · 939 Bytes
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Camera().getImage().show() <--- this takes 2d context from a camera, casts as image model, adds canvas to dom
Image
- canvas2d
- 2d array
Image(canvas) <- make an image from a canvas 2d context
Image(array) <- make an image from an array
getBitmap() <- if canvas2d, returns this, if 2d array, creates a canvas (off-dom) and populates it
getMatrix() <- if has array raturns, otherwise populates from canvas
getDrawingLayer() (aka dl()) <- returns a new canvas (100% alpha) of same dimensions, as processing object
addDrawingLayer()
removeDrawingLayer()
Image.show([parent dom object]) <- if canvas is not visible/in dom add to dom, if not given parent object, append to body
- if the image has drawing layers, stack those over top
binarize() <- implement as SimpleCV, but use cv.js
Image.show() <-- write image to dom
Image.binarize().show() <-- write binarized image to dom (image remains unchanged)