From 74355b1ba88b6e7d2c697e1654011eb7a3fa81a0 Mon Sep 17 00:00:00 2001 From: Russell Stanley Date: Thu, 23 Dec 2021 16:40:35 +1030 Subject: [PATCH] Updated experiment --- turbidity/results.go | 2 +- turbidity/turbidity.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/turbidity/results.go b/turbidity/results.go index 69f215cb..4dc24b52 100644 --- a/turbidity/results.go +++ b/turbidity/results.go @@ -7,7 +7,7 @@ type Results struct { contrast []float64 } -func (r *Results) New(n int) { +func (r *Results) new(n int) { r.turbidity = make([]float64, n) r.saturation = make([]float64, n) r.contrast = make([]float64, n) diff --git a/turbidity/turbidity.go b/turbidity/turbidity.go index c065eef6..8adf8e38 100644 --- a/turbidity/turbidity.go +++ b/turbidity/turbidity.go @@ -33,6 +33,9 @@ func (ts TurbiditySensor) Evaluate(imgs []gocv.Mat) (Results, error) { // Apply sobel filter. edge := ts.Sobel(marker) + gocv.IMWrite("marker.jpg", marker) + gocv.IMWrite("edge.jpg", edge) + // Evaluate image. scores, err := ts.EvaluateImage(marker, edge) if err != nil {