Go for Mobile and graphics, GUI

By pjain      Published July 29, 2019, 12:47 a.m. in blog Programming   

Go for Mobile

SO libs in GO

OpenCV and Go

  • Problem OpenCV2.4 has C bindings while OpenCV3 has C++ only bindings and more optimized algorithms. Therefore bit of a pain.

opencv and go lang - Google Search go-opencv/go-opencv: Go bindings for OpenCV / 2.x API in gocv / 1.x API in opencv Using OpenCV 3 from #golang – Peter Leyssens – Medium OpenCV with Gobot

ex:

https://gobot.io/documentation/platforms/opencv/ OSX> brew tap homebrew/science && brew install opencv http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windows-installation

package main
import (
        cv "github.com/lazywei/go-opencv/opencv"
        "gobot.io/x/gobot"
        "gobot.io/x/gobot/platforms/opencv"
)
func main() {
        window := opencv.NewWindowDriver()
        camera := opencv.NewCameraDriver(0)
        work := func() {
                camera.On(camera.Event("frame"), func(data interface{}) {
                        window.ShowImage(data.(*cv.IplImage))
                })
        }
        robot := gobot.NewRobot("cameraBot",
                []gobot.Device{window, camera},
                work,
        )
        robot.Start()
}

OpenGL


0 comments

There are no comments yet

Add new comment

Similar posts

Responsive Design and Go Mobile First

Kotlin Reference Guide

Kotlin Multiplatform 101, BPR

Kotlin Lang 101