Template Struct TPixelLabelInfo
Defined in File TPixelLabelInfo.h
Inheritance Relationships
Base Type
public mrpt::obs::TPixelLabelInfoBase(Struct TPixelLabelInfoBase)
Struct Documentation
-
template<unsigned int BYTES_REQUIRED_>
struct TPixelLabelInfo : public mrpt::obs::TPixelLabelInfoBase Pixel-wise semantic label struct.
See CObservation3DRangeScan::pixelLabels
Public Types
-
using Ptr = std::shared_ptr<TPixelLabelInfo>
-
using bitmask_t = typename mrpt::uint_select_by_bytecount<BYTES_REQUIRED>::type
Automatically-determined integer type of the proper size such that all labels fit as one bit (max: 64)
-
using TPixelLabelMatrix = mrpt::math::CMatrixDynamic<bitmask_t>
Each pixel may be assigned between 0 and MAX_NUM_LABELS-1 ‘labels’ by setting to 1 the corresponding i’th bit [0,MAX_NUM_LABELS-1] in the byte in pixelLabels(r,c). That is, each pixel is assigned an 8*BITFIELD_BYTES bit-wide bitfield of possible categories.
See also
hasPixelLabels
Public Functions
-
inline virtual void setSize(const int NROWS, const int NCOLS) override
Resizes the matrix pixelLabels to the given size, setting all bitfields to zero (that is, all pixels are assigned NONE category).
-
inline virtual void setLabel(const int row, const int col, uint8_t label_idx) override
Mark the pixel(row,col) as classified in the category label_idx, which may be in the range 0 to MAX_NUM_LABELS-1 Note that 0 is a valid label index, it does not mean “no label”
See also
unsetLabel, unsetAll
-
inline virtual void getLabels(const int row, const int col, uint8_t &labels) override
-
inline virtual void unsetLabel(const int row, const int col, uint8_t label_idx) override
For the pixel(row,col), removes its classification into the category label_idx, which may be in the range 0 to 7 Note that 0 is a valid label index, it does not mean “no label”
See also
setLabel, unsetAll
-
inline void unsetAll(const int row, const int col, [[maybe_unused]] uint8_t label_idx) override
-
inline virtual bool checkLabel(const int row, const int col, uint8_t label_idx) const override
Checks whether pixel(row,col) has been classified into category label_idx, which may be in the range 0 to 7
See also
unsetLabel, unsetAll
-
inline TPixelLabelInfo()
Public Members
-
TPixelLabelMatrix pixelLabels
Public Static Attributes
-
static constexpr unsigned int BYTES_REQUIRED = BYTES_REQUIRED_
-
using Ptr = std::shared_ptr<TPixelLabelInfo>