multiplying two image arrays with different size [message #93799] |
Wed, 19 October 2016 22:12  |
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 #93803 is a reply to message #93799] |
Thu, 20 October 2016 08:37  |
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)
|
|
|