C++ OpenCVコードをC#Emgucvに変換しようとしています。私はいくつかの行を変換しましたが、私は1行についています。C#EmguCV Mat.Ptr
Mat detectionMat(detection.size[2], detection.size[3], CV_32F, detection.ptr<float>());
私は
Mat detectionMat = new Mat(detection.SizeOfDimemsion[2], detection.SizeOfDimemsion[3], Emgu.CV.CvEnum.DepthType.Cv32F, detection.Ptr.ToPointer());
上記のように変換さしかし、私はdetection.Ptr.ToPointer(の問題を抱えている知っている)私は変換できませんでした。前もって感謝します。
caffe.PopulateNet(net);
Mat prob;
Mat img2 = new Mat(300,300,img.Depth,img.NumberOfChannels);
Emgu.CV.CvInvoke.Resize(img, img2, new Size(300, 300));
//Mat inputBlob = DnnInvoke.BlobFromImage(img2,0.007843, new Size(300, 300), new MCvScalar(127.5,127.5,127.5), true); // ??
Mat inputBlob = DnnInvoke.BlobFromImage(img, 0.007843, mean: new MCvScalar(127.5, 127.5, 127.5), swapRB: false);
net.SetInput(inputBlob, "data");
Mat detection = net.Forward("detection_out");
Mat detectionMat = new Mat(detection.SizeOfDimemsion[2], detection.SizeOfDimemsion[3], Emgu.CV.CvEnum.DepthType.Cv32F, detection.ptr<float>());
double confidenceThreshold = 0.2;
おかげで、私はバージョン3.3.0 EmguCVを使用しています。また、すべてのコード行で質問を編集します。注目に感謝 – Musa
私はコードを編集しました – Musa
私は最後のスタンドについてもお知らせします。あなたの興味に感謝します – Musa