render = {
time;
imageIS.length = 0
cap.read(src);
cv.cvtColor(src, dst, cv.COLOR_RGBA2GRAY, cv.CV_8UC1)
let aspect = dst.cols/dst.rows
let dsize = new cv.Size(128, 128);
cv.resize(dst, dst, dsize, 0, 0, cv.INTER_AREA);
let ksize = new cv.Size(3, 3);
let anchor = new cv.Point(-1, -1);
cv.blur(dst, dst, ksize, anchor, cv.BORDER_DEFAULT);
for (let row = 0; row < dst.rows; ++row) {
for (let col = 0; col < dst.cols; ++col) {
let pixel = dst.ucharPtr(row, col);
imageIS.push({x:col,y:row,colour:pixel[0]})
}
}
cv.imshow(canvas, dst);
}