![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
The Image class stores image with customizable width, height, num of channels and bytes per channel. More...
#include <Image.h>


Public Types | |
| enum class | ColorToIntensityConversionType { Equal , Weighted } |
| Specifies whether R, G, B channels have the same weight when converting to intensity. Only used for Image with 3 channels. More... | |
| enum class | FilterType { Gaussian3 , Gaussian5 , Gaussian7 , Sobel3Dx , Sobel3Dy } |
| Specifies the Image filter type. More... | |
Public Types inherited from ccHObject | |
| enum | DEPENDENCY_FLAGS { DP_NONE = 0 , DP_NOTIFY_OTHER_ON_DELETE = 1 , DP_NOTIFY_OTHER_ON_UPDATE , DP_DELETE_OTHER = 8 , DP_PARENT_OF_OTHER = 24 } |
| Dependency flags. More... | |
| enum | SelectionBehavior { SELECTION_AA_BBOX , SELECTION_FIT_BBOX , SELECTION_IGNORED } |
| Behavior when selected. More... | |
| using | Container = std::vector< ccHObject * > |
| Standard instances container (for children, etc.) More... | |
| using | Shared = QSharedPointer< ccHObject > |
| Shared pointer. More... | |
| using | SharedContainer = std::vector< Shared > |
| Shared instances container (for children, etc.) More... | |
| using | GlobalBoundingBox = cloudViewer::BoundingBoxTpl< double > |
| Global (non-shifted) bounding-box. More... | |
Public Types inherited from ccSerializableObject | |
| enum | DeserializationFlags { DF_POINT_COORDS_64_BITS , DF_SCALAR_VAL_32_BITS = 2 } |
| Deserialization flags (bit-field) More... | |
| typedef QMultiMap< unsigned, unsigned > | LoadedIDMap |
| Map of loaded unique IDs (old ID --> new ID) More... | |
Public Member Functions | |
| Image (const char *name="Image") | |
| Default Constructor. More... | |
| ~Image () override | |
| virtual bool | isSerializable () const override |
| Returns whether object is serializable of not. More... | |
| virtual CV_CLASS_ENUM | getClassID () const override |
| Returns unique class ID. More... | |
| virtual ccBBox | getOwnBB (bool withGLFeatures=false) override |
| Returns the entity's own bounding-box. More... | |
| Image & | Clear () |
| virtual bool | IsEmpty () const override |
| virtual Eigen::Vector2d | GetMin2DBound () const override |
| virtual Eigen::Vector2d | GetMax2DBound () const override |
| bool | TestImageBoundary (double u, double v, double inner_margin=0.0) const |
Test if coordinate (u, v) is located in the inner_marge of the image. More... | |
| virtual bool | HasData () const |
Returns true if the Image has valid data. More... | |
| Image & | Prepare (int width, int height, int num_of_channels, int bytes_per_channel) |
| Prepare Image properties and allocate Image buffer. More... | |
| int | BytesPerLine () const |
| Returns data size per line (row, or the width) in bytes. More... | |
| std::pair< bool, double > | FloatValueAt (double u, double v) const |
| std::shared_ptr< Image > | CreateFloatImage (Image::ColorToIntensityConversionType type=Image::ColorToIntensityConversionType::Weighted) const |
| Return a gray scaled float type image. More... | |
| template<typename T > | |
| T * | PointerAt (int u, int v) const |
| Function to access the raw data of a single-channel Image. More... | |
| template<typename T > | |
| T * | PointerAt (int u, int v, int ch) const |
| Function to access the raw data of a multi-channel Image. More... | |
| std::shared_ptr< Image > | ConvertDepthToFloatImage (double depth_scale=1000.0, double depth_trunc=3.0) const |
| std::shared_ptr< Image > | Transpose () const |
| std::shared_ptr< Image > | FlipHorizontal () const |
| Function to flip image horizontally (from left to right). More... | |
| std::shared_ptr< Image > | FlipVertical () const |
| Function to flip image vertically (upside down). More... | |
| std::shared_ptr< Image > | Filter (Image::FilterType type) const |
| Function to filter image with pre-defined filtering type. More... | |
| std::shared_ptr< Image > | Filter (const std::vector< double > &dx, const std::vector< double > &dy) const |
| Function to filter image with arbitrary dx, dy separable filters. More... | |
| std::shared_ptr< Image > | FilterHorizontal (const std::vector< double > &kernel) const |
| std::shared_ptr< Image > | Downsample () const |
| Function to 2x image downsample using simple 2x2 averaging. More... | |
| std::shared_ptr< Image > | Dilate (int half_kernel_size=1) const |
| Function to dilate 8bit mask map. More... | |
| Image & | LinearTransform (double scale=1.0, double offset=0.0) |
| Image & | ClipIntensity (double min=0.0, double max=1.0) |
| template<typename T > | |
| std::shared_ptr< Image > | CreateImageFromFloatImage () const |
| ImagePyramid | CreatePyramid (size_t num_of_levels, bool with_gaussian_filter=true) const |
| Function to create image pyramid. More... | |
| std::shared_ptr< Image > | CreateDepthBoundaryMask (double depth_threshold_for_discontinuity_check=0.1, int half_dilation_kernel_size_for_discontinuity_map=3) const |
| Function to create a depthmap boundary mask from depth image. More... | |
Public Member Functions inherited from ccHObject | |
| ccHObject (QString name=QString()) | |
| Default constructor. More... | |
| ccHObject (const ccHObject &object) | |
| Copy constructor. More... | |
| virtual | ~ccHObject () override |
| Default destructor. More... | |
| virtual Eigen::Vector3d | GetMinBound () const |
| Returns min bounds for geometry coordinates. More... | |
| virtual Eigen::Vector3d | GetMaxBound () const |
| Returns max bounds for geometry coordinates. More... | |
| virtual Eigen::Vector3d | GetCenter () const |
| Returns the center of the geometry coordinates. More... | |
| virtual ccBBox | GetAxisAlignedBoundingBox () const |
| Returns an axis-aligned bounding box of the geometry. More... | |
| virtual ecvOrientedBBox | GetOrientedBoundingBox () const |
| virtual ccHObject & | Transform (const Eigen::Matrix4d &transformation) |
| Apply transformation (4x4 matrix) to the geometry coordinates. More... | |
| virtual ccHObject & | Translate (const Eigen::Vector3d &translation, bool relative=true) |
| Apply translation to the geometry coordinates. More... | |
| virtual ccHObject & | Scale (const double s, const Eigen::Vector3d ¢er) |
Apply scaling to the geometry coordinates. Given a scaling factor , and center , a given point is transformed according to . More... | |
| virtual ccHObject & | Scale (const double s) |
| virtual ccHObject & | Rotate (const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er) |
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center , a given point is transformed according to . More... | |
| virtual ccHObject & | Rotate (const Eigen::Matrix3d &R) |
| QString | getViewId () const |
| bool | isGroup () const |
| Returns whether the instance is a group. More... | |
| ccHObject * | getParent () const |
| Returns parent object. More... | |
| virtual QIcon | getIcon () const |
| Returns the icon associated to this entity. More... | |
| void | addDependency (ccHObject *otherObject, int flags, bool additive=true) |
| Adds a new dependence (additive or not) More... | |
| int | getDependencyFlagsWith (const ccHObject *otherObject) |
| Returns the dependency flags with a given object. More... | |
| void | removeDependencyWith (ccHObject *otherObject) |
| Removes any dependency flags with a given object. More... | |
| void | removeDependencyFlag (ccHObject *otherObject, DEPENDENCY_FLAGS flag) |
| Removes a given dependency flag. More... | |
| virtual bool | addChild (ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1) |
| Adds a child. More... | |
| unsigned | getChildrenNumber () const |
| Returns the number of children. More... | |
| unsigned int | getChildCountRecursive () const |
| Returns the total number of children under this object recursively. More... | |
| ccHObject * | getChild (unsigned childPos) const |
| Returns the ith child. More... | |
| ccHObject * | find (unsigned uniqueID) |
| Finds an entity in this object hierarchy. More... | |
| unsigned | filterChildren (Container &filteredChildren, bool recursive=false, CV_CLASS_ENUM filter=CV_TYPES::OBJECT, bool strict=false) const |
| Collects the children corresponding to a certain pattern. More... | |
| void | detachChild (ccHObject *child) |
| Detaches a specific child. More... | |
| void | detachAllChildren () |
| Removes a specific child. More... | |
| void | getTypeID_recursive (std::vector< removeInfo > &rmInfos, bool relative) |
| void | getTypeID_recursive (std::vector< hideInfo > &hdInfos, bool relative) |
| void | removeChild (ccHObject *child) |
| void | removeChild (int pos) |
| Removes a specific child given its index. More... | |
| void | removeAllChildren () |
| Removes all children. More... | |
| int | getChildIndex (const ccHObject *aChild) const |
| Returns child index. More... | |
| void | swapChildren (unsigned firstChildIndex, unsigned secondChildIndex) |
| Swaps two children. More... | |
| int | getIndex () const |
| Returns index relatively to its parent or -1 if no parent. More... | |
| void | transferChild (ccHObject *child, ccHObject &newParent) |
| Transfer a given child to another parent. More... | |
| void | transferChildren (ccHObject &newParent, bool forceFatherDependent=false) |
| Transfer all children to another parent. More... | |
| ccHObject * | getFirstChild () const |
| Shortcut: returns first child. More... | |
| ccHObject * | getLastChild () const |
| Shortcut: returns last child. More... | |
| bool | isAncestorOf (const ccHObject *anObject) const |
| Returns true if the current object is an ancestor of the specified one. More... | |
| void | removeFromRenderScreen (bool recursive=true) |
| void | hideObject_recursive (bool recursive) |
| void | hideBB (CC_DRAW_CONTEXT context) |
| void | showBB (CC_DRAW_CONTEXT context) |
| void | setRedrawFlagRecursive (bool redraw=false) |
| void | setForceRedrawRecursive (bool redraw=false) |
| void | setPointSizeRecursive (int pSize) |
| void | setLineWidthRecursive (PointCoordinateType width) |
| virtual ccBBox | getBB_recursive (bool withGLFeatures=false, bool onlyEnabledChildren=true) |
| Returns the bounding-box of this entity and it's children. More... | |
| virtual GlobalBoundingBox | getOwnGlobalBB (bool withGLFeatures=false) |
| virtual bool | getOwnGlobalBB (CCVector3d &minCorner, CCVector3d &maxCorner) |
| virtual GlobalBoundingBox | getGlobalBB_recursive (bool withGLFeatures=false, bool onlyEnabledChildren=true) |
| Returns the global bounding-box of this entity and it's children. More... | |
| virtual ccBBox | getDisplayBB_recursive (bool relative) |
| Returns the bounding-box of this entity and it's children WHEN DISPLAYED. More... | |
| virtual ccBBox | getOwnFitBB (ccGLMatrix &trans) |
| Returns best-fit bounding-box (if available) More... | |
| virtual void | drawBB (CC_DRAW_CONTEXT &context, const ecvColor::Rgb &col) |
| Draws the entity (and its children) bounding-box. More... | |
| void | draw (CC_DRAW_CONTEXT &context) override |
| Draws entity and its children. More... | |
| void | updateNameIn3DRecursive () |
| void | setHideShowType (CC_DRAW_CONTEXT &context) |
| void | setRemoveType (CC_DRAW_CONTEXT &context) |
| ENTITY_TYPE | getEntityType () const |
| virtual void | redrawDisplay (bool forceRedraw=true, bool only2D=false) |
| Redraws associated display. More... | |
| bool | getAbsoluteGLTransformation (ccGLMatrix &trans) const |
| virtual bool | isDisplayed () const |
| Returns whether the object is actually displayed (visible) or not. More... | |
| virtual bool | isBranchEnabled () const |
| Returns whether the object and all its ancestors are enabled. More... | |
| virtual void | redrawDisplay_recursive (bool p) |
| virtual void | refreshDisplay_recursive (bool p) |
| virtual void | setSelected_recursive (bool p) |
| virtual void | toggleActivation_recursive () |
| virtual void | toggleVisibility_recursive () |
| virtual void | toggleColors_recursive () |
| virtual void | resetGLTransformationHistory_recursive () |
| virtual void | toggleNormals_recursive () |
| virtual void | toggleSF_recursive () |
| virtual void | toggleShowName_recursive () |
| unsigned | findMaxUniqueID_recursive () const |
| Returns the max 'unique ID' of this entity and its siblings. More... | |
| void | applyGLTransformation_recursive (const ccGLMatrix *trans=nullptr) |
| Applies the active OpenGL transformation to the entity (recursive) More... | |
| virtual void | notifyGeometryUpdate () |
| bool | toFile (QFile &out, short dataVersion) const override |
| Saves data to binary stream. More... | |
| bool | fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override |
| Loads data from binary stream. More... | |
| short | minimumFileVersion () const override |
| Returns the minimum file version required to save this instance. More... | |
| bool | fromFileNoChildren (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) |
| Custom version of ccSerializableObject::fromFile. More... | |
| virtual bool | isShareable () const |
| Returns whether object is shareable or not. More... | |
| virtual void | setSelectionBehavior (SelectionBehavior mode) |
| Sets selection behavior (when displayed) More... | |
| virtual SelectionBehavior | getSelectionBehavior () const |
| Returns selection behavior. More... | |
| virtual unsigned | getUniqueIDForDisplay () const |
| Returns object unqiue ID used for display. More... | |
| virtual const ccGLMatrix & | getGLTransformationHistory () const |
| Returns the transformation 'history' matrix. More... | |
| virtual void | setGLTransformationHistory (const ccGLMatrix &mat) |
| Sets the transformation 'history' matrix (handle with care!) More... | |
| virtual void | resetGLTransformationHistory () |
| Resets the transformation 'history' matrix. More... | |
| bool | pushDisplayState () override |
| Pushes the current display state (overridden) More... | |
| void | popDisplayState (bool apply=true) override |
| Pops the last pushed display state (overridden) More... | |
Public Member Functions inherited from ccObject | |
| ccObject (QString name=QString()) | |
| Default constructor. More... | |
| ccObject (const ccObject &object) | |
| Copy constructor. More... | |
| virtual QString | getName () const |
| Returns object name. More... | |
| virtual void | setName (const QString &name) |
| Sets object name. More... | |
| virtual void | setRemoveFlag (bool removeFlag) |
| Sets removeFlag. More... | |
| virtual bool | getRemoveFlag () |
| Returns removeFlag. More... | |
| virtual unsigned | getUniqueID () const |
| Returns object unique ID. More... | |
| virtual void | setUniqueID (unsigned ID) |
| Changes unique ID. More... | |
| virtual bool | isEnabled () const |
| Returns whether the object is enabled or not. More... | |
| virtual void | setEnabled (bool state) |
| Sets the "enabled" property. More... | |
| virtual void | toggleActivation () |
| Toggles the "enabled" property. More... | |
| virtual bool | isLocked () const |
| Returns whether the object is locked or not. More... | |
| virtual void | setLocked (bool state) |
| Sets the "enabled" property. More... | |
| bool | isLeaf () const |
| bool | isCustom () const |
| bool | isHierarchy () const |
| bool | isKindOf (CV_CLASS_ENUM type) const |
| bool | isA (CV_CLASS_ENUM type) const |
| QVariant | getMetaData (const QString &key) const |
| Returns a given associated meta data. More... | |
| bool | removeMetaData (const QString &key) |
| Removes a given associated meta-data. More... | |
| void | setMetaData (const QString &key, const QVariant &data) |
| Sets a meta-data element. More... | |
| void | setMetaData (const QVariantMap &dataset, bool overwrite=false) |
| Sets several meta-data elements at a time. More... | |
| bool | hasMetaData (const QString &key) const |
| Returns whether a meta-data element with the given key exists or not. More... | |
| const QVariantMap & | metaData () const |
| Returns meta-data map (const only) More... | |
| void | setBaseName (const QString &baseName) |
| QString | getBaseName () const |
| void | setFullPath (const QString &fullPaht) |
| QString | getFullPath () const |
Public Member Functions inherited from ccSerializableObject | |
| virtual | ~ccSerializableObject ()=default |
| Destructor. More... | |
Public Member Functions inherited from ccDrawableObject | |
| ccDrawableObject () | |
| Default constructor. More... | |
| ccDrawableObject (const ccDrawableObject &object) | |
| Copy constructor. More... | |
| virtual | ~ccDrawableObject ()=default |
| virtual bool | isVisible () const |
| Returns whether entity is visible or not. More... | |
| virtual void | setVisible (bool state) |
| Sets entity visibility. More... | |
| virtual void | toggleVisibility () |
| Toggles visibility. More... | |
| virtual bool | isRedraw () const |
| Returns whether entity is to be redraw. More... | |
| virtual void | setRedraw (bool state) |
| Sets entity redraw mode. More... | |
| virtual void | setForceRedraw (bool state) |
| Sets force redraw. More... | |
| virtual void | setFixedId (bool state) |
| virtual bool | isFixedId () |
| virtual bool | isVisibilityLocked () const |
| Returns whether visibility is locked or not. More... | |
| virtual void | lockVisibility (bool state) |
| Locks/unlocks visibility. More... | |
| virtual bool | isSelected () const |
| Returns whether entity is selected or not. More... | |
| virtual void | setSelected (bool state) |
| Selects/Unselects entity. More... | |
| virtual void | getDrawingParameters (glDrawParams ¶ms) const |
| Returns main OpenGL parameters for this entity. More... | |
| virtual bool | hasColors () const |
| Returns whether colors are enabled or not. More... | |
| virtual bool | colorsShown () const |
| Returns whether colors are shown or not. More... | |
| virtual void | showColors (bool state) |
| Sets colors visibility. More... | |
| virtual void | toggleColors () |
| Toggles colors display state. More... | |
| virtual bool | hasNormals () const |
| Returns whether normals are enabled or not. More... | |
| virtual bool | normalsShown () const |
| Returns whether normals are shown or not. More... | |
| virtual void | showNormals (bool state) |
| Sets normals visibility. More... | |
| virtual void | toggleNormals () |
| Toggles normals display state. More... | |
| virtual bool | hasDisplayedScalarField () const |
| Returns whether an active scalar field is available or not. More... | |
| virtual bool | hasScalarFields () const |
| Returns whether one or more scalar fields are instantiated. More... | |
| virtual void | showSF (bool state) |
| Sets active scalarfield visibility. More... | |
| virtual void | toggleSF () |
| Toggles SF display state. More... | |
| virtual bool | sfShown () const |
| Returns whether active scalar field is visible. More... | |
| virtual void | toggleMaterials () |
| Toggles material display state. More... | |
| virtual void | showNameIn3D (bool state) |
| Sets whether name should be displayed in 3D. More... | |
| virtual bool | nameShownIn3D () const |
| Returns whether name is displayed in 3D or not. More... | |
| virtual void | toggleShowName () |
| Toggles name in 3D display state. More... | |
| virtual bool | isColorOverridden () const |
| virtual const ecvColor::Rgb & | getTempColor () const |
| Returns current temporary (unique) color. More... | |
| virtual void | setTempColor (const ecvColor::Rgb &col, bool autoActivate=true) |
| Sets current temporary (unique) More... | |
| virtual void | enableTempColor (bool state) |
| Set temporary color activation state. More... | |
| virtual float | getOpacity () const |
| virtual void | setOpacity (float opacity) |
| Set opacity activation state. More... | |
| virtual void | setGLTransformation (const ccGLMatrix &trans) |
| Associates entity with a GL transformation (rotation + translation) More... | |
| virtual void | enableGLTransformation (bool state) |
| Enables/disables associated GL transformation. More... | |
| virtual bool | isGLTransEnabled () const |
| Returns whether a GL transformation is enabled or not. More... | |
| virtual const ccGLMatrix & | getGLTransformation () const |
| Returns associated GL transformation. More... | |
| virtual void | resetGLTransformation () |
| Resets associated GL transformation. More... | |
| virtual void | rotateGL (const ccGLMatrix &rotMat) |
| Multiplies (left) current GL transformation by a rotation matrix. More... | |
| virtual void | translateGL (const CCVector3 &trans) |
| Translates current GL transformation by a rotation matrix. More... | |
| virtual void | removeAllClipPlanes () |
| Removes all clipping planes (if any) More... | |
| virtual bool | addClipPlanes (const ccClipPlane &plane) |
| Registers a new clipping plane. More... | |
| virtual void | toggleClipPlanes (CC_DRAW_CONTEXT &context, bool enable) |
| Enables or disables clipping planes (OpenGL) More... | |
| virtual void | applyDisplayState (const DisplayState &state) |
| Applies a display state. More... | |
Static Public Member Functions | |
| static std::shared_ptr< Image > | CreateDepthToCameraDistanceMultiplierFloatImage (const camera::PinholeCameraIntrinsic &intrinsic) |
| static ImagePyramid | FilterPyramid (const ImagePyramid &input, Image::FilterType type) |
| Function to filter image pyramid. More... | |
Static Public Member Functions inherited from ccHObject | |
| static ccHObject * | New (CV_CLASS_ENUM objectType, const char *name=nullptr) |
| Static factory. More... | |
| static ccHObject * | New (const QString &pluginId, const QString &classId, const char *name=nullptr) |
| Static factory (version to be used by external plugin factories) More... | |
| static Eigen::Vector3d | ComputeMinBound (const std::vector< Eigen::Vector3d > &points) |
| Compute min bound of a list points. More... | |
| static Eigen::Vector3d | ComputeMaxBound (const std::vector< Eigen::Vector3d > &points) |
| Compute max bound of a list points. More... | |
| static Eigen::Vector3d | ComputeCenter (const std::vector< Eigen::Vector3d > &points) |
| Computer center of a list of points. More... | |
| static void | ResizeAndPaintUniformColor (std::vector< Eigen::Vector3d > &colors, std::size_t size, const Eigen::Vector3d &color) |
| Resizes the colors vector and paints a uniform color. More... | |
| static void | TransformPoints (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &points) |
| Transforms all points with the transformation matrix. More... | |
| static void | TransformNormals (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &normals) |
| Transforms the normals with the transformation matrix. More... | |
| static void | TransformCovariances (const Eigen::Matrix4d &transformation, std::vector< Eigen::Matrix3d > &covariances) |
| Transforms all covariance matrices with the transformation. More... | |
| static void | TranslatePoints (const Eigen::Vector3d &translation, std::vector< Eigen::Vector3d > &points, bool relative) |
| Apply translation to the geometry coordinates. More... | |
| static void | ScalePoints (const double scale, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d ¢er) |
Scale the coordinates of all points by the scaling factor scale. More... | |
| static void | RotatePoints (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d ¢er) |
Rotate all points with the rotation matrix R. More... | |
| static void | RotateNormals (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &normals) |
Rotate all normals with the rotation matrix R. More... | |
| static void | RotateCovariances (const Eigen::Matrix3d &R, std::vector< Eigen::Matrix3d > &covariances) |
Rotate all covariance matrices with the rotation matrix R. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromXYZ (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from XYZ RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromYZX (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from YZX RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromZXY (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from ZXY RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromXZY (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from XZY RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromZYX (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from ZYX RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromYXZ (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from YXZ RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromAxisAngle (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from AxisAngle RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromQuaternion (const Eigen::Vector4d &rotation) |
| Get Rotation Matrix from Quaternion. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromEulerAngle (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from Euler angle. More... | |
Static Public Member Functions inherited from ccObject | |
| static unsigned | GetCurrentDBVersion () |
| Returns current database version. More... | |
| static void | SetUniqueIDGenerator (ccUniqueIDGenerator::Shared generator) |
| Sets the unique ID generator. More... | |
| static ccUniqueIDGenerator::Shared | GetUniqueIDGenerator () |
| Returns the unique ID generator. More... | |
| static unsigned | GetNextUniqueID () |
| Returns a new unassigned unique ID. More... | |
| static unsigned | GetLastUniqueID () |
| Returns last assigned unique ID. More... | |
| static CV_CLASS_ENUM | ReadClassIDFromFile (QFile &in, short dataVersion) |
| Helper: reads out class ID from a binary stream. More... | |
Static Public Member Functions inherited from ccSerializableObject | |
| static bool | WriteError () |
| Sends a custom error message (write error) and returns 'false'. More... | |
| static bool | ReadError () |
| Sends a custom error message (read error) and returns 'false'. More... | |
| static bool | MemoryError () |
| Sends a custom error message (not enough memory) and returns 'false'. More... | |
| static bool | CorruptError () |
| Sends a custom error message (corrupted file) and returns 'false'. More... | |
Public Attributes | |
| int | width_ = 0 |
| Width of the image. More... | |
| int | height_ = 0 |
| Height of the image. More... | |
| int | num_of_channels_ = 0 |
| Number of chanels in the image. More... | |
| int | bytes_per_channel_ = 0 |
| Number of bytes per channel. More... | |
| std::vector< uint8_t > | data_ |
| Image storage buffer. More... | |
Protected Member Functions | |
| virtual void | drawMeOnly (CC_DRAW_CONTEXT &context) override |
| Draws the entity only (not its children) More... | |
| virtual void | onDeletionOf (const ccHObject *obj) override |
| This method is called when another object is deleted. More... | |
| void | AllocateDataBuffer () |
Protected Member Functions inherited from ccHObject | |
| virtual void | setParent (ccHObject *anObject) |
| Sets parent object. More... | |
| virtual void | applyGLTransformation (const ccGLMatrix &trans) |
| Applies a GL transformation to the entity. More... | |
| virtual bool | toFile_MeOnly (QFile &out, short dataVersion) const |
| Save own object data. More... | |
| virtual bool | fromFile_MeOnly (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) |
| Loads own object data. More... | |
| virtual short | minimumFileVersion_MeOnly () const |
| virtual void | drawNameIn3D () |
| Draws the entity name in 3D. More... | |
| virtual void | onUpdateOf (ccHObject *obj) |
| This method is called when another object (geometry) is updated. More... | |
Protected Member Functions inherited from ccObject | |
| virtual bool | getFlagState (CV_OBJECT_FLAG flag) const |
| Returns flag state. More... | |
| virtual void | setFlagState (CV_OBJECT_FLAG flag, bool state) |
| Sets flag state. More... | |
| bool | toFile (QFile &out, short dataVersion) const override |
| Saves data to binary stream. More... | |
| short | minimumFileVersion () const override |
| Returns the minimum file version required to save this instance. More... | |
| bool | fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override |
| Reimplemented from ccSerializableObject::fromFile. More... | |
Additional Inherited Members | |
Protected Attributes inherited from ccHObject | |
| ccHObject * | m_parent |
| Parent. More... | |
| Container | m_children |
| Children. More... | |
| SelectionBehavior | m_selectionBehavior |
| Selection behavior. More... | |
| std::map< ccHObject *, int > | m_dependencies |
| Dependencies map. More... | |
| ccGLMatrix | m_glTransHistory |
| Cumulative GL transformation. More... | |
| bool | m_isDeleting |
| Flag to safely handle dependencies when the object is being deleted. More... | |
Protected Attributes inherited from ccObject | |
| QString | m_name |
| Object name. More... | |
| QString | m_baseName |
| QString | m_filePath |
| bool | m_removeFlag |
| unsigned | m_flags |
| Object flags. More... | |
| QVariantMap | m_metaData |
| Associated meta-data. More... | |
Protected Attributes inherited from ccDrawableObject | |
| bool | m_fixedId |
| bool | m_modelRedraw |
| bool | m_forceRedraw |
| float | m_opacity |
| bool | m_visible |
| Specifies whether the object is visible or not. More... | |
| bool | m_selected |
| Specifies whether the object is selected or not. More... | |
| bool | m_lockedVisibility |
| Specifies whether the visibility can be changed by user or not. More... | |
| bool | m_colorsDisplayed |
| Specifies whether colors should be displayed. More... | |
| bool | m_normalsDisplayed |
| Specifies whether normals should be displayed. More... | |
| bool | m_sfDisplayed |
| Specifies whether scalar field should be displayed. More... | |
| ecvColor::Rgb | m_tempColor |
| Temporary (unique) color. More... | |
| bool | m_colorIsOverridden |
| Temporary (unique) color activation state. More... | |
| ccGLMatrix | m_glTrans |
| Current GL transformation. More... | |
| bool | m_glTransEnabled |
| Current GL transformation activation state. More... | |
| bool | m_showNameIn3D |
| Whether name is displayed in 3D or not. More... | |
| CCVector3d | m_nameIn3DPos |
| Last 2D position of the '3D' name. More... | |
| ccClipPlaneSet | m_clipPlanes |
| Active clipping planes (used for display only) More... | |
| std::vector< DisplayState::Shared > | m_displayStateStack |
| The stack of pushed display states. More... | |
The Image class stores image with customizable width, height, num of channels and bytes per channel.
Specifies whether R, G, B channels have the same weight when converting to intensity. Only used for Image with 3 channels.
When Weighted is used R, G, B channels are weighted according to the Digital ITU BT.601 standard: I = 0.299 * R + 0.587 * G + 0.114 * B.
| Enumerator | |
|---|---|
| Equal | R, G, B channels have equal weights. |
| Weighted | Weighted R, G, B channels: I = 0.299 * R + 0.587 * G + 0.114 * B. |
|
strong |
|
inline |
|
inlineprotected |
|
inline |
Returns data size per line (row, or the width) in bytes.
Definition at line 122 of file Image.h.
Referenced by cloudViewer::visualization::Visualizer::CaptureDepthFloatBuffer(), cloudViewer::visualization::Visualizer::CaptureDepthImage(), cloudViewer::visualization::Visualizer::CaptureDepthPointCloud(), cloudViewer::visualization::Visualizer::CaptureScreenFloatBuffer(), cloudViewer::visualization::Visualizer::CaptureScreenImage(), FlipHorizontal(), FlipVertical(), cloudViewer::t::geometry::Image::FromLegacy(), cloudViewer::t::geometry::Image::ToLegacy(), and Transpose().
| Image & cloudViewer::geometry::Image::Clear | ( | ) |
Definition at line 30 of file Image.cpp.
References bytes_per_channel_, data_, height_, num_of_channels_, and width_.
Referenced by cloudViewer::visualization::SelectionPolygon::Clear(), and cloudViewer::geometry::RGBDImage::Clear().
| Image & cloudViewer::geometry::Image::ClipIntensity | ( | double | min = 0.0, |
| double | max = 1.0 |
||
| ) |
Function to clipping pixel intensities.
| min | is lower bound. |
| max | is upper bound. |
Definition at line 112 of file Image.cpp.
References bytes_per_channel_, float, height_, LogError, num_of_channels_, width_, x, and y.
| std::shared_ptr< Image > cloudViewer::geometry::Image::ConvertDepthToFloatImage | ( | double | depth_scale = 1000.0, |
| double | depth_trunc = 3.0 |
||
| ) | const |
Definition at line 97 of file Image.cpp.
References CreateFloatImage(), float, x, and y.
Referenced by cloudViewer::geometry::RGBDImage::CreateFromColorAndDepth(), and ccPointCloud::CreateFromDepthImage().
| std::shared_ptr< Image > cloudViewer::geometry::Image::CreateDepthBoundaryMask | ( | double | depth_threshold_for_discontinuity_check = 0.1, |
| int | half_dilation_kernel_size_for_discontinuity_map = 3 |
||
| ) | const |
|
static |
Factory function to create a float image composed of multipliers that convert depth values into camera distances (ImageFactory.cpp) The multiplier function M(u,v) is defined as: M(u, v) = sqrt(1 + ((u - cx) / fx) ^ 2 + ((v - cy) / fy) ^ 2) This function is used as a convenient function for performance optimization in volumetric integration (see Core/Integration/TSDFVolume.h).
Definition at line 17 of file ImageFactory.cpp.
References float, cloudViewer::camera::PinholeCameraIntrinsic::GetFocalLength(), cloudViewer::camera::PinholeCameraIntrinsic::GetPrincipalPoint(), cloudViewer::camera::PinholeCameraIntrinsic::height_, and cloudViewer::camera::PinholeCameraIntrinsic::width_.
Referenced by cloudViewer::pipelines::integration::ScalableTSDFVolume::Integrate(), and cloudViewer::pipelines::integration::UniformTSDFVolume::Integrate().
| std::shared_ptr< Image > cloudViewer::geometry::Image::CreateFloatImage | ( | Image::ColorToIntensityConversionType | type = Image::ColorToIntensityConversionType::Weighted | ) | const |
Return a gray scaled float type image.
Definition at line 47 of file ImageFactory.cpp.
References bytes_per_channel_, data_, Equal, float, height_, IsEmpty(), num_of_channels_, type, Weighted, and width_.
Referenced by ConvertDepthToFloatImage(), CreateDepthBoundaryMask(), and cloudViewer::pipelines::odometry::InitializeRGBDOdometry().
| template std::shared_ptr< Image > cloudViewer::geometry::Image::CreateImageFromFloatImage< uint16_t > | ( | ) | const |
Function to change data types of image crafted for specific usage such as single channel float image -> 8-bit RGB or 16-bit depth image.
Definition at line 107 of file ImageFactory.cpp.
References bytes_per_channel_, data_, height_, LogError, num_of_channels_, and width_.
| ImagePyramid cloudViewer::geometry::Image::CreatePyramid | ( | size_t | num_of_levels, |
| bool | with_gaussian_filter = true |
||
| ) | const |
Function to create image pyramid.
Definition at line 129 of file ImageFactory.cpp.
References bytes_per_channel_, Gaussian3, LogError, and num_of_channels_.
Referenced by cloudViewer::geometry::RGBDImage::CreatePyramid().
| std::shared_ptr< Image > cloudViewer::geometry::Image::Dilate | ( | int | half_kernel_size = 1 | ) | const |
Function to dilate 8bit mask map.
Definition at line 338 of file Image.cpp.
References bytes_per_channel_, height_, LogError, num_of_channels_, TestImageBoundary(), width_, x, and y.
| std::shared_ptr< Image > cloudViewer::geometry::Image::Downsample | ( | ) | const |
Function to 2x image downsample using simple 2x2 averaging.
Definition at line 139 of file Image.cpp.
References bytes_per_channel_, cloudViewer::utility::floor(), height_, LogError, num_of_channels_, width_, x, and y.
|
inlineoverrideprotectedvirtual |
| std::shared_ptr< Image > cloudViewer::geometry::Image::Filter | ( | const std::vector< double > & | dx, |
| const std::vector< double > & | dy | ||
| ) | const |
Function to filter image with arbitrary dx, dy separable filters.
Definition at line 248 of file Image.cpp.
References bytes_per_channel_, FilterHorizontal(), LogError, and num_of_channels_.
| std::shared_ptr< Image > cloudViewer::geometry::Image::Filter | ( | Image::FilterType | type | ) | const |
| std::shared_ptr< Image > cloudViewer::geometry::Image::FilterHorizontal | ( | const std::vector< double > & | kernel | ) | const |
Definition at line 170 of file Image.cpp.
References bytes_per_channel_, float, cloudViewer::utility::floor(), height_, LogError, num_of_channels_, width_, x, and y.
Referenced by Filter().
|
static |
| std::shared_ptr< Image > cloudViewer::geometry::Image::FlipHorizontal | ( | ) | const |
Function to flip image horizontally (from left to right).
Definition at line 310 of file Image.cpp.
References bytes_per_channel_, BytesPerLine(), copy, data_, height_, num_of_channels_, width_, x, and y.
| std::shared_ptr< Image > cloudViewer::geometry::Image::FlipVertical | ( | ) | const |
Function to flip image vertically (upside down).
Definition at line 293 of file Image.cpp.
References bytes_per_channel_, BytesPerLine(), copy, data_, height_, num_of_channels_, width_, and y.
| std::pair< bool, double > cloudViewer::geometry::Image::FloatValueAt | ( | double | u, |
| double | v | ||
| ) | const |
Function to access the bilinear interpolated float value of a (single-channel) float image. Returns a tuple, where the first bool indicates if the u,v coordinates are within the image dimensions, and the second double value is the interpolated pixel value.
Definition at line 58 of file Image.cpp.
References bytes_per_channel_, height_, cloudViewer::core::make_pair(), num_of_channels_, and width_.
Referenced by cloudViewer::geometry::VoxelGrid::CarveDepthMap(), cloudViewer::geometry::VoxelGrid::CarveSilhouette(), cloudViewer::pipelines::color_map::ComputeJacobianAndResidualNonRigid(), and cloudViewer::pipelines::color_map::ComputeJacobianAndResidualRigid().
|
inlineoverridevirtual |
Returns unique class ID.
Reimplemented from ccHObject.
Definition at line 74 of file Image.h.
References CV_TYPES::IMAGE2.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Returns the entity's own bounding-box.
Children bboxes are ignored.
| withGLFeatures | whether to take into account display-only elements (if any) |
Reimplemented from ccHObject.
Definition at line 47 of file Image.cpp.
References ccHObject::GetAxisAlignedBoundingBox().
|
inlinevirtual |
|
inlineoverridevirtual |
Reimplemented from ccHObject.
Definition at line 87 of file Image.h.
Referenced by CreateFloatImage(), and cloudViewer::t::geometry::Image::FromLegacy().
|
inlineoverridevirtual |
| Image & cloudViewer::geometry::Image::LinearTransform | ( | double | scale = 1.0, |
| double | offset = 0.0 |
||
| ) |
Function to linearly transform pixel intensities image_new = scale * image + offset.
Definition at line 126 of file Image.cpp.
References bytes_per_channel_, float, height_, LogError, num_of_channels_, offset, width_, x, and y.
Referenced by cloudViewer::pipelines::odometry::NormalizeIntensity().
|
overrideprotectedvirtual |
This method is called when another object is deleted.
For internal use.
Reimplemented from ccHObject.
Definition at line 28 of file Image.cpp.
References ccHObject::onDeletionOf().
| template uint16_t * cloudViewer::geometry::Image::PointerAt< uint16_t > | ( | int | u, |
| int | v | ||
| ) | const |
Function to access the raw data of a single-channel Image.
Definition at line 77 of file Image.cpp.
Referenced by cloudViewer::pipelines::odometry::AddElementToCorrespondenceMap(), cloudViewer::pipelines::odometry::ComputeCorrespondence(), cloudViewer::pipelines::odometry::RGBDOdometryJacobianFromColorTerm::ComputeJacobianAndResidual(), cloudViewer::pipelines::odometry::RGBDOdometryJacobianFromHybridTerm::ComputeJacobianAndResidual(), cloudViewer::io::ConvertBGRAToRGB(), cloudViewer::pipelines::odometry::ConvertDepthImageToXYZImage(), cloudViewer::pipelines::odometry::CountCorrespondence(), cloudViewer::geometry::RGBDImage::CreateFromNYUFormat(), cloudViewer::geometry::RGBDImage::CreateFromSUNFormat(), cloudViewer::pipelines::odometry::InitializeCorrespondenceMap(), cloudViewer::pipelines::integration::UniformTSDFVolume::IntegrateWithDepthToCameraDistanceMultiplier(), cloudViewer::pipelines::odometry::MergeCorrespondenceMaps(), cloudViewer::pipelines::odometry::NormalizeIntensity(), cloudViewer::pipelines::odometry::PreprocessDepth(), and cloudViewer::pipelines::color_map::QueryImageIntensity().
| template uint16_t * cloudViewer::geometry::Image::PointerAt< uint16_t > | ( | int | u, |
| int | v, | ||
| int | ch | ||
| ) | const |
|
inline |
Prepare Image properties and allocate Image buffer.
Definition at line 109 of file Image.h.
Referenced by cloudViewer::visualization::Visualizer::CaptureDepthFloatBuffer(), cloudViewer::visualization::Visualizer::CaptureDepthImage(), cloudViewer::visualization::Visualizer::CaptureDepthPointCloud(), cloudViewer::visualization::Visualizer::CaptureScreenFloatBuffer(), cloudViewer::visualization::Visualizer::CaptureScreenImage(), cloudViewer::visualization::SelectionPolygon::FillPolygon(), cloudViewer::pipelines::odometry::InitializeCorrespondenceMap(), and cloudViewer::t::geometry::Image::ToLegacy().
| bool cloudViewer::geometry::Image::TestImageBoundary | ( | double | u, |
| double | v, | ||
| double | inner_margin = 0.0 |
||
| ) | const |
Test if coordinate (u, v) is located in the inner_marge of the image.
| u | Coordinate along the width dimension. |
| v | Coordinate along the height dimension. |
| inner_margin | The inner margin from the image boundary. |
true if coordinate (u, v) is located in the inner_marge of the image. Definition at line 51 of file Image.cpp.
References height_, and width_.
Referenced by cloudViewer::pipelines::color_map::ComputeJacobianAndResidualNonRigid(), cloudViewer::pipelines::color_map::ComputeJacobianAndResidualRigid(), Dilate(), and cloudViewer::pipelines::color_map::QueryImageIntensity().
| std::shared_ptr< Image > cloudViewer::geometry::Image::Transpose | ( | ) | const |
Definition at line 262 of file Image.cpp.
References bytes_per_channel_, BytesPerLine(), copy, data_, height_, num_of_channels_, width_, x, and y.
| int cloudViewer::geometry::Image::bytes_per_channel_ = 0 |
Number of bytes per channel.
Definition at line 225 of file Image.h.
Referenced by cloudViewer::pipelines::odometry::CheckRGBDImagePair(), Clear(), ClipIntensity(), cloudViewer::io::ConvertBGRAToRGB(), cloudViewer::pipelines::odometry::ConvertDepthImageToXYZImage(), CreateFloatImage(), ccPointCloud::CreateFromDepthImage(), CreateImageFromFloatImage(), CreatePyramid(), Dilate(), Downsample(), Filter(), FilterHorizontal(), FlipHorizontal(), FlipVertical(), FloatValueAt(), cloudViewer::t::geometry::Image::FromLegacy(), LinearTransform(), and Transpose().
| std::vector<uint8_t> cloudViewer::geometry::Image::data_ |
Image storage buffer.
Definition at line 227 of file Image.h.
Referenced by cloudViewer::visualization::Visualizer::CaptureDepthFloatBuffer(), cloudViewer::visualization::Visualizer::CaptureDepthImage(), cloudViewer::visualization::Visualizer::CaptureDepthPointCloud(), cloudViewer::visualization::Visualizer::CaptureScreenFloatBuffer(), cloudViewer::visualization::Visualizer::CaptureScreenImage(), Clear(), CreateFloatImage(), CreateImageFromFloatImage(), cloudViewer::visualization::SelectionPolygon::FillPolygon(), FlipHorizontal(), FlipVertical(), cloudViewer::t::geometry::Image::FromLegacy(), PointerAt(), cloudViewer::t::geometry::Image::ToLegacy(), and Transpose().
| int cloudViewer::geometry::Image::height_ = 0 |
Height of the image.
Definition at line 221 of file Image.h.
Referenced by cloudViewer::visualization::Visualizer::CaptureDepthFloatBuffer(), cloudViewer::visualization::Visualizer::CaptureDepthImage(), cloudViewer::visualization::Visualizer::CaptureDepthPointCloud(), cloudViewer::visualization::Visualizer::CaptureScreenFloatBuffer(), cloudViewer::visualization::Visualizer::CaptureScreenImage(), cloudViewer::geometry::VoxelGrid::CarveDepthMap(), cloudViewer::geometry::VoxelGrid::CarveSilhouette(), cloudViewer::pipelines::odometry::CheckImagePair(), Clear(), ClipIntensity(), cloudViewer::pipelines::odometry::ComputeCorrespondence(), cloudViewer::io::ConvertBGRAToRGB(), cloudViewer::pipelines::odometry::ConvertDepthImageToXYZImage(), cloudViewer::pipelines::odometry::CountCorrespondence(), CreateFloatImage(), cloudViewer::geometry::RGBDImage::CreateFromColorAndDepth(), cloudViewer::geometry::RGBDImage::CreateFromNYUFormat(), cloudViewer::geometry::RGBDImage::CreateFromSUNFormat(), CreateImageFromFloatImage(), Dilate(), Downsample(), FilterHorizontal(), FlipHorizontal(), FlipVertical(), FloatValueAt(), cloudViewer::t::geometry::Image::FromLegacy(), GetMax2DBound(), cloudViewer::geometry::RGBDImage::GetMax2DBound(), cloudViewer::pipelines::odometry::InitializeCorrespondenceMap(), LinearTransform(), cloudViewer::pipelines::odometry::MergeCorrespondenceMaps(), cloudViewer::pipelines::odometry::NormalizeIntensity(), TestImageBoundary(), cloudViewer::t::geometry::Image::ToLegacy(), and Transpose().
| int cloudViewer::geometry::Image::num_of_channels_ = 0 |
Number of chanels in the image.
Definition at line 223 of file Image.h.
Referenced by cloudViewer::pipelines::odometry::CheckRGBDImagePair(), Clear(), ClipIntensity(), cloudViewer::io::ConvertBGRAToRGB(), cloudViewer::pipelines::odometry::ConvertDepthImageToXYZImage(), CreateFloatImage(), ccPointCloud::CreateFromDepthImage(), CreateImageFromFloatImage(), CreatePyramid(), Dilate(), Downsample(), Filter(), FilterHorizontal(), FlipHorizontal(), FlipVertical(), FloatValueAt(), cloudViewer::t::geometry::Image::FromLegacy(), LinearTransform(), PointerAt(), and Transpose().
| int cloudViewer::geometry::Image::width_ = 0 |
Width of the image.
Definition at line 219 of file Image.h.
Referenced by cloudViewer::visualization::Visualizer::CaptureDepthFloatBuffer(), cloudViewer::visualization::Visualizer::CaptureDepthImage(), cloudViewer::visualization::Visualizer::CaptureDepthPointCloud(), cloudViewer::geometry::VoxelGrid::CarveDepthMap(), cloudViewer::geometry::VoxelGrid::CarveSilhouette(), cloudViewer::pipelines::odometry::CheckImagePair(), Clear(), ClipIntensity(), cloudViewer::pipelines::odometry::ComputeCorrespondence(), cloudViewer::io::ConvertBGRAToRGB(), cloudViewer::pipelines::odometry::ConvertDepthImageToXYZImage(), cloudViewer::pipelines::odometry::CountCorrespondence(), CreateFloatImage(), cloudViewer::geometry::RGBDImage::CreateFromColorAndDepth(), cloudViewer::geometry::RGBDImage::CreateFromNYUFormat(), cloudViewer::geometry::RGBDImage::CreateFromSUNFormat(), CreateImageFromFloatImage(), Dilate(), Downsample(), FilterHorizontal(), FlipHorizontal(), FlipVertical(), FloatValueAt(), cloudViewer::t::geometry::Image::FromLegacy(), GetMax2DBound(), cloudViewer::geometry::RGBDImage::GetMax2DBound(), cloudViewer::pipelines::odometry::InitializeCorrespondenceMap(), LinearTransform(), cloudViewer::pipelines::odometry::MergeCorrespondenceMaps(), cloudViewer::pipelines::odometry::NormalizeIntensity(), PointerAt(), TestImageBoundary(), and Transpose().