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

Home » Public Forums » archive » Re: Given many images, find bounding box
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: Given many images, find bounding box [message #17632] Fri, 05 November 1999 00:00 Go to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Herbert wrote:

> I have many spatially seperated (but maybe overlapped) images patches
> which I would like to make a big mosaic image with them.
>
> For each of the patch, I have the coor. (lat, lon) of the upper left
> hand corner and the # of rows and # of cols. I would like to find the
> biggerest bounding box that will contain all the patches.
>
> Can anyone point me to any existing algorithm that will find this
> bounding box

This is pretty straightforward, but I have to make a few assumptions:

- you have four arrays (lat, lon, rows, cols) containing values
for each of your patches
- all four are measured in pixels
- 'lat' increases as you go up, 'lon' increases as you go to the right
(no wrapping at lat +/- 90 or lon +/- 180 here, do you need that?
My, that would be interesting...)
- you want the *smallest* bounding box that contains the patches

Then the four edges of that bounding box are:

left = Min(lon)
top = Max(lat)
right = Max(lon + cols - 1)
bottom = Min(lat - rows + 1)

Hope this helps!

Cheers,
-Dick

Dick Jackson Fanning Software Consulting, Canadian Office
djackson@dfanning.com Calgary, Alberta Voice/Fax: (403) 242-7398
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Default font size for a widget
Next Topic: Re: Two widget questions

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

Current Time: Sat Oct 11 14:21:57 PDT 2025

Total time taken to generate the page: 0.24140 seconds