From: Ian S. <sc...@im...> - 2012-04-18 08:26:52
|
On 17/04/2012 08:43, Tyler Daniel wrote: > Hi all, > > I'm working with some very large panorama images, or trying to. I found > vil_cached_image_resource and thought that vxl would be a good choice > for doing some simple resampling/resizing. But this only handles > efficiently getting subviews of the full image, and I would need to > write more code to do the resizing on each subview and handle the edges > correctly. > > This seems like it would be a common usage pattern and hence already > done by someone else... Is there some other useful bit of vxl that I'm > missing? I somewhat expected to find a vil_cached_image_view that would > load blocks on-demand. This would be compatible with all the existing > algorithms, at the cost of efficiency, of course. > > Also, sorry if this has been asked before, but I couldn't find any way > to search the mailing list archives.. > > Thanks! > > Tyler There is basic support for this block approach. The vil_image_resource framework can wrap a vil_convolve_1d_resource and a vil_decimate_resource around a vil_blocked_image_resource. You should be able to ask the vil_decimate_resource (or which ever processing resource you have on top of the blocked_image) for its block size, and get a useful answer: image_resource->get_property(vil_property_size_block_i); You can then get the processed view, block by block. To be honest, I wrote a lot of the basic API expecting to have to fill in the support later. Fortunately for me (and unfortunately for you) 64-bit machines and cheap memory became widely available before I hit any in-memory limits, and Joe put the effort into providing the main block support with vil_blocked_image, etc. The only blocked image support really missing from vil is either 1. intelligent block support in some of the processing resources, so that the top most resource reads the block size and assembles the view result, block by block. or 2. a vil_assemble_block_resource, which would sit on top of any chain of image resources, read the block size, and assemble a single view block by block. Regards, Ian. |