My Pleora SDK is licensed, I am not talking about the watermark.
Sometimes it saves just fine, other times though the images saves with these horizontal line artifacts.
I'm saving the image like this:
PvBuffer buffer;
PvResult operationalResult;
var filename = "...some filename...";
var result = stream.RetieveBuffer(ref buffer, ref operationalResult, 100);
if(result.IsOK())
{
PvImage image = buffer.Image;
var bitmap = new System.Drawing.Bitmap(
width: (int)image.Width,
height: (int)image.Height,
format: PixelFormat.Format24bppRgb
);
image.CopyToBitmap(bitmap);
bitmap.save(filename, ImageFormat.Jpeg);
}
Example image with issue:
Those 2 horizontal lines are what I am talking about. Sometimes they are present, sometimes not, sometimes it's only 1 line.
What could I be doing differently to avoid this issue?
Instead of using
image.CopyToBitmap(bitmap);
as outlined above. I attached an OpenCV Mat (Emgu) to the PvImage when I allocate buffers for thePvStream
When I retrieve the buffer, I do a color conversion since the camera captures BayerRG8 (costs about 9ms on average):
And save that:
Seems I get no artifacts anymore.