You must change directory to the directory where GoCV has been installed, then you can run the code.
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\hello\main.go
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/hello/main.go
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/hello/main.go
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\capwindow\main.go 0
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/capwindow/main.go 0
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/capwindow/main.go
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\capwindow\main.go images\small.mp4
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/capwindow/main.go images/small.mp4
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/capwindow/main.go
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\savevideo\main.go 0 testcap.avi
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/savevideo/main.go 0 testcap.avi
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/savevideo/main.go
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\saveimage\main.go 0 myimage.jpg
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/saveimage/main.go 0 myimage.jpg
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/saveimage/main.go
go get -u github.com/hybridgroup/mjpeg
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\mjpeg-streamer\main.go 0 0.0.0.0:8080
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/mjpeg-streamer/main.go 0 0.0.0.0:8080
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/mjpeg-streamer/main.go
set PATH=%PATH%;%GOPATH%\bin;
go get -u gocv.io/x/cvscope
go get -u gocv.io/x/cvscope
cvscope
You can also find the CVscope code located at this URL:
https://github.com/hybridgroup/cvscope
cvscope dilate
cvscope erode
cvscope threshold
cvscope gaussian
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\faceblur\main.go 0 data\haarcascade_frontalface_default.xml
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/faceblur/main.go 0 data/haarcascade_frontalface_default.xml
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/faceblur/main.go
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\motion-detect\main.go 0
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/motion-detect/main.go 0
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/motion-detect/main.go
Download and extract the model files from here:
https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\tf-classifier\main.go 0 %USERPROFILE%\Downloads\tensorflow_inception_graph.pb %USERPROFILE%\Downloads\imagenet_comp_graph_label_strings.txt
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/tf-classifier/main.go 0 ~/Downloads/tensorflow_inception_graph.pb ~/Downloads/imagenet_comp_graph_label_strings.txt
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/tf-classifier/main.go
Download and extract the Caffe model file from here:
Download the config file from here: https://raw.githubusercontent.com/opencv/opencv/master/samples/dnn/face_detector/deploy.prototxt
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\dnn-detection\main.go 0 %USERPROFILE%\Downloads\res10_300x300_ssd_iter_140000.caffemodel %USERPROFILE%\Downloads\deploy.prototxt
cd $GOPATH/src/gocv.io/x/gocv
go run cmd/dnn-detection/main.go 0 \
~/Downloads/res10_300x300_ssd_iter_140000.caffemodel \
~/Downloads/deploy.prototxt
You can also find the code located at this URL:
https://github.com/hybridgroup/gocv/blob/master/cmd/dnn-detection/main.go