preprocess.h 413 字节
Newer Older
A
authorfu 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#pragma once

#include <jni.h>
#include <opencv2/opencv.hpp>
#include "common.h"
cv::Mat bitmap_to_cv_mat(JNIEnv *env, jobject bitmap);

cv::Mat resize_img(const cv::Mat& img, int height, int width);

void neon_mean_scale(const float* din,
                     float* dout,
                     int size,
                     const std::vector<float>& mean,
                     const std::vector<float>& scale);