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

Home » Public Forums » archive » extracting pixel coordinates
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: extracting pixel coordinates [message #94491 is a reply to message #94489] Mon, 12 June 2017 05:19 Go to previous messageGo to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
On Monday, June 12, 2017 at 7:10:47 AM UTC-4, sid wrote:
> Hi all,
> I have a 1000 by 1000 pixel array, I need to extract a 1D column
> whose start point is (401,642)
> and end point is (411,750)
> anybody have some idea on this.
> thanks

I am not sure what do you want. If you want to select the values from the start point to the end point (straight line) you could try this:

xsel=[401:642]
ysel=[411:750]

The problem here is that the selecttion on X does not have the same number of elements as Y, you should therefore interpolate:

xsel=congrid(xsel,n_elements(ysel),/int,/center,/minus_one)

And the result would be:

result=you_array(xsel,ysel)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Define a region between curves
Next Topic: Download previous versions of IDL

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

Current Time: Wed Oct 08 19:03:01 PDT 2025

Total time taken to generate the page: 0.00461 seconds