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

Home » Public Forums » archive » Re: adding subset image into larger one
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: adding subset image into larger one [message #70182 is a reply to message #70181] Tue, 23 March 2010 09:14 Go to previous messageGo to previous message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
On 23/03/2010 11:00 AM, Suguru Amakubo wrote:
> Hi I am currently trying to add a subset of image (30x30) into a
> larger image (400x400) in 2 different sinarios:
>
> 1) adding a 30x30 subset taken from a 400x400 image and adding it to
> another 400x400 image.
>
> and
>
> 2) adding a 30x30 subset image into a blank 400x400 image
>
> I have encountered problems in both cases. for case 1) I could not
> find anywhere the syntax of adding the subset into the correct
> position. I used:
>
> new_image = new_image[tr_point(0,a):tr_point(0,a)
> +L-1,tr_point(1,a):tr_point(1,a)+L-1] + temp_image
>
> where tr_point is an array that contains the coordinates of the
> subset to be added and L = 30, temp_image is the subset. But seems
> like the new image does not change.
>
> for 2) aside from the problem I have above when I run the code above
> with the blank image IDL seems to 'crop' the blank 400x400 image into
> a 30x30 image...
>
> Would anybody have a solution to this?
>
> Thank you in advance
>
> Suguru

Hi Suguru,
the problem is that you are indeed subsetting your original image,
"deleting" the reminders!
Try this:
new_image[tr_point(0,a):tr_point(0,a)+L-1,tr_point(1,a):tr_p oint(1,a)+L-1]
+= temp_image

or

new_blank_image[tr_point(0,a):tr_point(0,a)+L-1,tr_point(1,a ):tr_point(1,a)+L-1]
= temp_image

Jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Calculating the Exponential using IDL
Next Topic: Detecting whether a user-defined System Variable is in use

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

Current Time: Wed Oct 08 20:04:55 PDT 2025

Total time taken to generate the page: 0.35540 seconds