I'm doing several segmentation tests between satellite and drone images with rsgislib
. On the satellite images I had no problem but when I try the drone images the following error appears after the elimination of clumps:
Relabel clumps.
Opening clumps file: ./stack_image_clumps_elim.tif
Processing using Disk
Traceback (most recent call last):
segutils.runShepherdSegmentation(image,image_clump,img_mean,gdalformat='GTiff',numClusters=100,minPxls=50,distThres=50,sampling=100,kmMaxIter=50)
File "/home/ubuntu/anaconda3/envs/osgeo-env-v1/lib/python3.7/site-packages/rsgislib/segmentation/segutils.py", line 191, in runShepherdSegmentation
rsgislib.segmentation.relabelClumps(elimClumpsFile, outputClumps, gdalformat, processInMem)
_segmentation.error: Could not create GDALDataset.
Do you think it could be a gdal problem?
The clip data of the image I'm using is this: gdalinfo -proj4 /home/ubuntu/Scrivania/Dataset/clip.tif
Driver: GTiff/GeoTIFF
Files: /home/ubuntu/Scrivania/Dataset//clip.tif
/home/ubuntu/Scrivania/Dataset//clip.tif.aux.xml
Size is 709, 381
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
PROJ.4 string is:
'+proj=longlat +datum=WGS84 +no_defs '
Origin = (16.099964890241999,39.047416366858158)
Pixel Size = (0.000000160878672,-0.000000160878672)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 16.0999649, 39.0474164) ( 16d 5'59.87"E, 39d 2'50.70"N)
Lower Left ( 16.0999649, 39.0473551) ( 16d 5'59.87"E, 39d 2'50.48"N)
Upper Right ( 16.1000790, 39.0474164) ( 16d 6' 0.28"E, 39d 2'50.70"N)
Lower Right ( 16.1000790, 39.0473551) ( 16d 6' 0.28"E, 39d 2'50.48"N)
Center ( 16.1000219, 39.0473857) ( 16d 6' 0.08"E, 39d 2'50.59"N)
Band 1 Block=709x1 Type=Float32, ColorInterp=Gray
Min=3.064 Max=71.527
Minimum=3.064, Maximum=71.527, Mean=17.079, StdDev=5.091
Metadata:
STATISTICS_MAXIMUM=71.52693939209
STATISTICS_MEAN=17.079104771775
STATISTICS_MINIMUM=3.0640306472778
STATISTICS_STDDEV=5.0911572606558
STATISTICS_VALID_PERCENT=100
Band 2 Block=709x1 Type=Float32, ColorInterp=Undefined
Min=3.802 Max=75.472
Minimum=3.802, Maximum=75.472, Mean=24.900, StdDev=6.595
Metadata:
STATISTICS_MAXIMUM=75.472129821777
STATISTICS_MEAN=24.900370899054
STATISTICS_MINIMUM=3.8024840354919
STATISTICS_STDDEV=6.5952746947653
STATISTICS_VALID_PERCENT=100
Band 3 Block=709x1 Type=Float32, ColorInterp=Undefined
Min=1.194 Max=78.540
Minimum=1.194, Maximum=78.540, Mean=21.044, StdDev=8.013
Metadata:
STATISTICS_MAXIMUM=78.540351867676
STATISTICS_MEAN=21.044218785929
STATISTICS_MINIMUM=1.1944425106049
STATISTICS_STDDEV=8.0133438150243
STATISTICS_VALID_PERCENT=100
Band 4 Block=709x1 Type=Float32, ColorInterp=Undefined
Min=8.460 Max=178.914
Minimum=8.460, Maximum=178.914, Mean=48.266, StdDev=16.729
Metadata:
STATISTICS_MAXIMUM=178.91448974609
STATISTICS_MEAN=48.265627691868
STATISTICS_MINIMUM=8.4597034454346
STATISTICS_STDDEV=16.728918023443
STATISTICS_VALID_PERCENT=100
Band 5 Block=709x1 Type=Float32, ColorInterp=Undefined
Band 6 Block=709x1 Type=Float32, ColorInterp=Undefined
Band 7 Block=709x1 Type=Float32, ColorInterp=Undefined
Band 8 Block=709x1 Type=Float32, ColorInterp=Undefined
How can I solve the problem?