I have made an image using the opencvsharp but when I want to open the image it shows a gray screen. This is the code I use:
using (var frames = pipeline.WaitForFrames())
{
var colorFrame = frames.ColorFrame.DisposeWith(frames);
var depthFrame = frames.DepthFrame.DisposeWith(frames);
Mat test = new Mat(depthFrame.Height, depthFrame.Width, MatType.CV_16UC1, depthFrame.Data);
using (OpenCvSharp.Window window = new OpenCvSharp.Window("Camera"))
{
window.ShowImage(test);
}
the rest of the code is the same as librealsense from github: https://github.com/IntelRealSense/librealsense/tree/master/wrappers/csharp does anyone know why the image is not showing in the window
I have found a solution to this question. It is very simple. After the ShowImage needs a WaitKey(0) for it to show. That is all
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.