Alturos.Yolo
Alturos.Yolo copied to clipboard
Detect bitmap with IntPtr
Hi,.. I use your wrapper for yolo image detection and I want to detect an bitmap with an IntPtr because conerting to byteArray has a big time issue for my app.
But I always receive null because your wrapper catches the original Exception. Maybe somebody can help me.
My code looks like this.
` public static IEnumerable<YoloItem> Detect(this YoloWrapper yolo, Bitmap img) {
BitmapData bmpData = img.LockBits(new Rectangle(0, 0, img.Width, img.Height), ImageLockMode.ReadOnly, img.PixelFormat);
var size = img.Height * img.Width * 4;
var res = yolo.Detect(bmpData.Scan0, size);
img.UnlockBits(bmpData);
return res;
}
`
It would be great if somebody can help what I can do to do detection as fast as possible