basler / pypylon

The official python wrapper for the pylon Camera Software Suite
http://www.baslerweb.com
BSD 3-Clause "New" or "Revised" License
567 stars 207 forks source link

How to increase the quality of the images ? #391

Open abdullahfadel opened 3 years ago

abdullahfadel commented 3 years ago

Hi,

when I set the quality=100 in save_image.py and I save the images, I see the best quality I get around 5MB only. When I try to capture the images in pylon Viewer I get 24MB quality of the image. Do you know how to increase the quality in the code or do we have any special parameters to add?

Thanks

SMA2016a commented 3 years ago

if you need an image with more quality then you should save the image uncompressed in png or bmp

abdullahfadel commented 3 years ago

@SMA2016a Do you know how to save uncompressed images? I am following this example : https://github.com/basler/pypylon/blob/master/samples/save_image.py

SMA2016a commented 3 years ago
  filename = "saved_pypylon_img_%d.png" % i
  img.Save(pylon.ImageFileFormat_Png, filename)

simply remove the jpeg path.