I’m developing a fisheye Dewarp plugin, and I want to get the real-time yuv format frame data for special processing, referring to the RGBEnhancement project.
_bitmapLiveSource = new BitmapLiveSource(_selectedItem, BitmapFormat.BGR24);
_bitmapLiveSource.LiveContentEvent += BitmapLiveSourceLiveContentEvent;
Initialize the BitmapLiveSource instance, bind the frame processing event, in the BitmapLiveSourceLiveContentEvent, I read the data in BGR24 format, and then convert it to yuv data, do the special processing with the yuv data, and then put it into the image control to display.
Now the problem is that the live video played by the image control sometimes has a green screen with mosaic, is this because the BitmapLiveSourceLiveContentEvent processing time is too long resulting in the loss of frame data, and I’m sure it’s not caused by the image processing? What is the best solution? I did try initializing the BitmapLiveSource to YCbCr420_Planar format, but the data read out and saved to a file to view yuv is not correct.
I’m using sdk version 24.2.2.
Translated with DeepL.com (free version)