got gocv working
This commit is contained in:
parent
9ac295230d
commit
e966ef3669
1 changed files with 6 additions and 0 deletions
6
main.go
6
main.go
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue