1

Beaenter image description here

The beautiful image that you see is an orthomosaic [apparently this is not a yet a tag on this forum] generated in Agisoft Metashape [also not a yet a tag] with imagery captured with drone mounted with a MicaSense multispectral camera.

The color television static image is what I see when I import the orthomosaic into QGIS. If I fudge with the brightness and contrast I can get a better looking image but not the pristine vibrant image you see below. When I examine the properties of the image it gives me 6 bands and 3 of which are assigned R, G, and B. I feel that this assignment is the issue but honestly am not sure.

The MicaSense camera is used for RedEdge imagery and should have 5 bands from my understanding. I am having a hard time deciphering what Band1-6 actually represent and need to know for my analysis. What can I do to understand the wavelengths each band correspond to and to generate a usable image for analysis in QGIS?

gdalinfo (GDAL 2.2.3, released 2017/11/20) returns this:

Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Driver: GTiff/GeoTIFF
Files: Orthomosaic.tif
Size is 15407, 7125
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-77.015632553681499,42.879833861776198)
Pixel Size = (0.000000308213000,-0.000000226674000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=PIXEL
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Corner Coordinates:
Upper Left  ( -77.0156326,  42.8798339) ( 77d 0'56.28"W, 42d52'47.40"N)
Lower Left  ( -77.0156326,  42.8782188) ( 77d 0'56.28"W, 42d52'41.59"N)
Upper Right ( -77.0108839,  42.8798339) ( 77d 0'39.18"W, 42d52'47.40"N)
Lower Right ( -77.0108839,  42.8782188) ( 77d 0'39.18"W, 42d52'41.59"N)
Center      ( -77.0132582,  42.8790263) ( 77d 0'47.73"W, 42d52'44.49"N)
Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray
  Overviews: 7704x3563, 3852x1782, 1926x891, 963x446, 482x223, 241x112
  Unit Type: metre
Band 2 Block=256x256 Type=UInt16, ColorInterp=Alpha
  Overviews: 7704x3563, 3852x1782, 1926x891, 963x446, 482x223, 241x112
  Unit Type: metre
Band 3 Block=256x256 Type=UInt16, ColorInterp=Undefined
  Overviews: 7704x3563, 3852x1782, 1926x891, 963x446, 482x223, 241x112
  Unit Type: metre
Band 4 Block=256x256 Type=UInt16, ColorInterp=Undefined
  Overviews: 7704x3563, 3852x1782, 1926x891, 963x446, 482x223, 241x112
  Unit Type: metre
Band 5 Block=256x256 Type=UInt16, ColorInterp=Undefined
  Overviews: 7704x3563, 3852x1782, 1926x891, 963x446, 482x223, 241x112
  Unit Type: metre
Band 6 Block=256x256 Type=UInt16, ColorInterp=Undefined
  Overviews: 7704x3563, 3852x1782, 1926x891, 963x446, 482x223, 241x112
  Unit Type: metre
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.

These errors also occur with tiffinfo. Trying to read with Python's PIL, which I think is an independent code not using libtiff fails to open it:

>>> im = Image.open("./test.tif") # reads a test tiff okay...
>>> im = Image.open("./Orthomosaic.tif")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 2590, in open
    % (filename if filename else fp))
IOError: cannot identify image file './Orthomosaic.tif'
  • Does the documentation for the hardware not say what the bands are? Can you point us to a sample file we can experiment with? – Spacedman Jun 3 at 15:25
  • @Spacedman The Micasense user manual specifies bands 1-5 as blue, green, red, Near IR and Red Edge. Nothing is listed for band 6. I uploaded a file for experimentation onto google drive can be accesed here: drive.google.com/file/d/1HvMRd-A5Tw7eQBSxO2D2jIA2f_WXnjsp/… – Jonathan Berlingeri Jun 3 at 15:46
  • gdal is giving me some warnings on that file: "Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples." which might be a symptom. Something's not right with it... – Spacedman Jun 3 at 16:27
  • It loads as an image into Metashape and shows as grayscale, but it looks smooth and correct. Must be using a different TIFF reader to GDAL (and therefore QGIS). ImageMagick convert gives same error as GDAL. Not sure what else I can try... – Spacedman Jun 3 at 16:44
  • Read into R using the raster package, the metadata says the values range from basically 0 to 65535, but when the raster is read it gets values from -32767 to +32767. When plotted there's a clear discontinuity at 0. But even fixing that (by plotting abs(rgbstack) ) there's a mystery in that the image should be quite green but its not obvious that one band is much larger than the others and therefore the green band. – Spacedman Jun 3 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.