| | |
| | | |
| | | picMat := gocv.IMRead(filePath, gocv.IMReadColor) |
| | | |
| | | window := gocv.NewWindow("Hello") |
| | | window.IMShow(picMat) |
| | | |
| | | defer picMat.Close() |
| | | |
| | | if picMat.Empty() { |
| | |
| | | height := int32(picMat.Rows()) |
| | | width := int32(picMat.Cols()) |
| | | data := picMat.ToBytes() |
| | | //wrMat,_ := gocv.NewMatFromBytes(picMat.Rows(),picMat.Cols(),gocv.MatTypeCV8UC3,data) |
| | | // |
| | | //gocv.IMWrite("xxx.jpg", wrMat) |
| | | |
| | | i = protomsg.Image{ |
| | | Width: width, |
| | | Height: height, |
| | |
| | | fmt.Println("Len(sdkInfos)=",len(sdkInfos)) |
| | | for _,swt :=range sdkInfos{ |
| | | fmt.Println("sdkName:",swt.SdkName) |
| | | if swt.Sdktype =="FaceDetect"{ |
| | | fmt.Println("人脸检测结果") |
| | | var rfd protomsg.ResultFaceDetect |
| | | err := proto.Unmarshal(swt.Sdkdata, &rfd) |
| | | if err !=nil { |
| | | fmt.Println("faceDetect result unmarshal err:",err) |
| | | } else { |
| | | fmt.Println("FacePos:",rfd.Pos) |
| | | fmt.Println("ThftResult:",rfd.Result) |
| | | } |
| | | } |
| | | if swt.Sdktype == "FaceExtract"{ |
| | | |
| | | fmt.Println("sdkData.len:",len(swt.Sdkdata)) |