How to discard the image background value automatically?
By Cai Li in ERDAS Software Forum
I have an image with background value o, and there is no 0 value in the image valid area. How can I delete the background value automatically in ERDAS?
Thank you very much in advance.
----------------------------------
You were sent this email because you opted to receive email notifications when someone created a new thread, or replied to a topic within this forum, ERDAS Software Forum.
To unsubscribe:
Re: How to discard the image background value automatically?
By Timo Ikola in ERDAS Software Forum
You really can not do it. Zeros are there to say. The good example of this case is following case. There is image that is clipped non square form. If you look "empty" pixels in minimum bounding box they contain value 0 (second image)if you look pixels outside minimum bounding box they contain nothing.
So data in imagine has always 0 as a background value. You can change this to anything else for example with Recode function however there is not possible to get really rid of those as there is no separate "No Data" value in Imagine that is always considered as empty.
So the practical approachs really in Imagine is that you have to use "Ignore Zeros in Stats" in functions , "Transparent Background" in file opening and also from Iage Info - edit - set/clear no data value depending on each case to make it do the thing you want. It is bit unhandy I agree but it works fairly well when you learn the logics of the tool.
timo
Image 1 - data outside minimum bounding box
Image 2:: data inside minimum bounding box
----------------------------------
You were sent this email because you opted to receive email notifications when someone responded to this thread.
By Cai Li in ERDAS Software Forum
Dear Dimo,
Thank you very much for your detail reply. In fact, I tried Edit Image metadata->set the nodata value to "0" and then apply "clear nodata value ", but it does't work at all.
What happen to me ?
The attach is my vedio of my operate. please check it and help me find the error.
Thanks again!
Re: How to discard the image background value automatically?
By Cai Li in ERDAS Software Forum
sorry. I post the wrong vedio.
Here is the vedio. http://163.fm/TUtOcYR
I can't post the vedio directly. So I upload to the my email , please download from network. Pickup code: BtHAmxwh
Thank you very much.
By Timo Ikola in ERDAS Software Forum
I looked your video and it tells me that Imagine works excactly as designed. The only thing you did not test is that how it acts when you open file and leave 0 as a no data value. In video at least you did not test that. I bet that gives you equal result as the one with Background transparent setting.
Otherwise it makes completely sense and bacground transparent seems to do the trick you want. What happens when you go to some third party application like ArcGIS - that is a different story. Now you are playing just with viewing settings in Imagine.
So I see no bug here - this is how Imagine works.
timo
By Cai Li in ERDAS Software Forum
Dear Timo,
I still can't get the right result . I try again as what you said. But there still exist 0 value. May I please ask you record your step as a vedio ? I can't fully understand what you mean. Thank you very much again. It would be very kind of you to help me so much.
Cai
By Timo Ikola in ERDAS Software Forum
Me neither - but now I understand. There is really no way to get of those zeros you see. That is how Imagine works. The only way to control is what to do with those zeros
This comes due fact that there is no separate NoData value in Imagine and often that is considered to be zero. In regions that falls inside minimum bounding box you always see zeros (or some other value if you define so). You can not get rid of those in anyway. Outiside of this box there is nothing as you see.
This is how Imagine is designed and you have to live with that using the settings discussed here. So you can not get rid of those you just need to live with them.
As a development case for future this hint of separate NoData value is worth of thinking in Atlanta. In some cases that is needed and now we do not have it. I agree that with nowdays settings you can live with it but sometimes having some generic no data value would be usefull. Especially when there is some real pixels with value zero (like black texts in some maps).
timo
By Cai Li in ERDAS Software Forum
OK. Now I understand deeply. Thank you very much for your detail explain.
I thought you removed the "0" because in your picture inquire point shown nothing value. So the clear nodata value does not work at all.
Then I had to live with them. I hope Atlanta can fix it soon. "Nodata" is different from"0" value. So we should distinguish them, maybe use a "-9999" or other different value to display Nodata value.
Thanks again.
Cai
By Timo Ikola in ERDAS Software Forum
Clear NoData works - but not neccessarily in place where you use it now. It is used for example to define DEM regions in orthorectification etc. So its is not just a viewing case but also used ín elsewhere in Imagine processes. I thing viewer handles this 0/NoDATA quite well without any tricks. You just need to understand the logics.
-9999 used to be old Er Mapper way. That is fine inside that tool but causes plenty of troubles if data is taken to some less advanced image processing tool. How it will handle data that contains some pixels with value -9999 and then real data bit over zero. That leads often to bright white squares in those other applications and that is not good either.
So it is a trade off - in some cases Erdas current approach is better in some cases separate fixed NoData value is better. There is no solution that is perfect in all cases.
timo