While opening and applying classification in ENVI in Classified image in SNAP

I have classified Image in SNAP using RF classifier and now want to open the classified image on ENVI and apply post classification method on it but this gives an error message. Please give me a solution.

this error.

you can open the hdr file belonging to the raster and replace this line:

file type = ENVI Standard
file type = ENVI Classification

you can also define colors, class names and other things in this hdr file: https://www.l3harrisgeospatial.com/docs/ENVIClassificationFiles.html

1 Like

I have replaced
file type = ENVI Standard
file type = ENVI Classification
in both 2 hdr file and tried to open in ENVI. But this time it shows SNAP2 this error message. File is not being opened.

what do you mean with “both 2 hdr files”?

Maybe you have to add information on the class names as well.

Please see this picture. I have changed file type of

these underlined file content by opening in notepad.

the confidence is just a raster containing continuous data, no need (and sense) to change the file type here.

But for the LabeledClasses.hdr, itis the correct way to make it ENVI conform.

This is how a classification file looks like (here with 10 classes) validation.hdr (540 Bytes)

for example. Would you mind sharing


in here?

Here I have uploaded those two file for you LabeledClasses.hdr (1.1 KB) LabeledClasses.img (725.6 KB)
Please see.
I am eagerly looking for your solution.


as I mentioned above, a classification file also needs definition of the classes (class names), the number of classes (classes), and optionally their colors (class lookup)

LabeledClasses.hdr (1.3 KB)

class names =  {unclassified, 1, 2, 3, 4, 5 }
classes = 6
class lookup =  { 0,0,0, 15,15,15, 50,50,50, 90,90,90, 150,150,150, 222,222,222 }

Interesting study area by the way :slight_smile: I have also worked in this area by the way [URL]

Thanks a lot for your solution. It worked.
And thanks for the article. May I have your email please…