Image proceesing in IDL [message #60807] |
Fri, 13 June 2008 10:28  |
arun
Messages: 6 Registered: June 2008
|
Junior Member |
|
|
Hi,
I have a tiff image of the dimesion 3000 x 3000 which is actually a
gray scale image.I want to calculate the amount of soil,water and air
present in the image.I tried using histogram to apply threshold but
its not working fine.Can anyone suggest me how to do it.I am an
invoice so any help would be appreciated.Below is the code which i
have used.
nPixels = n_elements(rotateImg)
soilSubscripts = where(rotateImg ge 24000and rotateImg lt 30000,
nSoilPixels)
percentSoil = float(nSoilPixels) / nPixels
waterSubscripts = where(rotateImg ge 18000 and rotateImg lt 23000,
nWaterPixels)
percentWater = float(nWaterPixels) / nPixels
PRINT, percentSoil
PRINT, percentWater
With Regards
Arun
|
|
|
|
Re: Image proceesing in IDL [message #60911 is a reply to message #60807] |
Mon, 16 June 2008 04:25  |
Gaurav
Messages: 50 Registered: January 2007
|
Member |
|
|
Arun, perhaps you are stuck with cases of overlapping DN values. Are
you sure you have chosen the right range of DN values? I am sure you
have had your session of trial and error with that.If you had more
than one band of images for the area, it might have been a tad easier.
But what has left me really curious is how you are going to classify
the "air" pixels? I do not even have the foggiest idea as to what it
could mean. Please clarify. Otherwise your approach seems fine.
Regards
Gaurav
|
|
|