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)。這可能嗎?