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

Home » Public Forums » archive » Re: Creating a new image from an image input in IDL
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: Creating a new image from an image input in IDL [message #70804 is a reply to message #70802] Wed, 05 May 2010 04:38 Go to previous message
bcubeb3 is currently offline  bcubeb3
Messages: 3
Registered: May 2010
Junior Member
On May 5, 2:45 am, bcubeb3 <barry.brian.barr...@gmail.com> wrote:
> After typing this line of code:
> IMAGE=READ_TIFF(FILEPATH('/bin/butterfly.tiff'))
> help, IMAGE
>
> I get the output
> IMAGE  BYTE  = Array[3, 4800, 6000]
>
> Now I want to write a computer program to systematically loop through
> each of the n x n pixels of the image and to use a coordinate system
> in pixel units to compute new coordinates based on the formula theta_s
> = theta - (size parameter of your choosing in units of
> pixels)*theta_hat.
>
> The vector theta_s tells me where to look in the original image to
> extract intensity information which will then store in my image array.
> I will use a bilinear scheme when assigning new intensity values that
> will be stored for my newly created image array theta.  Now I have no
> idea how to even begin. I was looking for stuff online and I was
> looking at help manuals but all efforts proved futile. Let me know of
> your suggestions and I greatly appreciate your help on this.
>
> -Barry

FOllow up.
Sorry for not being specific. The following describes the algorithm I
have to code up but can't figure how to set up a blank n x n pixel
image or how to compute new coordinates theta using a transformation
equation of the following form: θ⃗s = θ⃗ − θE θˆ, where θE is any size
of your choosing or how to use the bilinear interpolation scheme to
extract the intensity for each pixel. This is a gravitational lensing
problem. Any help of any form is greatly appreciated. I am a newbie so
I am new to IDL and it's hard for me to find the routine that does the
trick since there are so many of them and I tried google with no luck.
You don't have to solve the problem just a direction of where to start
is much appreciated.

• Choose a size (in units of pixels) for the Einstein radius.
• Set up a blank n × n-pixel image-plane array (to match in size your
n × n source image).
• Set up your computer program to systematically loop through each of
the n × n pixels in your image-plane array.
• For each pixel, use the θx,θy coordinate (in dimensionless pixel
units) to compute θ⃗ and θˆ, to compute θ⃗s.
• The vector θ⃗s tells you where to look in the original source image
to extract the intensity which you will then store in your image array
at location θ⃗
• In general, however, θ⃗s will not point to the center of one of the
pixels in the original image. Therefore, you will need to interpolate
the intensity among the nearest four pixels. A bilinear interpolation
scheme is outlined below.
• Finally, after looping through all pixels in the image plane, and
assigning the appropriate intensity values, you will have constructed
the lensed image.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: VI, VIM IDL plugin
Next Topic: Re: Device independent plotting

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

Current Time: Fri Oct 10 04:50:10 PDT 2025

Total time taken to generate the page: 0.55997 seconds