Forum

Author Topic: Option for Multispectral images?  (Read 7221 times)

arslankas

  • Newbie
  • *
  • Posts: 4
    • View Profile
Option for Multispectral images?
« on: July 23, 2019, 05:05:05 PM »
Hi everyone,

I'm trying to create an Orthomosaic from Multispectral images but i have searched the entire forum and the documentation and they all say that a dialog box will appear while " Adding Photos " and then we have to choose some option.......but no dialog box opens up in Metashape. Only the browsing window comes up.

Is that feature removed in Metashape or i'm doing something wrong. I currently have [ NIR,R,G] images.
Is there a Python script for adding multispectral images or a tutorial video? Please help.
Thank you

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Option for Multispectral images?
« Reply #1 on: July 23, 2019, 06:22:22 PM »
Hello arslankas,

If you have images separated per band into sub-folders of some "master" directory, then you should use Add Folder option from the Workflow menu and point to that folder location. After that select Multi-camera system layout option.
Best regards,
Alexey Pasumansky,
Agisoft LLC

arslankas

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Option for Multispectral images?
« Reply #2 on: July 23, 2019, 07:10:59 PM »
Thanks for the reply respected Sir Alexey Pasumansky,

No the images are not separated by the bands. It's just " .tiff " files and they contain [NIR,R,G] bands. So how should i approach it now?
By the way " Multi-camera system layout option " is nowhere to be seen. Is there a video tutorial of Metashape that could guide me?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Option for Multispectral images?
« Reply #3 on: July 23, 2019, 07:16:43 PM »
Hello arslankas,

In case the bands within each TIFF are already aligned with each other you can process the images as regular three-channel RGB images.

Do you see all the three channels in the Tools Menu -> Camera Calibration dialog?
Best regards,
Alexey Pasumansky,
Agisoft LLC

arslankas

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Option for Multispectral images?
« Reply #4 on: July 23, 2019, 09:27:06 PM »
Yes Sir Alexey Pasumansky,

In the camera calibration dialog it states the bands as [R,G,B] instead of [NIR,R,G].
Is it fine sir? Can i proceed with the regular Orthomosaic generation process or do i have to change some settings?
Will it export as Multispectral Orthomosaic?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Option for Multispectral images?
« Reply #5 on: July 23, 2019, 10:00:09 PM »
Hello arslankas,

By default the output orthomosaic will have the same bands that are present on the input images. So despite the output orthomosaic bands could be marked as RGB, they should be treated as NIR, R, G, if that is the same order of bands present in the source image set.

The RGB labeling for the channels may be related to the corresponding information present in the metadata of the input images.
Best regards,
Alexey Pasumansky,
Agisoft LLC

marinosvlachos

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Option for Multispectral images?
« Reply #6 on: May 26, 2022, 01:33:25 PM »
Hello i am also trying to process an image block from RedEdge sensor using python code. I tried using the scripts suggested here and when i get the following script i get an error:

import Metashape
import os
import re

photosDir = "C:/Users/marin/OneDrive/Desktop/Photos"
doc = Metashape.app.document
chunk = doc.addChunk()
photos = os.listdir(photosDir)


images = list()
for i in range(0,len(photos)):
    images.append(photosDir+photos)
chunk.addPhotos(images, Metashape.MultiplaneLayout)


The error that i get is the following: 
line 26, in <module>
images.append(photosDir+photos)
TypeError: can only concatenate str (not "list") to str

What am I doing wrong here? I need to mention that I am using version 1.8.3
« Last Edit: May 26, 2022, 01:36:22 PM by marinosvlachos »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Option for Multispectral images?
« Reply #7 on: May 30, 2022, 04:11:35 PM »
Hello Marinos,

Probably you need to modify the problematic line from
Code: [Select]
  images.append(photosDir+photos)to
Code: [Select]
  images.append(photosDir + "/" + photos[i])
Best regards,
Alexey Pasumansky,
Agisoft LLC

kschroll

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Option for Multispectral images?
« Reply #8 on: July 13, 2022, 10:53:01 AM »
Hello,
I am not sure, if I understood your problem right. We had the issue, when loading RGBI-Images, that Agisoft Metashape recognized that there are four channels, but did not recognize and interpret the infrared channel as such (This was recognizable when opening the "set primary channel" - where the infrared-channel was not named). We ran this python-script, so it worked.

import Metashape
for sensor in Metashape.app.document.chunk.sensors:
    sensor.bands = "Red", "Green", "Blue", "NIR"

So it was only the problem of naming the NIR channel.