Updated experiment

This commit is contained in:
Russell Stanley 2021-12-23 16:40:35 +10:30 committed by Saxon Nelson-Milton
parent 651488fc59
commit 74355b1ba8
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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 {