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

Home » Public Forums » archive » Re: How can I find the central pixel?
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: How can I find the central pixel? [message #47947] Sat, 11 March 2006 03:22
daelomin[1] is currently offline  daelomin[1]
Messages: 1
Registered: March 2006
Junior Member
I take it your image is not georeferenced?

If it is, ENVI might be a proper tool to start with (if you have it).
Re: How can I find the central pixel? [message #47951 is a reply to message #47947] Fri, 10 March 2006 13:47 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> 'm studying a way to get some lat/longs from an image...
>
> I have a very large array (a binary-classified landsat image), where
> the pixels with the value '1' are soybean fields and the zero
> values represent no soybean.
>
> In this image there are large fields and small soybean fields. A
> 'large field' means a group of 50 or more soybean pixels. I have no
> interest on small fields. But I need to know the lat/long of the center
> of the larger soybean fields. In other words, I need a way to find the
> central pixel of the larger fields...
>
> Please, if you have an idea or a tip, comment this topic!

I'd use Label_Region to find the soybean fields. Be sure
you expand your image by a single pixel border if any of
the fields touch the edge, since Label_Region doesn't handle
edges well.

One by one, go through the fields. You can easily discard
any that are "too small" to be bothered with. If they
are of the proper size, you can use something like Find_Boundary
to located the boundary. At the same time it will calculate
the center, area, and the perimeter for you. Just set the
appropriate keywords. You can find Find_Boundary here:

http://www.dfanning.com/programs/find_boundary.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Accuracy problem
Next Topic: accuracy problems

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

Current Time: Wed Oct 08 15:48:42 PDT 2025

Total time taken to generate the page: 0.00559 seconds