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

Home » Public Forums » archive » Re: 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
Re: Image proceesing in IDL [message #60791] Fri, 13 June 2008 16:59 Go to next message
enod is currently offline  enod
Messages: 41
Registered: November 2004
Member
On Jun 14, 1:28 am, arun <mailtosa...@gmail.com> wrote:
> 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,
~~syntax error?
> 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 #60799 is a reply to message #60791] Fri, 13 June 2008 12:05 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
David,
he probably meant novice, so I don't think there is money in this for you.
:-)

Haje


"David Fanning" <news@dfanning.com> wrote in message
news:MPG.22bc6119510b49aa98a3ac@news.frii.com...
> arun writes:
>
>> I am an invoice ...
>
> Darn. If you were a check, it would be easier. :-(
>
> What exactly seems to be going wrong here? Why do
> you think it is "not working"?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Image proceesing in IDL [message #60805 is a reply to message #60799] Fri, 13 June 2008 10:49 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
arun writes:

> I am an invoice ...

Darn. If you were a check, it would be easier. :-(

What exactly seems to be going wrong here? Why do
you think it is "not working"?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Image proceesing in IDL [message #60806 is a reply to message #60805] Fri, 13 June 2008 10:44 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Jun 13, 12:28 pm, arun <mailtosa...@gmail.com> wrote:
> 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

Looks fine to me - what does 'its not working fine.' mean, exactly?
Re: Image proceesing in IDL [message #60898 is a reply to message #60806] Mon, 16 June 2008 11:07 Go to previous message
arun is currently offline  arun
Messages: 6
Registered: June 2008
Junior Member
Hi Vince,
The histogram contains 2 peaks of the same size.SO the result
has to be 50% each.But the output is as follows.....
Soil Percent = 0.140934
Water percent = 0.140398

I want to know is there any method to calculate themfrom histogram

Thanks & Regards
Arun
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: An algorithm puzzle
Next Topic: Following a ridgeline

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

Current Time: Wed Oct 08 19:43:10 PDT 2025

Total time taken to generate the page: 0.00839 seconds