mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
imageUtils.hpp File Reference

Header for the image processing utilities. More...

Header for the image processing utilities.

Author
Jared R. Males

Definition in file imageUtils.hpp.

Go to the source code of this file.

Namespaces

 mx
 The mxlib c++ namespace.
 

Functions

template<typename realT >
int mx::improc::reflectImageCoords (int &x1, int &y1, int x0, int y0, realT xc, realT yc)
 Reflect pixel coordinates across the given center pixel. More...
 
template<class imageT , typename valueT >
void mx::improc::zeroNaNs (imageT &im, valueT val)
 Zero any NaNs in an image. More...
 
template<class imageT >
void mx::improc::zeroNaNs (imageT &im)
 Zero any NaNs in an image. More...
 
template<class cubeT >
void mx::improc::zeroNaNCube (cubeT &imc)
 Zero any NaNs in an image cube. More...
 
template<class imageT >
imageT::Scalar mx::improc::imageMean (imageT &im)
 Calculate the mean value of an image. More...
 
template<class imageT >
imageT::Scalar mx::improc::imageVariance (imageT &im, typename imageT::Scalar mean)
 Calculate the variance of an image w.r.t. a given value. More...
 
template<typename imageT >
int mx::improc::imageCenterOfLight (typename imageT::Scalar &x, typename imageT::Scalar &y, const imageT &im)
 Calculate the center of light of an image. More...
 
template<typename floatT , typename imageT , typename magImageT , typename transformT >
int mx::improc::imageMaxInterp (floatT &x, floatT &y, floatT &scale_x, floatT &scale_y, magImageT &magIm, const imageT &im, transformT trans)
 Find the maximum in an image at sub-pixel resolution by interpolation. More...
 
template<typename floatT , typename imageT , typename magImageT >
int mx::improc::imageMaxInterp (floatT &x, floatT &y, floatT &scale_x, floatT &scale_y, magImageT &magIm, const imageT &im)
 Find the maximum in an image at sub-pixel resolution by cubic convolution interpolation. More...
 
template<typename imageT , typename imageT1 , typename imageT2 , typename imageT3 , typename imageT4 >
void mx::improc::combine2ImagesMasked (imageT &combo, const imageT1 &im1, const imageT2 &mask1, const imageT3 &im2, const imageT4 &mask2)
 Combine two images, each with their own mask defining good pixels. More...
 
void * mx::improc::imcpy (void *dest, void *src, size_t width, size_t height, size_t szof)
 Copy one image to another, with no transformation. More...
 
void * mx::improc::imcpy_flipUD (void *dest, void *src, size_t width, size_t height, size_t szof)
 Copy one image to another, flipping up-down. More...
 
void * mx::improc::imcpy_flipLR (void *dest, void *src, size_t width, size_t height, size_t szof)
 Copy one image to another, flipping left-right. More...
 
void * mx::improc::imcpy_flipUDLR (void *dest, void *src, size_t width, size_t height, size_t szof)
 Copy one image to another, flipping up-down and left-right. More...