package sdk
|
|
import (
|
"analysis/work"
|
|
"basic.com/valib/gosdk.git"
|
)
|
|
// Run impl
|
func cloud(img *gosdk.SDKImage, rc *gosdk.CRECT, mW, mH int, rMsg *work.MsgRS, out chan<- work.MsgRS) {
|
|
// result := gosdk.PlateIDCloudSDKDetect(*img, rc)
|
// count := len(result)
|
// if count <= 0 {
|
// ejectResult(nil, *rMsg, out)
|
// return
|
// }
|
|
// plateids := convert2ProtoPlateIDResultCloud(result)
|
|
// plateresult := protomsg.PlateCloudIDResult{Result: plateids}
|
// data, err := proto.Marshal(&plateresult)
|
// if err != nil {
|
// logo.Errorln("PLATE ID DETECTOR MARSHAL PROTO PLATE IDS ERROR", err)
|
// data = nil
|
// }
|
// ejectResult(data, *rMsg, out)
|
}
|
|
// func convert2ProtoPlateIDResultCloud(obj []gosdk.CPlateIDCloudResult) []*protomsg.PlateCloudID {
|
// ret := []*protomsg.PlateCloudID{}
|
|
// for _, v := range obj {
|
|
// rcPlateID := &protomsg.Rect{
|
// Left: v.RcLocation.Left,
|
// Right: v.RcLocation.Right,
|
// Top: v.RcLocation.Top,
|
// Bottom: v.RcLocation.Bottom,
|
// }
|
// lic := string(v.License[:])
|
// end := len(lic)
|
// for i := len(lic) - 1; i >= 0; i-- {
|
// if lic[i] != '\000' {
|
// end = i + 1
|
// break
|
// }
|
// }
|
// if end > 0 {
|
// lic = lic[:end]
|
// }
|
|
// obj := &protomsg.PlateCloudID{
|
// License: lic,
|
// RcLocation: rcPlateID,
|
// NConfidence: v.NConfidence,
|
// NType: v.NType,
|
// NDirection: v.NDirection,
|
// NCarColor: v.NCarColor,
|
// NCarColor1: v.NCarColor1,
|
// NCarBright: v.NBright,
|
// FrameNo: v.FramNo,
|
// FaceWidth: v.FaceWidth,
|
// FaceHeight: v.FaceHeight,
|
// GrayFaceFlag: v.GrayFaceFlag,
|
// CharNum: v.CharNum,
|
// }
|
|
// ret = append(ret, obj)
|
// }
|
// return ret
|
// }
|