opengeos / segment-geospatial

A Python package for segmenting geospatial data with the Segment Anything Model (SAM)
https://samgeo.gishub.org
MIT License
3.02k stars 312 forks source link

'sample_format == SAMPLEFORMAT_IEEEFP || sample_format == SAMPLEFORMAT_INT' #298

Closed gabengcuinirenne closed 1 month ago

gabengcuinirenne commented 3 months ago

Description

[ERROR:0@8.821] global loadsave.cpp:440 cv::imread imread('F:\code\imges\tq_overall_cut.tif'): can't read header: OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_tiff.cpp:350: error: (-2:Unspecified error) in function 'bool __cdecl cv::TiffDecoder::readHeader(void)'

: 'sample_format == SAMPLEFORMAT_IEEEFP || sample_format == SAMPLEFORMAT_INT' where '(int)sample_format' is 1

I'm getting this error, I'm entering a drone image, how can I fix this problem?

giswqs commented 3 months ago

Make sure the image is integer 8-bit