Hello, I’m a new user to OrfeoToolBox AND hyperspectral imagery, so I’m hoping to learn quite a bit from this community
I’m attempting to use LargeScaleMeanShift to segment hyperspectral imagery collected by drone, provided in ENVI format. I have attached a small clip of the data with header file. I got the idea from this paper.
My issue is that I am unable to get LargeScaleMeanShift to segment the data in its original format. If I include the total number of spectral bands in the data (328 bands), LargeScaleMeanShift returns the segmentation vector output as a single polygon positioned in the upper left corner of the region where the data were collected (see uploaded image). The dimensions of the polygon equal my input for parameters “size of tiles in pixel (X or Y axis)”. Label maps produced by this process denote a single label value for the entire region. I thought originally this could be a memory issue, as the original ENVI file is 5 GB, but even a much smaller clip of the data (header file attached, data file is ~35MB) does not produce proper segmentation.
However, I am able to get segmentation if I reduce the number of bands to three, just to cover RGB, and save the data as a non-georeferenced image (a PNG, JIF, or TIF for example) rather than as a georeferenced ENVI or GeoTIFF file. Unfortunately, I hope to a) keep the data as a georeferenced object and b) use all the separate spectral bands to inform segmentation, rather than just three. Segmentation also does not occur if I reduce the number of bands but save the data in georeferenced ENVI or GeoTIFF format.
I have tried several times to perform segmentation by using alternative raster formats and (arbitrarily!) testing the input parameters for LargeScaleMeanShift (spatial radius, range radius, minimum segment size, size of tiles in pixel) to no avail. The only thing that seems to work for me is to give it a non-georeferenced rgb image. My understanding of this tool is limited so I assume that I am setting things up incorrectly, though I am following instructions in the LargeScaleMeanShift online doc.
After reviewing the online doc, I decided to run the different components of LargeScaleMeanShift independently (MeanShiftSmoothing, LSMSSegmentation, LSMSSmallRegionsMerging and LSMSVectorization). MeanShiftSmoothing works fine, but LSMSSegmentation does not produce expected results.
I am using OTB version 7.1 on a Windows 10 machine, and loading the segmentation tool through the Monteverdi application launcher GUI.
Thanks for any advice you can pass along.
raw_0_clip7-6.hdr (3.6 KB)