got gocv working

This commit is contained in:
BroodjeAap 2020-06-30 20:30:41 +00:00
parent 9ac295230d
commit e966ef3669

View file

@ -3,12 +3,15 @@ package main
import (
"crypto/sha256"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"path/filepath"
"text/template"
"gocv.io/x/gocv"
)
// StreamURL Unexported
@ -54,6 +57,9 @@ func stream(w http.ResponseWriter, r *http.Request) {
saveStreamInstant(URL, img)
w.Write([]byte(img))
gocvImg := gocv.IMRead(filepath.Join(".", "streams", "vERFlpF_5Y-AgJ06PjD8-LtylFJXEjbqJp0g3he5Ngs=", "current.jpg"), gocv.IMReadColor)
fmt.Println(gocvImg.Empty())
}
func saveStreamInstant(URL string, img []byte) {