You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey, this is just based on the docs and not tested. it assumes that emgu.cv is used and opencv has BGRA as internal color format (I couldn't verify that).
IImageimage=default;// get your image hereMatmaterial=newMat(image.Height,image.Width,DepthType.Cv8U,image.ColorFormat.BytesPerPixel);image.CopyTo(newSpan<byte>((void*)material.DataPointer,image.Width*image.Height*image.ColorFormat.BytesPerPixel));
or
RefImage<ColorBGRA>image=default;// get your image hereMatmaterial=newMat(image.Height,image.Width,DepthType.Cv8U,ColorBGRA.ColorFormat.BytesPerPixel);image.CopyTo(newSpan<ColorBGRA>((void*)material.DataPointer,image.Width*image.Height));
I'm currently working on abstracting this kind of conversion a bit more to make it easier in the future.
Hi,
First, many thanks for this code/project.
Do you have a sample code to convert the screencapture to an OpenCV image ? Or a link to do this ?
Thanks.
The text was updated successfully, but these errors were encountered: