imageClassifier error : GetBlockRef failed at X block offset ....., Y block offset .... what causes this and how to get rid of it?

Hello, i’m a recent user of OTB and i only know how to use it for teledetection using always the same process.
So i have my ROI that i made with the “roi extractor” (on a IR map Spot6 0.5m per pixel), i saved it as an image only. I created the stat file with “computeimagestatistics”. Then i made my vector for my classification on that ROI. I launched a “train image classifier” (libvsm linear to be precise) and obtained my model file without problem using all this elements and it works ! Great !
Here come the issue, the key process is the “imageClassifier” and that’s exactly what doesn’t work well.
So i give it my ROI, my stats file and my model file, give the result a .tif name and lauch it. The process begin well 90% of the time (idk why it doesn’t work sometimes) and so on until i get this message (the process may be at 20% as at 60%) :
2019-01-17 12:05:00 (FATAL): itk::ERROR: GDALImageIO(00000200843AB1F0): Error while reading image (GDAL format) ‘my image’ : GetBlockRef failed at X block offset 0, Y block offset 6766 (every time i launch it it failed at a different block in Y but at X block offset = 0.
What have i done wrong ? Why didn’t i encounter this problem on other works i produced and how to deal with it ?
Please save me and ty for your help.

What version of OTB are you using?

I suspect there is something wrong with your image. Maybe try re-doing the Extract ROI from the original image and try again?

i use the most recent version as i downloaded it on this new pc only last week.
the thing is that i tried it on different portion (that i got using “extract roi”) of the image and the same problem still occurs. Should i try redoing it anyway ? If i do should i relaunch the trainmodel to ?

Which operating system are you using ? Can you send us sample data ? Model file, stats file, and a (small) ROI which has the problem ?

Are you using applications from command-line, qgis, monteverdi, or standalone graphical interface ?

So, i’m working on qgis, with Mapla (monterverdi), on Windows 10 pro. I can give you a part of the roi, the model, the stats for the part of the roi. I won’t give you the sample vector as it was made on a larger Roi and so you won’t see how i did the polygones.

stats_ROI_split_1.1.xml (512 Bytes)
train melk lib linear (436.1 KB)

Do you have the image also ? I can not see it.

sorry i have some trouble sending it as it is quite heavy

i definitely can’t maybe it’s too heavy for the forum. If you have any idea tell me but even if i zip it can’t upload my image… the good new is that i had no issue with a really tiny image. I’m trying poughov solution in case it could work

Hi @Beniluvatar, what is the size of this image?

73000 ko, i’ll send it as a wetransfer link


it worked without issue on this image but not on any bigger part of my ROI
Poughov soluce didn’t work btw, doing it all again changed nothing… same issue, thanks anyway
Just to let you know, to create my roi i had to make a vrt that i saved as an image and that’s on this image that i extracted my ROI

It seems to be a windows related issue. I cannot reproduce it with develop on linux!

What do you mean exactly ? What can i do ?

I am not sure right now, I will try to reproduce it on windows 10.
Some questions or some test you can do :
have you try it with the ROI you give us? Did you get the same error? Can you send the result of gdalinfo on your input?
In anyway do not give up! :slight_smile:

As i said before, it worked with this image but not on any bigger image. It’s always the same error message. ty i’m trying to do it pieces after pieces

Ok, sorry I didn’t read correctly your previous post. Can you send the result of gdal info on your original image?

what do you mean by the gdal info result ? What i can tell you is that it’s always the same error during the same process. Only the block ref in Y change in the error message.

I mean use the executable gdalinfo that is in the binary and post the output of :
gdalinfo.exe my_image.tif

I’m sorry to be a drag… gdalinfo.exe doesn’t lauch on my pc … does it require any other software ?