2

I have some tif sattelite images, when I read them in with cv2 they are super dark, i checked and the mean pixel value is 6 ish. The maximum is 166, image viewers also show the images as super dark, but in QGISit's very bright.

Is there something I have to do to render it correctly? The image has 4 channels.

1 Answer 1

2

In the layer styling panel, you can change the brightness of the raster. Also make sure that Blending mode is set to Normal:

enter image description here

4
  • 1
    thank you very much, but actually the brightness in QGIS is perfect. It's cv2 i'm worried about. I've seen some threads here (similar but not the same) where the encoding had to be changed ?
    – Oliver
    Commented Oct 27, 2021 at 15:07
  • 4
    The really meaningful setting shows in the same image: Contrast enhancement that is "Stretch to MinMax. It means that with this setting the image max value 166 if shown as 255 on QGIS screen but cv2 probably shows unscaled 166 that makes quite a difference.
    – user30184
    Commented Oct 27, 2021 at 17:33
  • 3
    If you want that standard image viewers that do not stretch would show a similar bright image you must make the scaling permanent. For example gdal_translate can do that with option -scale gdal.org/programs/…
    – user30184
    Commented Oct 27, 2021 at 20:08
  • @user30184 thank you, I didn't get any notification on your comment, I'll try that now apologies for the late reply.
    – Oliver
    Commented Oct 31, 2021 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.