-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
I have two identical VideoCharacteristics but the higher frame rate (5/2) produces uncompressed high quality image and the lower frame rate (1/1) produces compressed lower quality image.
Code example:
var videoCharacteristic = new VideoCharacteristics(
PixelFormats.YUYV,
2592, 1944,
new Fraction(5, 2),
"YUY2", true,
"32595559-0000-0010-8000-00aa00389b71");
byte[] imageData = await deviceInfo.TakeOneShotAsync(
videoCharacteristic);
Console.WriteLine($"Width: {videoCharacteristic.Width}, Height: {videoCharacteristic.Height}, " +
$"PixelFormat: {videoCharacteristic.PixelFormat}, IsCompression: {videoCharacteristic.IsCompression}");
Console.WriteLine($"Image1 data length: {imageData.Length}");
// Save to file
await File.WriteAllBytesAsync("oneshot1.bmp", imageData);
videoCharacteristic = new VideoCharacteristics(
PixelFormats.YUYV,
2592, 1944,
new Fraction(1, 1),
"YUY2", true,
"32595559-0000-0010-8000-00aa00389b71");
imageData = await deviceInfo.TakeOneShotAsync(
videoCharacteristic);//, TranscodeFormats.DoNotTranscode);
// Save to file
await File.WriteAllBytesAsync("oneshot2.bmp", imageData);
Console.WriteLine($"Width: {videoCharacteristic.Width}, Height: {videoCharacteristic.Height}, " +
$"PixelFormat: {videoCharacteristic.PixelFormat}, IsCompression: {videoCharacteristic.IsCompression}");
Console.WriteLine($"Image2 data length: {imageData.Length}");
Output looks like:
Width: 2592, Height: 1944, PixelFormat: YUYV, IsCompression: False
Image1 data length: 15116598
Width: 2592, Height: 1944, PixelFormat: YUYV, IsCompression: False
Image2 data length: 484803
Is this an issue with the camera or with FlashCap? Can I do anything to help debug or sort the issue?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested