MRaster examples 22.0.0.0
Image Processing Library
|
Demonstrate "data images" and mjr::ramCanvasPixelFilter. More...
Go to the source code of this file.
Demonstrate "data images" and mjr::ramCanvasPixelFilter.
Copyright (c) 1988-2015, Mitchell Jay Richling https://www.mitchr.me All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
One of the most powerful abstractions in modern image processing is to think of an image as a sample drawn from a real function of two variables taken on a regular grid. This simple change of perspective opens up an entire world of mathematical techniques which may now be applied to image processing problems. In science and engineering visualization we are presented with the situation in reverse. That is to say we have one or more two dimensional grids of data (frequently thought of as values sampled from some underlying function), and we wish to visualize this data by synthesizing a pseudo-color image.
For example, consider the visualizing temperature variation across Kansas – which, in the grand tradition of Physics, we will assume to be a 2D rectangle. In this case the data consists of temperatures measured on a regular grid across the state. In these contexts we frequently store the "data" in something like HDF5, and then synthesize the visualization into a "image" manged by something like libPNG. Because MRaster supports such a broad array of data types for colors and color components, we can use MRaster images both for visual images and to house data instead. People doing multi-spectral imaging are one of MRaster's largest user communities.
Another large MRaster community are people visualizing fractals, ODEs, and chaotic systems. For this community the underlying function is known, and can be computed (sometimes at great cost). For this group, the data image serves as samples of this underlying function. Many of the MRaster example programs follow this paradigm:
Definition in file demo_data_image.cpp.