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

Home » Public Forums » archive » How to choose the pixels along a curve in an image
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: How to choose the pixels along a curve in an image [message #88087 is a reply to message #88086] Wed, 19 March 2014 10:03 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
spright writes:

> I want to get the values of pixels along a curve in an image. Could anyone give some suggestions? This curve may be got by a polynomial fit to a few points on the image.
>
> For pixels along a straight line, it is easier as I can rotate the image to leave the line in horizontal or vertical direction and choose these pixels in an array of the image, like img[*,n]. But seems it is difficult for the one with curve.
>
> Any suggestions?

If you really mean "pixels", I would draw the curve in a blank pixmap
window, take a 2D snapshot of the window, and use Where to tell me which
pixels in that window were different from the background color.

Armed with that information, it would be easy to convert the pixel
values into the coordinate system of the image (I like to use
Value_Locate for this if there isn't a one-to-one correspondence between
the image and the display) and fish out the underlying image values.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: -32768
Next Topic: file in use by another program

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

Current Time: Wed Oct 08 19:29:41 PDT 2025

Total time taken to generate the page: 0.00441 seconds