EADST

C++: Normalize Images with Mean and STD in OpenCV

C++: Normalize Images with Mean and STD in OpenCV

void preprocess_image(cv::Mat& img) 
{
    cv::resize(img, img, cv::Size(224, 224));
    img.convertTo(img, CV_32FC3);
    img /= 255;
    img -= cv::Scalar(0.485, 0.456, 0.406);
    img /= cv::Scalar(0.229, 0.224, 0.225);
}
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
站点统计

本站现有博文266篇,共被浏览440778

本站已经建立2019天!

热门文章
文章归档
回到顶部