2023-04-19 11:31:01 +08:00
|
|
|
|
#ifndef AURORA_FUNCTION2D_H
|
|
|
|
|
|
#define AURORA_FUNCTION2D_H
|
|
|
|
|
|
|
2023-04-20 15:34:38 +08:00
|
|
|
|
#include "Matrix.h"
|
|
|
|
|
|
#include "Function1D.h"
|
2023-04-19 11:31:01 +08:00
|
|
|
|
|
2023-04-20 15:34:38 +08:00
|
|
|
|
|
|
|
|
|
|
namespace Aurora {
|
2023-04-23 16:02:08 +08:00
|
|
|
|
enum FunctionDirection{
|
|
|
|
|
|
Column,
|
|
|
|
|
|
Row,
|
|
|
|
|
|
All
|
|
|
|
|
|
};
|
2023-04-20 17:35:03 +08:00
|
|
|
|
double immse(const Matrix& aImageA, const Matrix& aImageB);
|
|
|
|
|
|
Matrix inv(const Matrix& aMatrix);
|
|
|
|
|
|
Matrix inv(Matrix&& aMatrix);
|
2023-04-20 15:34:38 +08:00
|
|
|
|
Matrix interp2(const Matrix& aX, const Matrix& aY, const Matrix& aV, const Matrix& aX1, const Matrix& aY1, InterpnMethod aMethod);
|
|
|
|
|
|
Matrix interpn(const Matrix& aX, const Matrix& aY, const Matrix& aV, const Matrix& aX1, const Matrix& aY1, InterpnMethod aMethod);
|
2023-04-23 09:30:47 +08:00
|
|
|
|
Matrix std(const Matrix& aMatrix);
|
2023-04-23 16:02:08 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 求矩阵最小值,可按行、列、单元, 目前不支持三维,不支持复数
|
|
|
|
|
|
* @param aMatrix 矩阵
|
|
|
|
|
|
* @param direction 方向,Column, Row, All
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Matrix min(const Matrix& aMatrix,FunctionDirection direction = Column);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 求矩阵最小值,可按行、列、单元, 目前不支持三维,不支持复数
|
|
|
|
|
|
* @param aMatrix 矩阵
|
|
|
|
|
|
* @param direction 方向,Column, Row, All
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Matrix max(const Matrix& aMatrix,FunctionDirection direction = Column);
|
2023-04-23 17:32:04 +08:00
|
|
|
|
|
2023-04-23 16:02:08 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 比较两个矩阵,求对应位置的最小值,不支持三维
|
|
|
|
|
|
* @attention 矩阵形状不一样时,如A为[MxN],则B应为标量或[1xN]的行向量
|
|
|
|
|
|
* @param aMatrix
|
|
|
|
|
|
* @param aOther
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Matrix min(const Matrix& aMatrix,const Matrix& aOther);
|
|
|
|
|
|
|
2023-04-23 17:32:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 求矩阵和,可按行、列、单元, 目前不支持三维,不支持复数
|
|
|
|
|
|
* @param aMatrix 矩阵
|
|
|
|
|
|
* @param direction 方向,Column, Row, All
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Matrix sum(const Matrix& aMatrix,FunctionDirection direction = Column);
|
|
|
|
|
|
|
2023-04-24 15:24:23 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 求矩阵平均值,可按行、列、单元, 目前不支持三维,不支持复数
|
|
|
|
|
|
* @param aMatrix 矩阵
|
|
|
|
|
|
* @param direction 方向,Column, Row, All
|
|
|
|
|
|
* @param aIncludeNan 是否包含nan
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
Matrix mean(const Matrix& aMatrix,FunctionDirection direction = Column, bool aIncludeNan = true);
|
|
|
|
|
|
|
2023-04-19 11:31:01 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //AURORA_FUNCTION2D_H
|