From 7e394e1c9345ea321c5d24cef8042cc4db6a7f1e Mon Sep 17 00:00:00 2001 From: Cedric Verstraeten Date: Wed, 18 Jan 2023 23:11:01 +0100 Subject: [PATCH] try armv5 and armv6 + get rid of bitwiseand and a absdiff --- .github/workflows/docker-dev.yml | 2 +- machinery/src/computervision/main.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-dev.yml b/.github/workflows/docker-dev.yml index f525328..6baf8c0 100644 --- a/.github/workflows/docker-dev.yml +++ b/.github/workflows/docker-dev.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - architecture: [arm64, arm/v7] + architecture: [arm64, arm/v7, arm/v5, arm/v6] steps: - name: Login to DockerHub uses: docker/login-action@v2 diff --git a/machinery/src/computervision/main.go b/machinery/src/computervision/main.go index ef8125a..b50b75a 100644 --- a/machinery/src/computervision/main.go +++ b/machinery/src/computervision/main.go @@ -194,19 +194,19 @@ func ProcessMotion(motionCursor *pubsub.QueueCursor, configuration *models.Confi func FindMotion(imageArray [3]*image.Gray, coordinatesToCheck [][]int, pixelChangeThreshold int) (thresholdReached bool, changesDetected int) { - image1 := imageArray[0] + //image1 := imageArray[0] image2 := imageArray[1] image3 := imageArray[2] // Calculate the absolute difference between the first and second image. - diff1 := AbsDiff(image3, image1) + //diff1 := AbsDiff(image3, image1) diff2 := AbsDiff(image3, image2) // Calculate the bitwise AND between the first and second image. - and := BitwiseAnd(diff1, diff2) + //and := BitwiseAnd(diff1, diff2) // Do threshold§ - threshold := Threshold(and, 30) + threshold := Threshold(diff2, 30) // Erode and dilate the image to remove noise. erode := Erode(threshold, 3)