今天初次接触关于恩智浦的芯片,发现里面涉及apexcv部分知识,头疼不已,现将学习的记录下吧
1、读入图片
我们通过opencv读入图片,然后转换成apexcv数据类型Vsdk Umat
vsdk::UMat image = cv::imread("in_color_256x256.png", CV_LOAD_IMAGE_COLOR).getUMat(cv::ACCESS_RW);
// read the image via OpenCV, internally convert to vsdk UMat
// during conversion, the non-OAL memory is detected, UMat allocates OAL Memory and copies data to be used in vsdk
2、保存图片
// If the read image isn't contiguous (allocated on heap) when retyped to "image", this issue is detected, OAL memory is newly allocated and data copied internally
// Fast data copy TBD
{
vsdk::UMat image = cv::imread("in_color_256x256.png",
CV_LOAD_IMAGE_COLOR).getUMat(cv::ACCESS_RW);
// ... image is safe to be us