1
我需要在Android位图中转换1通道iplimage(灰色)。我有:1 channel iplimage - > Android位图
IplImage aux = IplImage.create(senal_gray.width, senal_gray.height, IPL_DEPTH_8U, 4);
cvCvtColor(senal_gray, aux, CV_GRAY2BGRA);
Bitmap bm = Bitmap.createBitmap(aux.width, aux.height, Bitmap.Config.ARGB_8888);
bm.copyPixelsFromBuffer(aux.getByteBuffer());
我认为问题是在渠道的顺序,因为与此代码我得到一个半透明的图片。也许我需要改变“aux”中的通道顺序来获取ARGB顺序并检查位图配置(ARGB_8888)。这可能吗?