Skip to content
Snippets Groups Projects
Commit d8d28dc0 authored by Jake Read's avatar Jake Read
Browse files

going to shunt to grayscale

parent feebc41d
Branches
No related tags found
No related merge requests found
......@@ -23,8 +23,9 @@ let correlate = (a, b, x, y) => {
for(let i = 0; i < a.data.length; i ++){
sumA += a.data[i]
bi = y * b.width + x
bi += Math.floor(i / a.width) * b.width + i
// something is up w/ this feer sure
bi = (y * b.width + x) * 4
bi += Math.floor(i / (a.width * 4)) * (b.width * 4) + i
sumB += b.data[bi]
sumDot += a.data[i] * b.data[bi]
......@@ -91,6 +92,8 @@ export default function Correlate(){
let resOut = this.output('ImageData', 'correlation')
let canvasA = $('<canvas>').get(0)
canvasA.width = 50
canvasA.height = 50
let ctxA = canvasA.getContext('2d')
ctxA.width = 50
ctxA.height = 50
......
......@@ -55,16 +55,26 @@
"type": "ImageData",
"connections": [
{
"inHunkIndex": "3",
"inHunkIndex": "4",
"inHunkInput": "0"
}
]
}
]
},
{
"type": "image/displayimagedata",
"name": "image/displayimagedata_4",
"inputs": [
{
"name": "image",
"type": "ImageData"
}
]
},
{
"type": "adhoc/correlate",
"name": "adhoc/correlate_3",
"name": "adhoc/correlate_5",
"inputs": [
{
"name": "frame",
......@@ -74,7 +84,13 @@
"outputs": [
{
"name": "correlation",
"type": "ImageData"
"type": "ImageData",
"connections": [
{
"inHunkIndex": "3",
"inHunkInput": "0"
}
]
}
]
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment