Forum

Author Topic: Imported Orthomosaic - appears black? colors? alpha channel?  (Read 3992 times)

LWR

  • Newbie
  • *
  • Posts: 8
    • View Profile
Imported Orthomosaic - appears black? colors? alpha channel?
« on: April 07, 2021, 09:57:17 AM »
Hi forum!

I have a question that is probably easy to solve, but I just can't figure it out right now. (So before I try it for a long time, I just ask you briefly) - Thanks in advance!

I imported a few orthomosaics (public data), but one type has the problem that the colors disappear in Metashape.
The orthomosaic becomes black.
How can I fix this?
(I have attached two screenshots of the corresponding pictures)

Thanks in advance!
LWR

Paulo

  • Hero Member
  • *****
  • Posts: 1352
    • View Profile
Re: Imported Orthomosaic - appears black? colors? alpha channel?
« Reply #1 on: April 07, 2021, 11:48:34 AM »
Hi LWR,

it seems you are trying to import a color map as an orthomosaic. How did you export this from your GIS software.? For example if I want to export a color OpenStreet Map from Global Mapper, I will choose 24 bit RGB option File format to be able to get a color ortho in MS. If I choose Black and White file format (1 bit) I will get a black and white ortho. I I choose 8 bit then I will get a grey scale map...

see attachement where I exported a color Open Street Map as 1 bit Black/White file type and when I import into MS then it appears almost all black. To get a color orthomap in MS, I should export as 24 bit RGB

Maybe this is the issue?
Best Regards,
Paul Pelletier,
Surveyor

LWR

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Imported Orthomosaic - appears black? colors? alpha channel?
« Reply #2 on: April 07, 2021, 11:59:16 AM »
Hi Paulo!
Thanks for the fast reply!
Unfortunately, I didn't create the file myself. This comes from an external institution over which I have no influence.
The image is georeferenced and has a bit depth of 8. Compression is "PackBits". Filetyp: "tif", with tfw-file.
The picture appears normal in other programs. Only in Agisoft it is not displayed correctly. (E.g. image editing programs such as GIMP)

Paulo

  • Hero Member
  • *****
  • Posts: 1352
    • View Profile
Re: Imported Orthomosaic - appears black? colors? alpha channel?
« Reply #3 on: April 07, 2021, 12:18:54 PM »
LWR,

can you open the Raster calculator in MS and check if ouput band 1 has a distribution of values in 0 to 255 range as in attached screen where I imported a 8 bit map into MS and checked the distribution of output band 1 in  histogram...in Transform Tab, I set output band to B1 and in Palette tab, I can see the histogram with range of values for B1 from 100 to  252 so it is a true 8 bit ortho and not 1 bit (0 or 1) B/W
Best Regards,
Paul Pelletier,
Surveyor

LWR

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Imported Orthomosaic - appears black? colors? alpha channel?
« Reply #4 on: April 07, 2021, 12:24:29 PM »
Here the histogram looks like this:
(or in other words - there is nothing)

LWR

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Imported Orthomosaic - appears black? colors? alpha channel?
« Reply #5 on: April 07, 2021, 12:27:07 PM »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15029
    • View Profile
Re: Imported Orthomosaic - appears black? colors? alpha channel?
« Reply #6 on: April 07, 2021, 03:38:09 PM »
Hello LWR,

It seems that the colors in the orthomosaic occupies only 0-25 value range instead of 0-255 for 8bit colors. So for visual purposes you can use Set Brightness to 1000%.

Alternatively set Raster Transform formula to B1/25, set Palette to Grayscale (with the default 0 - 1 range).
Best regards,
Alexey Pasumansky,
Agisoft LLC

Paulo

  • Hero Member
  • *****
  • Posts: 1352
    • View Profile
Re: Imported Orthomosaic - appears black? colors? alpha channel?
« Reply #7 on: April 07, 2021, 10:43:17 PM »
Hi LWR,

this was the trick to visualize map in grey scale. If you want to see your map with correct color palette, do following:

1. In Raster Calculator Transform Tab, set output band to B1 and Enable transform
2. In Palette Tab, set range from 0 to 31. And with Import Palette button, import file map.clr (attached).

Your map will now appear in color.
« Last Edit: April 08, 2021, 12:54:50 AM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

LWR

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Imported Orthomosaic - appears black? colors? alpha channel?
« Reply #8 on: April 08, 2021, 06:23:51 PM »
Thank you very much for your input!
After the hints and ideas I loaded the GeoTiff into QGIS and created the clr-map. After that, transforming into MS works very well.
Thank you for the input! (I would probably never have figured it out)