Function lib3d::colorizeNormalMap
Defined in File visualization.hpp
Function Documentation
-
inline cv::Mat lib3d::colorizeNormalMap(const cv::Mat &iNormalMap, const bool iCvt2OpenglConvention = true)
Method to colorize normal map for visualization.
Colorization is performed in RGB. Vectors in normal map need to be normalized. Before colorization the normal vectors are shifted into the range of [0,1]. It is assumed that the normal vectors are given in the coordinate system of the camera (i.e. x - right, y - down, z - forward). Example:
- Parameters:
iNormalMap – [in] Normal map to colorize. Since lib3d::types::NormalMap is a subclass of they can be passed directly to this function.
iCvt2OpenglConvention – [in] Flag to convert normal into opengl convention prior to colorization. This will rotate the reference coordinate system by 180 around the x-axis. Areas in which the normal vector points towards the camera will apear in a violet tone. Upwards facing areas will apear light green.
- Returns:
Colorized normal map. In format CV_8UC3.