mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Using the Eigen matrix library for image processing
Classes | |
class | mx::improc::eigenCube< dataT > |
An image cube with an Eigen-like API. More... | |
struct | mx::improc::is_eigenCube< T > |
Test whether a type is an eigenCube by testing whether it has a typedef of "is_eigenCube". More... | |
struct | mx::improc::eigenArrPlanes< arrT, isCube > |
Function object to return the number of planes for any Eigen like object, whether 2D or a 3D cube. More... | |
class | mx::improc::milkImage< _dataT > |
Class to interface with an ImageStreamIO image in shared memory. More... | |
Typedefs | |
template<typename scalarT > | |
using | mx::improc::eigenImage = Eigen::Array< scalarT, -1, -1 > |
Definition of the eigenImage type, which is an alias for Eigen::Array. More... | |
template<typename scalarT > | |
using | mx::improc::eigenMap = Eigen::Map< Eigen::Array< scalarT, -1, -1 > > |
Definition of the eigenMap type, which is an alias for Eigen::Map<Array>. More... | |
Functions | |
template<typename imageT , typename maskT = imageT> | |
imageT::Scalar | mx::improc::imageMedian (const imageT &mat, const maskT *mask, std::vector< typename imageT::Scalar > *work=0) |
Calculate the median of an Eigen-like array. More... | |
template<typename imageT > | |
imageT::Scalar | mx::improc::imageMedian (const imageT &mat, std::vector< typename imageT::Scalar > *work=0) |
Calculate the median of an Eigen-like array. More... | |
using mx::improc::eigenImage = typedef Eigen::Array<scalarT, -1, -1> |
Definition of the eigenImage type, which is an alias for Eigen::Array.
Definition at line 44 of file eigenImage.hpp.
using mx::improc::eigenMap = typedef Eigen::Map<Eigen::Array<scalarT, -1, -1> > |
Definition of the eigenMap type, which is an alias for Eigen::Map<Array>.
Definition at line 50 of file eigenImage.hpp.
imageT::Scalar mx::improc::imageMedian | ( | const imageT & | mat, |
const maskT * | mask, | ||
std::vector< typename imageT::Scalar > * | work = 0 |
||
) |
Calculate the median of an Eigen-like array.
Calculates the median of the entire array, allowing for some pixels to be ignored using a mask. Working memory can be retained between calls.
imageT | is an Eigen-like type |
maskT | is an Eigen-like type |
[in] | mat | the image to take the median of |
[in] | mask | if non-0, a 1/0 mask where 0 pixels are ignored. |
[in] | work | [optional] working memory can be retained and re-passed. Is resized. |
Definition at line 122 of file eigenImage.hpp.
References mx::math::vectorMedianInPlace().
imageT::Scalar mx::improc::imageMedian | ( | const imageT & | mat, |
std::vector< typename imageT::Scalar > * | work = 0 |
||
) |
Calculate the median of an Eigen-like array.
Calculates the median of the entire array. Working memory can be retained between calls.
imageT | is an Eigen-like type |
[in] | mat | the image to take the median of |
[in] | work | [optional] working memory can be retained and re-passed. |
Definition at line 180 of file eigenImage.hpp.