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

Home » Public Forums » archive » multiplying two image arrays with different size
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
multiplying two image arrays with different size [message #93799] Wed, 19 October 2016 22:12 Go to next message
gunvicsin11 is currently offline  gunvicsin11
Messages: 93
Registered: November 2012
Member
Hi all,
I have one image of say image1 4096 by 4096 and the valid data in this is 3400pixels in diameter.

Then I have some 500 images of different size say image2 3468 by 3468,....3458 by 3458, etc the valid data is of 3400 pixels in diameter

now i need to multiply image 1 * image 2 that is i need to get the multiplication done for the valid data only.

please let me know if you have some ideas.

thanks
Re: multiplying two image arrays with different size [message #93800 is a reply to message #93799] Thu, 20 October 2016 05:01 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Thursday, October 20, 2016 at 1:12:54 AM UTC-4, sid wrote:
> Hi all,
> I have one image of say image1 4096 by 4096 and the valid data in this is 3400pixels in diameter.
>
> Then I have some 500 images of different size say image2 3468 by 3468,....3458 by 3458, etc the valid data is of 3400 pixels in diameter
>
> now i need to multiply image 1 * image 2 that is i need to get the multiplication done for the valid data only.
>
> please let me know if you have some ideas.
>
> thanks

OK. I have some ideas. What kind of ideas do you have?
Re: multiplying two image arrays with different size [message #93803 is a reply to message #93799] Thu, 20 October 2016 08:37 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 10/19/16 11:12 pm, sid wrote:
> Hi all, I have one image of say image1 4096 by 4096 and the valid
> data in this is 3400pixels in diameter.
>
> Then I have some 500 images of different size say image2 3468 by
> 3468,....3458 by 3458, etc the valid data is of 3400 pixels in
> diameter
>
> now i need to multiply image 1 * image 2 that is i need to get the
> multiplication done for the valid data only.
>
> please let me know if you have some ideas.
>
> thanks
>

Something like:

mx = x location of valid data in main image
my = y location of valid data in main image
x = x location of valid data in one of the 500 images
y = y location of valid data in one of the 500 images
w = 3400 - 1
main_image[mx:mx + w, my:my + w] *= other_image[x:x + w, y:y + w]

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Files on external drive not accessible with hdf_open()
Next Topic: hist_nd to resample point data to a grid

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

Current Time: Wed Oct 08 15:33:36 PDT 2025

Total time taken to generate the page: 0.00737 seconds