0

How an enhancement(or any operation that modifies the image) is applied to an image that is stored in the form of pyramids, Is it first applied to a certain pyramid layer(present zoom level) and then reapplied to a different layer if user zoom in or zoom out, OR enhancement is applied all at once to the whole pyramid, OR Is there some algorithm using which one can efficiently propagate the effect of enhancement onto other pyramid layers.

I want to know what is the best possible way of doing this.

Paul R
  • 208,748
  • 37
  • 389
  • 560
akshay202
  • 586
  • 1
  • 5
  • 23
  • You question is unclear - which part don't you know how to design/implement? – Danny Varod Mar 12 '12 at 19:14
  • I am new to the concept of using image pyramids. my doubt is both in terms of implementation as well as design. From what I understand every level of the image pyramid is just the scaled-down(re-sampled) form of the original image. So if user apply an enhancement then how to ensure that it is applied to all the pyramid layers , do we loop through and apply the operation one-by-one to all the layers, Or is there any algorithm by which one can apply it on one layer and then propagate it, as they are all just re-sampled form of one large image. what is that algorithm if there is one? – akshay202 Mar 12 '12 at 19:45

1 Answers1

1

You have two good options:

  1. Apply action on highest resolution and recreate lower resolutions as necessary (current level and other levels when selected).

  2. Keep a stack of actions, apply only to current level, when switching level apply entire stack to that level.

In both these options all non-current levels* can be stored in files and loaded to memory only if that level is selected. (* Except highest resolution in option 1 which must be kept in memory.)

Option 1 is more accurate - some actions may be less accurate if applied directly to lower resolutions.

If your current level doesn't change often and the actions are fast enough to be applied in sequence to current level when it does change, then option 2 results in the least calculations and concurrent memory in use.

For option 1 you will need a reduction algorithm (resize) for calculating current level from highest resolution.

For option 2 you will need a stack of actions (+ parameters for each action).

Danny Varod
  • 17,324
  • 5
  • 69
  • 111
  • A pyramid where each level is 1/2x the prior level will be less than 1.5x the size of the highest resolution. No need to consider writing to files. – Mark Ransom Mar 12 '12 at 21:26
  • Depends on the amount of titles you have and the top resolution of each. Since the asked mentioned geotiffs, it could some up to a huge amount of memory. – Danny Varod Mar 12 '12 at 21:32
  • Yes the highest resolution could be very large, but the entire rest of the pyramid will be between 1/4 and 1/2 that size. I think my previous comment wasn't very clear. – Mark Ransom Mar 12 '12 at 21:44
  • sum(x + 0.5*0.5*x + 0.25*0.25*x + ...) < 1.5*x that was clear and obvious. However, if you have a large x and a lot of sums like this, nothing can be neglected. – Danny Varod Mar 12 '12 at 22:16