Question

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.

Was it helpful?

Solution

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top