Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.12k stars 4.14k forks source link

关于还原图像 #5114

Open 523997931 opened 10 months ago

523997931 commented 10 months ago

最近在尝试用ncnn实现超分,从一个mat输入后,得到了另一个mat,我希望能够将这个mat转换为android可接受的rgb图像,类似unsigned char数组,我应该用什么操作去进行呢,还是对mat的数组逐个进行赋值呢

nihui commented 10 months ago

参考 https://github.com/nihui/ncnn-android-styletransfer/blob/4f65e0719b70fd4f283b3616fcf2af84c93dc6e7/app/src/main/jni/styletransferncnn_jni.cpp#L120