WriteableBitmapをC++/cx Microsoftのユニバーサルアプリケーションでcv :: Matに変換しようとしました。私が作成したマットで進行しようとする。しかし、私は次のエラーを取得する:SoftwareBitmapまたはWriteableBitmapをC++/cxのcv :: Matに変換する
これは私のコードです:
void App1::MainPage::processImage(SoftwareBitmap^ bitmap)
{
WriteableBitmap^ wb = ref new WriteableBitmap(bitmap->PixelWidth, bitmap->PixelHeight);
bitmap->CopyToBuffer(wb->PixelBuffer);
Mat img_image(wb->PixelHeight, wb->PixelWidth, CV_8UC3,(void*)wb->PixelBuffer);
//next step results in error
cvtColor(img_image, img_image, CV_BGR2BGRA);
...
}
だから私の最後の質問: SoftwareBitmapを変換する方法やWriteableBitmapをcv :: Matにする?