CVOTeach
此函数在对象的示教过程中被调用。
如果不需要示教,则无需实现。
CVOAPI int32_t CVOTeach(CVO_PARAMS* inParams, CVO_PARAMS* outParams, CVO_IMG* img, CVO_MODEL* mdl)
{
return CVO_NOERROR;
}
将模型窗口的图像信息传递给 CVO_IMG。请将其作为模型信息使用。
也可以在 RC+ 端管理已示教的模型信息。
如需在 RC+ 端进行管理,请将二进制信息返回给 CVO_MODEL。
CVOAPI int32_t CVOTeach(CVO_IMG* img, CVO_MODEL* mdl)
{
int32_t width = img->Width;
int32_t height = img->Height;
int32_t stride = img->Stride;
mdl->Size = 4 + 4 + 4 + stride * height;
memcpy(mdl->pBuffer + 0, &width, 4);
memcpy(mdl->pBuffer + 4, &height, 4);
memcpy(mdl->pBuffer + 8, &stride, 4);
memcpy(mdl->pBuffer + 12, img->pBuffer, stride * height);
return CVO_NOERROR;
}
← CVOGetProfile CVORun →