comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Image proceesing in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Image proceesing in IDL [message #60807] Fri, 13 June 2008 10:28 Go to next message
arun is currently offline  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 #60910 is a reply to message #60807] Fri, 13 June 2008 10:53 Go to previous messageGo to next message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
> soilSubscripts = where(rotateImg ge 24000and rotateImg lt 30000,
> nSoilPixels)

add a space between 24000 and "and"

soilSubscripts = where(rotateImg ge 24000 and rotateImg lt
30000,nSoilPixels)

Jean
Re: Image proceesing in IDL [message #60911 is a reply to message #60807] Mon, 16 June 2008 04:25 Go to previous message
Gaurav is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: does idl program exist to format fortran programs intelligently?
Next Topic: second y-axis in iplot?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 06:56:35 PDT 2025

Total time taken to generate the page: 1.52296 seconds