Visual Servoing Platform  version 3.5.1 under development (2022-12-04)
vpImage< Type > Class Template Reference

#include <visp3/core/vpImage.h>

Public Member Functions

 vpImage ()
 
 vpImage (const vpImage< Type > &)
 
 vpImage (vpImage< Type > &&)
 
 vpImage (unsigned int height, unsigned int width)
 
 vpImage (unsigned int height, unsigned int width, Type value)
 
 vpImage (Type *const array, unsigned int height, unsigned int width, bool copyData=false)
 
virtual ~vpImage ()
 

Public Attributes

Type * bitmap
 
vpDisplaydisplay
 

Friends

class vpImageConvert
 

Related Functions

(Note that these are not member functions.)

template<class Type >
void init (unsigned int h, unsigned int w, Type value)
 
template<class Type >
void init (unsigned int h, unsigned int w)
 
template<class Type >
void init (Type *const array, unsigned int h, unsigned int w, bool copyData)
 
template<class Type >
 vpImage (unsigned int h, unsigned int w)
 
template<class Type >
 vpImage (unsigned int h, unsigned int w, Type value)
 
template<class Type >
 vpImage (Type *const array, unsigned int h, unsigned int w, bool copyData)
 
template<class Type >
 vpImage ()
 
template<class Type >
 vpImage (const vpImage< Type > &I)
 
template<class Type >
 vpImage (vpImage< Type > &&I)
 
template<>
double getValue (double i, double j) const
 
template<>
double getValue (const vpImagePoint &ip) const
 
template<>
void performLut (const unsigned char(&lut)[256], unsigned int nbThreads)
 
template<>
void performLut (const vpRGBa(&lut)[256], unsigned int nbThreads)
 

Inherited functionalities from vpImage

std::ostream & operator<< (std::ostream &s, const vpImage< Type > &I)
 
std::ostream & operator<< (std::ostream &s, const vpImage< unsigned char > &I)
 
std::ostream & operator<< (std::ostream &s, const vpImage< char > &I)
 
std::ostream & operator<< (std::ostream &s, const vpImage< float > &I)
 
std::ostream & operator<< (std::ostream &s, const vpImage< double > &I)
 
void swap (vpImage< Type > &first, vpImage< Type > &second)
 
void destroy ()
 
void doubleSizeImage (vpImage< Type > &res)
 
unsigned int getCols () const
 
unsigned int getHeight () const
 
Type getMaxValue () const
 
Type getMeanValue () const
 
Type getMinValue () const
 
void getMinMaxValue (Type &min, Type &max) const
 
void getMinMaxLoc (vpImagePoint *minLoc, vpImagePoint *maxLoc, Type *minVal=NULL, Type *maxVal=NULL) const
 
unsigned int getNumberOfPixel () const
 
unsigned int getRows () const
 
unsigned int getSize () const
 
Type getValue (unsigned int i, unsigned int j) const
 
Type getValue (double i, double j) const
 
Type getValue (const vpImagePoint &ip) const
 
double getSum () const
 
unsigned int getWidth () const
 
void halfSizeImage (vpImage< Type > &res) const
 
void init (unsigned int height, unsigned int width)
 
void init (unsigned int height, unsigned int width, Type value)
 
void init (Type *const array, unsigned int height, unsigned int width, bool copyData=false)
 
void insert (const vpImage< Type > &src, const vpImagePoint &topLeft)
 
Type * operator[] (unsigned int i)
 
Type * operator[] (int i)
 
const Type * operator[] (unsigned int i) const
 
const Type * operator[] (int i) const
 
Type operator() (unsigned int i, unsigned int j) const
 
void operator() (unsigned int i, unsigned int j, const Type &v)
 
Type operator() (const vpImagePoint &ip) const
 
void operator() (const vpImagePoint &ip, const Type &v)
 
vpImage< Type > operator- (const vpImage< Type > &B)
 
vpImage< Type > & operator= (vpImage< Type > other)
 
vpImage< Type > & operator= (const Type &v)
 
bool operator== (const vpImage< Type > &I)
 
bool operator!= (const vpImage< Type > &I)
 
void performLut (const Type(&lut)[256], unsigned int nbThreads=1)
 
void quarterSizeImage (vpImage< Type > &res) const
 
void resize (unsigned int h, unsigned int w)
 
void resize (unsigned int h, unsigned int w, const Type &val)
 
void sub (const vpImage< Type > &B, vpImage< Type > &C)
 
void sub (const vpImage< Type > &A, const vpImage< Type > &B, vpImage< Type > &C)
 
void subsample (unsigned int v_scale, unsigned int h_scale, vpImage< Type > &sampled) const
 

Detailed Description

template<class Type>
class vpImage< Type >

Definition of the vpImage class member functions.

This is a template class, therefore the type of each element of the array is not a priori defined.

Data structure

Each image is build using two structure (an array bitmap which size is [width*height]) and an array of pointer row (which size is [nrow]) the ith element in the row array row[i] is pointer toward the ith "line" of the image (ie, bitmap +i*width )

Such a structure allows a fast acces to each element of the image. if i is the ith rows and j the jth columns the value of this pixel is given by I[i][j] (that is equivalent to row[i][j]).

Example

The following example available in tutorial-image-manipulation.cpp shows how to create gray level and color images and how to access to the pixels.

#include <visp3/core/vpImage.h>
int main()
{
try {
vpImage<unsigned char> gray_image(240, 320);
vpImage<vpRGBa> color_image(240, 320);
gray_image = 128;
vpRGBa color(255, 0, 0);
color_image = color;
unsigned int igray_max = gray_image.getHeight() - 1;
unsigned int jgray_max = gray_image.getWidth() - 1;
std::cout << "Gray image, last pixel intensity: " << (int)gray_image[igray_max][jgray_max] << std::endl;
unsigned int icolor_max = color_image.getHeight() - 1;
unsigned int jcolor_max = color_image.getWidth() - 1;
std::cout << "Color image, last pixel RGB components: " << (int)color_image[icolor_max][jcolor_max].R << " "
<< (int)color_image[icolor_max][jcolor_max].G << " " << (int)color_image[icolor_max][jcolor_max].B
<< std::endl;
} catch (const vpException &e) {
std::cout << "Catch an exception: " << e << std::endl;
}
}
error that can be emited by ViSP classes.
Definition: vpException.h:72
Definition: vpRGBa.h:67

Important remark

To provide high-performance access there is no verification to ensure that 0 $\le$ i < height and 0 $\le$ j < width. Since the memory allocated in the bitmap array is continuous, that means that if (i, j) is outside the image you will manipulate a pixel that is not as expected. To highlight this remark, we provide hereafter an example where the considered pixel is outside the image:

unsigned int width = 320;
unsigned int height = 240;
vpImage<unsigned char> I(height, width); // Create an 320x240 image
// Set pixel coordinates that is outside the image
unsigned int i = 100;
unsigned int j = 400;
unsigned char value;
value = I[i][j]; // Here we will get the pixel value at position (101, 80)
Examples
grabRealSense.cpp, grabRealSense2.cpp, mbtGenericTrackingDepth.cpp, mbtGenericTrackingDepthOnly.cpp, testColorConversion.cpp, testConnectedComponents.cpp, testDisplays.cpp, testGenericTracker.cpp, testGenericTrackerDepth.cpp, testImageGetValue.cpp, testImagePrint.cpp, testKeyPoint-2.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testKeyPoint-5.cpp, testKeyPoint-6.cpp, testKeyPoint-7.cpp, testKeyPoint.cpp, testRealSense2_D435.cpp, testRealSense2_D435_align.cpp, testRealSense2_D435_pcl.cpp, testRealSense2_SR300.cpp, testRealSense_R200.cpp, testRealSense_SR300.cpp, tutorial-apriltag-detector-live-rgbd-realsense.cpp, tutorial-connected-components.cpp, tutorial-grabber-rgbd-D435-structurecore.cpp, tutorial-mb-generic-tracker-apriltag-rs2.cpp, tutorial-mb-generic-tracker-rgbd-blender.cpp, tutorial-mb-generic-tracker-rgbd-realsense.cpp, tutorial-mb-generic-tracker-rgbd.cpp, and tutorial-pose-from-planar-object.cpp.

Definition at line 76 of file vpImage.h.

Constructor & Destructor Documentation

◆ vpImage() [1/6]

template<class Type >
vpImage ( )

constructor

Definition at line 775 of file vpImage.h.

◆ vpImage() [2/6]

template<class Type >
vpImage ( const vpImage< Type > &  I)

◆ vpImage() [3/6]

template<class Type >
vpImage ( vpImage< Type > &&  I)

move constructor

Definition at line 873 of file vpImage.h.

References vpImage< Type >::bitmap, and vpImage< Type >::display.

◆ vpImage() [4/6]

template<class Type >
vpImage ( unsigned int  height,
unsigned int  width 
)

constructor set the size of the image

Definition at line 745 of file vpImage.h.

References vpImage< Type >::init().

◆ vpImage() [5/6]

template<class Type >
vpImage ( unsigned int  height,
unsigned int  width,
Type  value 
)

constructor set the size of the image and init all the pixel

Definition at line 755 of file vpImage.h.

References vpImage< Type >::init().

◆ vpImage() [6/6]

template<class Type >
vpImage ( Type *const  array,
unsigned int  height,
unsigned int  width,
bool  copyData = false 
)

constructor from an image stored as a continuous array in memory

Definition at line 765 of file vpImage.h.

References vpImage< Type >::init().

◆ ~vpImage()

template<class Type >
vpImage< Type >::~vpImage
virtual

destructor

Destructor : Memory de-allocation.

Warning
does not deallocate memory for display and video

Definition at line 855 of file vpImage.h.

Member Function Documentation

◆ destroy()

template<class Type >
void vpImage< Type >::destroy

Destructor : Memory de-allocation.

Warning
does not deallocate memory for display and video

Definition at line 828 of file vpImage.h.

Referenced by vpImageFilter::filter(), vpImageFilter::gaussianBlur(), and vpTemplateTracker::initTracking().

◆ doubleSizeImage()

template<class Type >
void vpImage< Type >::doubleSizeImage ( vpImage< Type > &  res)

Returns a new image that's double size of the current image. Used (eg. in case of keypoints extraction, we might double size of the image in order to have more keypoints). The double size image is computed by nearest-neighbour interpolation:

A B C
E F G
H I J
where
A C H J are pixels from original image
B E G I are interpolated pixels
Warning
Operator = must be defined for Type.
Parameters
res[out] : Image that is double size of the current image.

The example below shows how to use this method:

vpImage<unsigned char> I; // original image
vpImageIo::read(I, "myImage.pgm");
vpImage<unsigned char> I2; // double size image
vpImageIo::write(I2, "myDoubleSizeImage.pgm");
static void read(vpImage< unsigned char > &I, const std::string &filename, int backend=IO_DEFAULT_BACKEND)
Definition: vpImageIo.cpp:148
static void write(const vpImage< unsigned char > &I, const std::string &filename, int backend=IO_DEFAULT_BACKEND)
Definition: vpImageIo.cpp:292
void doubleSizeImage(vpImage< Type > &res)
Definition: vpImage.h:1295

See halfSizeImage(vpImage<Type> &) for an example of pyramid construction.

Definition at line 1295 of file vpImage.h.

References vpImage< Type >::resize().

◆ getCols()

template<class Type >
unsigned int vpImage< Type >::getCols ( ) const
inline

Get the number of columns in the image.

Returns
The image number of column, or image width.
See also
getWidth()

Definition at line 179 of file vpImage.h.

Referenced by vpImageConvert::convert(), vpMomentObject::fromImage(), and vpMbKltTracker::reinit().

◆ getHeight()

template<class Type >
unsigned int vpImage< Type >::getHeight ( ) const
inline

Get the image height.

Returns
The image height.
See also
getWidth()
Examples
testColorConversion.cpp, testConnectedComponents.cpp, testGenericTracker.cpp, testGenericTrackerDepth.cpp, testKeyPoint-3.cpp, testKeyPoint.cpp, testRealSense_R200.cpp, testRealSense_SR300.cpp, and tutorial-apriltag-detector-live-rgbd-realsense.cpp.

Definition at line 188 of file vpImage.h.

Referenced by vpDiskGrabber::acquire(), vp1394CMUGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vpImageTools::binarise(), vpHistogram::calculate(), vpImageTools::changeLUT(), vp::clahe(), vpMbtDistanceLine::closeToImageBorder(), vpImageTools::columnMean(), vpPose::computePlanarObjectPoseFromRGBD(), vpMbTracker::computeProjectionErrorImpl(), vpMeLine::computeRhoTheta(), vp::connectedComponents(), vpImageConvert::convert(), vpMeSite::convolution(), vpKeyPoint::createImageMatching(), vpImageTools::crop(), vp1394TwoGrabber::dequeue(), vpDetectorDataMatrixCode::detect(), vpDetectorQRCode::detect(), vpImageMorphology::dilatation(), vpHistogram::display(), vpMbDepthDenseTracker::display(), vpMbDepthNormalTracker::display(), vpMbEdgeKltTracker::display(), vpMbEdgeTracker::display(), vpMbKltTracker::display(), vpMbtDistanceCylinder::display(), vpMbtDistanceLine::display(), vpMbtFaceDepthDense::display(), vpMbtFaceDepthNormal::display(), vpMeLine::display(), vpWireFrameSimulator::display_scene(), vpMbtFaceDepthNormal::displayFeature(), vpDisplayGTK::displayImageROI(), vpDisplay::displayLine(), vpFeatureDisplay::displayLine(), vpKeyPoint::displayMatching(), vp::equalizeHistogram(), vpImageMorphology::erosion(), vpPlaneEstimation::estimatePlane(), vp::fillHoles(), vpTemplateTrackerZone::fillTriangle(), vpImageFilter::filter(), vpImageFilter::filterX(), vpImageFilter::filterY(), vpImageFilter::filterYBottomBorder(), vpImageFilter::filterYBottomBorderB(), vpImageFilter::filterYBottomBorderG(), vpImageFilter::filterYBottomBorderR(), vp::findContours(), vpImageTools::flip(), vp::floodFill(), vpSimulatorAfma6::getCameraParameters(), vpSimulatorViper850::getCameraParameters(), vpAfma6::getCameraParameters(), vpViper650::getCameraParameters(), vpViper850::getCameraParameters(), vpServolens::getCameraParameters(), vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpKinect::getDepthMap(), vpRobotWireFrameSimulator::getExternalCameraParameters(), vpWireFrameSimulator::getExternalCameraParameters(), vpSimulatorAfma6::getExternalImage(), vpSimulatorViper850::getExternalImage(), vpWireFrameSimulator::getExternalImage(), vpVideoReader::getFrame(), vpImageFilter::getGaussPyramidal(), vpImageFilter::getGaussXPyramidal(), vpImageFilter::getGaussYPyramidal(), vpImageFilter::getGradX(), vpImageFilter::getGradY(), vpRobotBebop2::getGrayscaleImage(), vpImageSimulator::getImage(), vpWireFrameSimulator::getInternalCameraParameters(), vpWireFrameSimulator::getInternalImage(), vpRobotWireFrameSimulator::getInternalView(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpPolygon3D::getNbCornerInsideImage(), vpTemplateTrackerMI::getNormalizedCost(), vpAROgre::getRenderingOutput(), vpRobotBebop2::getRGBaImage(), vpTemplateTrackerSSD::getSSD(), vpImageTools::imageAdd(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpImageTools::imageSubtract(), vpMbDepthDenseTracker::init(), vpMbDepthNormalTracker::init(), vpMbEdgeTracker::init(), vpMbKltTracker::init(), vpAROgre::init(), vpDisplayGTK::init(), vpDisplayX::init(), vpDisplayOpenCV::init(), vpDisplayWin32::init(), vpTemplateTrackerZone::initFromPoints(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpMbtDistanceLine::initMovingEdge(), vpMbEdgeTracker::initPyramid(), vpTemplateTracker::initTracking(), vpImage< Type >::insert(), vpKeyPoint::insertImageMatching(), vpImageTools::integralImage(), vpMeEllipse::leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), vpImageConvert::merge(), vpWireFrameSimulator::navigation(), vpImageTools::normalize(), vpImageTools::normalizedCorrelation(), vpDiskGrabber::open(), vpVideoWriter::open(), vpImage< Type >::operator==(), vpImage< Type >::performLut(), vpMeEllipse::plugHoles(), vpMbKltTracker::postTracking(), vpMbEdgeKltTracker::postTracking(), vpColorDepthConversion::projectColorToDepth(), vp::reconstruct(), vpMbKltTracker::reinit(), vpImageTools::remap(), vpImageTools::resize(), vpImageTools::resizeBilinear(), vp::retinex(), vpPolygon3D::roiInsideImage(), vpMeEllipse::sample(), vpMeLine::sample(), vpMeNurbs::sample(), vpDot2::searchDotsInArea(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpImageFilter::sepFilter(), vpAR::setImage(), vpMbEdgeKltTracker::setPose(), vpMbKltTracker::setPose(), vpImageConvert::split(), vp::stretchContrast(), vp::stretchContrastHSV(), vpImage< Type >::sub(), vpImageTools::templateMatching(), vpMbEdgeTracker::track(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerMIInverseCompositional::trackNoPyr(), vpImageTools::undistort(), vp::unsharpMask(), vpMbtDistanceLine::updateMovingEdge(), vpMbEdgeTracker::visibleFace(), vpDisplayGDI::vpDisplayGDI(), vpDisplayGTK::vpDisplayGTK(), vpDisplayOpenCV::vpDisplayOpenCV(), vpDisplayX::vpDisplayX(), vpImage< Type >::vpImage(), vpImageTools::warpImage(), vpImageTools::warpLinear(), and vpKinect::warpRGBFrame().

◆ getMaxValue()

template<class Type >
Type vpImage< Type >::getMaxValue

Return the maximum value within the bitmap.

See also
getMinValue()

Definition at line 892 of file vpImage.h.

References vpException::fatalError.

◆ getMeanValue()

template<class Type >
Type vpImage< Type >::getMeanValue

Return the mean value of the bitmap.

Definition at line 907 of file vpImage.h.

Referenced by vpImageTools::normalizedCorrelation().

◆ getMinMaxLoc()

template<class Type >
void vpImage< Type >::getMinMaxLoc ( vpImagePoint minLoc,
vpImagePoint maxLoc,
Type *  minVal = NULL,
Type *  maxVal = NULL 
) const

Get the position of the minimum and/or the maximum pixel value within the bitmap and the corresponding value. Following code allows retrieving only minimum value and position:

//[...] Fill I
vpImagePoint min_loc;
double min_val = 0.0;
I.getMinMaxLoc(&min_loc, NULL, &min_val, NULL);
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition: vpImagePoint.h:89
void getMinMaxLoc(vpImagePoint *minLoc, vpImagePoint *maxLoc, Type *minVal=NULL, Type *maxVal=NULL) const
Get the position of the minimum and/or the maximum pixel value within the bitmap and the correspondin...
Definition: vpImage.h:974
Parameters
minLoc: Position of the pixel with minimum value if not NULL.
maxLoc: Position of the pixel with maximum value if not NULL.
minVal: Minimum pixel value if not NULL.
maxVal: Maximum pixel value if not NULL.
See also
getMaxValue()
getMinValue()
getMinMaxValue()

Definition at line 974 of file vpImage.h.

References vpException::fatalError, and vpImagePoint::set_ij().

◆ getMinMaxValue()

template<class Type >
void vpImage< Type >::getMinMaxValue ( Type &  min,
Type &  max 
) const

Look for the minimum and the maximum value within the bitmap.

See also
getMaxValue()
getMinValue()
getMinMaxLoc()

Definition at line 938 of file vpImage.h.

References vpException::fatalError.

Referenced by vpImageConvert::convert(), vp::stretchContrast(), and vp::stretchContrastHSV().

◆ getMinValue()

template<class Type >
Type vpImage< Type >::getMinValue

Return the minimum value within the bitmap.

See also
getMaxValue()

Definition at line 920 of file vpImage.h.

References vpException::fatalError.

◆ getNumberOfPixel()

template<class Type >
unsigned int vpImage< Type >::getNumberOfPixel ( ) const
inline

Get the image number of pixels which corresponds to the image width multiplied by the image height.

Returns
The image number of pixels or image size.
See also
getWidth(), getHeight()

Definition at line 209 of file vpImage.h.

◆ getRows()

template<class Type >
unsigned int vpImage< Type >::getRows ( ) const
inline

Get the number of rows in the image.

Returns
The image number of rows, or image height.
See also
getHeight()

Definition at line 218 of file vpImage.h.

Referenced by vpImageConvert::convert(), vpMomentObject::fromImage(), and vpMbKltTracker::reinit().

◆ getSize()

◆ getSum()

template<class Type >
double getSum
inline

Compute the sum of image intensities. For vpRGBa image type, compute the sum (R+G+B) of image intensities.

Definition at line 1590 of file vpImage.h.

Referenced by vpImageTools::normalize().

◆ getValue() [1/3]

template<class Type >
double getValue ( const vpImagePoint ip) const
inline

Retrieves pixel value from an image containing values of type Type with sub-pixel accuracy.

Gets the value of a sub-pixel with coordinates (i,j) with bilinear interpolation.

See also vpImageTools::interpolate() for a similar result, but with a choice of the interpolation method.

Parameters
ip: Sub-pixel coordinates of a point in the image.
Returns
Interpolated sub-pixel value from the four neighbours.
Exceptions
vpImageException::notInTheImage: If the image point ip is out of the image.

Definition at line 1557 of file vpImage.h.

References vpImagePoint::get_i(), vpImagePoint::get_j(), and vpImage< Type >::getValue().

◆ getValue() [2/3]

template<class Type >
double getValue ( double  i,
double  j 
) const
inline

Retrieves pixel value from an image containing values of type Type with sub-pixel accuracy.

Gets the value of a sub-pixel with coordinates (i,j) with bilinear interpolation.

See also vpImageTools::interpolate() for a similar result, but with a choice of the interpolation method.

Parameters
i: Sub-pixel coordinate along the rows.
j: Sub-pixel coordinate along the columns.
Returns
Interpolated sub-pixel value from the four neighbours.
Exceptions
vpImageException::notInTheImage: If (i,j) is out of the image.

Definition at line 1368 of file vpImage.h.

References vpImageException::notInitializedError, vpImageException::notInTheImage, and vpMath::round().

◆ getValue() [3/3]

template<class Type >
Type vpImage< Type >::getValue ( unsigned int  i,
unsigned int  j 
) const
inline

Retrieves pixel value from an image containing values of type Type.

Gets the value of a sub-pixel with coordinates (i,j).

Parameters
i: Pixel coordinate along the rows.
j: Pixel coordinate along the columns.
Returns
Pixel value.
Exceptions
vpImageException::notInTheImage: If (i,j) is out of the image.

Definition at line 1343 of file vpImage.h.

References vpImageException::notInTheImage.

Referenced by vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpTemplateTrackerMI::getNormalizedCost(), vpTemplateTrackerSSD::getSSD(), vpImage< Type >::getValue(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpMeTracker::inMask(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), and vpTemplateTrackerMIInverseCompositional::trackNoPyr().

◆ getWidth()

template<class Type >
unsigned int vpImage< Type >::getWidth ( ) const
inline

Get the image width.

Returns
The image width.
See also
getHeight()
Examples
testColorConversion.cpp, testConnectedComponents.cpp, testGenericTracker.cpp, testGenericTrackerDepth.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testKeyPoint.cpp, testRealSense_R200.cpp, testRealSense_SR300.cpp, and tutorial-apriltag-detector-live-rgbd-realsense.cpp.

Definition at line 246 of file vpImage.h.

Referenced by vpDiskGrabber::acquire(), vp1394CMUGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vpImageTools::binarise(), vpHistogram::calculate(), vpImageTools::changeLUT(), vp::clahe(), vpMbtDistanceLine::closeToImageBorder(), vpImageTools::columnMean(), vpPose::computePlanarObjectPoseFromRGBD(), vpMbTracker::computeProjectionErrorImpl(), vpMeLine::computeRhoTheta(), vp::connectedComponents(), vpImageConvert::convert(), vpMeSite::convolution(), vpKeyPoint::createImageMatching(), vpImageTools::crop(), vp1394TwoGrabber::dequeue(), vpDetectorDataMatrixCode::detect(), vpDetectorQRCode::detect(), vpImageMorphology::dilatation(), vpHistogram::display(), vpMbDepthDenseTracker::display(), vpMbDepthNormalTracker::display(), vpMbEdgeKltTracker::display(), vpMbEdgeTracker::display(), vpMbKltTracker::display(), vpMbtDistanceCylinder::display(), vpMbtDistanceLine::display(), vpMbtFaceDepthDense::display(), vpMbtFaceDepthNormal::display(), vpMeLine::display(), vpWireFrameSimulator::display_scene(), vpMbtFaceDepthNormal::displayFeature(), vpDisplayGTK::displayImageROI(), vpDisplay::displayLine(), vpFeatureDisplay::displayLine(), vpKeyPoint::displayMatching(), vp::equalizeHistogram(), vpImageMorphology::erosion(), vpPlaneEstimation::estimatePlane(), vp::fillHoles(), vpTemplateTrackerZone::fillTriangle(), vpImageFilter::filter(), vpImageFilter::filterX(), vpImageFilter::filterXRightBorder(), vpImageFilter::filterXRightBorderB(), vpImageFilter::filterXRightBorderG(), vpImageFilter::filterXRightBorderR(), vpImageFilter::filterY(), vp::findContours(), vpImageTools::flip(), vp::floodFill(), vpSimulatorAfma6::getCameraParameters(), vpSimulatorViper850::getCameraParameters(), vpAfma6::getCameraParameters(), vpViper650::getCameraParameters(), vpViper850::getCameraParameters(), vpServolens::getCameraParameters(), vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpRobotWireFrameSimulator::getExternalCameraParameters(), vpWireFrameSimulator::getExternalCameraParameters(), vpSimulatorAfma6::getExternalImage(), vpSimulatorViper850::getExternalImage(), vpWireFrameSimulator::getExternalImage(), vpVideoReader::getFrame(), vpImageFilter::getGaussPyramidal(), vpImageFilter::getGaussXPyramidal(), vpImageFilter::getGaussYPyramidal(), vpImageFilter::getGradX(), vpImageFilter::getGradY(), vpRobotBebop2::getGrayscaleImage(), vpImageSimulator::getImage(), vpWireFrameSimulator::getInternalCameraParameters(), vpWireFrameSimulator::getInternalImage(), vpRobotWireFrameSimulator::getInternalView(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpPolygon3D::getNbCornerInsideImage(), vpTemplateTrackerMI::getNormalizedCost(), vpAROgre::getRenderingOutput(), vpRobotBebop2::getRGBaImage(), vpTemplateTrackerSSD::getSSD(), vpImageTools::imageAdd(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpImageTools::imageSubtract(), vpMbDepthDenseTracker::init(), vpMbDepthNormalTracker::init(), vpMbEdgeTracker::init(), vpMbKltTracker::init(), vpAROgre::init(), vpDisplayGTK::init(), vpDisplayX::init(), vpDisplayOpenCV::init(), vpDisplayWin32::init(), vpMbTracker::initClick(), vpTemplateTrackerZone::initFromPoints(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpMbtDistanceLine::initMovingEdge(), vpMbEdgeTracker::initPyramid(), vpTemplateTracker::initTracking(), vpImage< Type >::insert(), vpKeyPoint::insertImageMatching(), vpImageTools::integralImage(), vpMeEllipse::leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), vpImageConvert::merge(), vpWireFrameSimulator::navigation(), vpImageTools::normalize(), vpImageTools::normalizedCorrelation(), vpDiskGrabber::open(), vpVideoWriter::open(), vpImage< Type >::operator==(), vpImage< Type >::performLut(), vpMeEllipse::plugHoles(), vpMbKltTracker::postTracking(), vpMbEdgeKltTracker::postTracking(), vpColorDepthConversion::projectColorToDepth(), vp::reconstruct(), vpMbKltTracker::reinit(), vpImageTools::remap(), vpImageTools::resize(), vpImageTools::resizeBilinear(), vp::retinex(), vpPolygon3D::roiInsideImage(), vpMeEllipse::sample(), vpMeLine::sample(), vpMeNurbs::sample(), vpDot2::searchDotsInArea(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpImageFilter::sepFilter(), vpAR::setImage(), vpMbEdgeKltTracker::setPose(), vpMbKltTracker::setPose(), vpImageConvert::split(), vp::stretchContrast(), vp::stretchContrastHSV(), vpImage< Type >::sub(), vpImageTools::templateMatching(), vpMbEdgeTracker::track(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerMIInverseCompositional::trackNoPyr(), vpImageTools::undistort(), vp::unsharpMask(), vpMbtDistanceLine::updateMovingEdge(), vpMbEdgeTracker::visibleFace(), vpDisplayGDI::vpDisplayGDI(), vpDisplayGTK::vpDisplayGTK(), vpDisplayOpenCV::vpDisplayOpenCV(), vpDisplayX::vpDisplayX(), vpImage< Type >::vpImage(), vpImageTools::warpImage(), vpImageTools::warpLinear(), and vpKinect::warpRGBFrame().

◆ halfSizeImage()

template<class Type >
void vpImage< Type >::halfSizeImage ( vpImage< Type > &  res) const

Returns a new image that's half size of the current image. No filtering is used during the sub sampling.

Used for building pyramid of the image.

Warning
Operator = must be defined for Type.
Parameters
res[out] : Subsampled image that is half size of the current image.

The example below shows how to use this method:

vpImage<unsigned char> I; // original image
vpImageIo::read(I, "myImage.pgm");
vpImage<unsigned char> I2; // half size image
vpImageIo::write(I2, "myHalfSizeImage.pgm");
void halfSizeImage(vpImage< Type > &res) const
Definition: vpImage.h:1189

This other example shows how to construct a pyramid of the image:

vpImage<unsigned char> I[4]; // pyramid with 4 levels
vpImageIo::read(I[1], "myImage.pgm"); // Original image at level 1
// compute the other levels
I5[1].doubleSizeImage(I5[0]); // double size image at level 0
I5[1].halfSizeImage(I5[2]); // half size image at level 2
I5[1].quarterSizeImage(I5[3]); // quarter size image at level 3
See also
subsample()
Examples
testKeyPoint-5.cpp.

Definition at line 1189 of file vpImage.h.

References vpImage< Type >::resize().

◆ init() [1/3]

template<class Type >
void init ( Type *const  array,
unsigned int  height,
unsigned int  width,
bool  copyData = false 
)

init from an image stored as a continuous array in memory

Definition at line 690 of file vpImage.h.

References vpException::memoryAllocationError.

◆ init() [2/3]

template<class Type >
void init ( unsigned int  height,
unsigned int  width 
)

◆ init() [3/3]

template<class Type >
void init ( unsigned int  height,
unsigned int  width,
Type  value 
)

Set the size of the image.

Definition at line 631 of file vpImage.h.

References vpImage< Type >::init().

◆ insert()

template<class Type >
void vpImage< Type >::insert ( const vpImage< Type > &  src,
const vpImagePoint topLeft 
)

Insert an image into another one.

It is possible to insert the image $ src $ into the calling vpImage. You can set the point in the destination image where the top left corner of the $ src $ image will be located.

Parameters
src: Image to insert
topLeft: Upper/left coordinates in the image where the image src is inserted in the destination image.
Examples
testKeyPoint-3.cpp, testKeyPoint-4.cpp, and testKeyPoint.cpp.

Definition at line 1112 of file vpImage.h.

References vpImage< Type >::bitmap, vpImagePoint::get_i(), vpImagePoint::get_j(), vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().

Referenced by vpPose::computePlanarObjectPoseFromRGBD(), and vpKeyPoint::insertImageMatching().

◆ operator!=()

template<class Type >
bool vpImage< Type >::operator!= ( const vpImage< Type > &  I)

Compare two images.

Returns
true if the images are different, false if they are the same.

Definition at line 1067 of file vpImage.h.

◆ operator()() [1/4]

template<class Type >
Type vpImage< Type >::operator() ( const vpImagePoint ip) const
inline

Get the value of an image point.

Parameters
ip: An image point with sub-pixel coordinates. Sub-pixel coordinates are roughly transformed to insigned int coordinates by cast.
Returns
Value of the image point ip.
See also
getValue(const vpImagePoint &)

Definition at line 294 of file vpImage.h.

References vpImage< Type >::bitmap, vpImagePoint::get_i(), and vpImagePoint::get_j().

◆ operator()() [2/4]

template<class Type >
void vpImage< Type >::operator() ( const vpImagePoint ip,
const Type &  v 
)
inline

Set the value of an image point.

Parameters
ip: An image point with sub-pixel coordinates. Sub-pixel coordinates are roughly transformed to insigned int coordinates by cast.
v: Value to set for the image point.

Definition at line 310 of file vpImage.h.

References vpImage< Type >::bitmap, vpImagePoint::get_i(), and vpImagePoint::get_j().

◆ operator()() [3/4]

template<class Type >
Type vpImage< Type >::operator() ( unsigned int  i,
unsigned int  j 
) const
inline

Get the value of an image point with coordinates (i, j), with i the row position and j the column position.

Returns
Value of the image point (i, j).

Definition at line 276 of file vpImage.h.

References vpImage< Type >::bitmap.

◆ operator()() [4/4]

template<class Type >
void vpImage< Type >::operator() ( unsigned int  i,
unsigned int  j,
const Type &  v 
)
inline

Set the value v of an image point with coordinates (i, j), with i the row position and j the column position.

Definition at line 282 of file vpImage.h.

References vpImage< Type >::bitmap.

◆ operator-()

template<class Type >
vpImage< Type > vpImage< Type >::operator- ( const vpImage< Type > &  B)

Operation A - B (A is unchanged).

#include <visp3/core/vpImage.h>
int main()
{
A = 128;
B = 120;
// operator-() : C = A - B
C = A - B;
return 0;
}
See also
sub(const vpImage<Type> &, const vpImage<Type> &, vpImage<Type> &) to avoid matrix allocation for each use.

Definition at line 1094 of file vpImage.h.

◆ operator=() [1/2]

template<class Type >
vpImage< Type > & vpImage< Type >::operator= ( const Type &  v)

= operator : Set all the element of the bitmap to a given value v. $ A = v <=> A[i][j] = v $

Warning
= must be defined for $ <$ Type $ > $

Definition at line 1031 of file vpImage.h.

◆ operator=() [2/2]

template<class Type >
vpImage< Type > & vpImage< Type >::operator= ( vpImage< Type >  other)

Copy operator.

Definition at line 1012 of file vpImage.h.

References vpImage< Type >::display.

◆ operator==()

template<class Type >
bool vpImage< Type >::operator== ( const vpImage< Type > &  I)

Compare two images.

Returns
true if the images are the same, false otherwise.

Definition at line 1044 of file vpImage.h.

References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().

◆ operator[]() [1/4]

template<class Type >
Type* vpImage< Type >::operator[] ( int  i)
inline

Definition at line 264 of file vpImage.h.

◆ operator[]() [2/4]

template<class Type >
const Type* vpImage< Type >::operator[] ( int  i) const
inline

Definition at line 268 of file vpImage.h.

◆ operator[]() [3/4]

template<class Type >
Type* vpImage< Type >::operator[] ( unsigned int  i)
inline

operator[] allows operation like I[i] = x.

Definition at line 263 of file vpImage.h.

◆ operator[]() [4/4]

template<class Type >
const Type* vpImage< Type >::operator[] ( unsigned int  i) const
inline

operator[] allows operation like x = I[i]

Definition at line 267 of file vpImage.h.

◆ performLut()

template<class Type >
void vpImage< Type >::performLut ( const Type(&)  lut[256],
unsigned int  nbThreads = 1 
)
Warning
This generic method is not implemented. You should rather use the instantiated methods for unsigned char and vpRGBa images.
See also
vpImage<unsigned char>::performLut(const unsigned char (&lut)[256], unsigned int nbThreads)
vpImage<vpRGBa>::performLut(const vpRGBa (&lut)[256], unsigned int nbThreads)

Definition at line 1705 of file vpImage.h.

Referenced by vp::adjust(), vpImageTools::binarise(), vp::equalizeHistogram(), vp::gammaCorrection(), and vp::stretchContrast().

◆ quarterSizeImage()

template<class Type >
void vpImage< Type >::quarterSizeImage ( vpImage< Type > &  res) const

Returns a new image that's a quarter size of the current image. No filtering is used during the sub sampling. Used for building a quarter of the image.

Warning
Operator = must be defined for Type.
Parameters
res[out] : Subsampled image that is quarter size of the current image.

The example below shows how to use this method:

vpImage<unsigned char> I; // original image
vpImageIo::read(I, "myImage.pgm");
vpImage<unsigned char> I4; // quarter size image
vpImageIo::write(I4, "myQuarterSizeImage.pgm");

See halfSizeImage(vpImage<Type> &) for an example of pyramid construction.

See also
subsample()
Examples
testKeyPoint-6.cpp.

Definition at line 1253 of file vpImage.h.

References vpImage< Type >::resize().

◆ resize() [1/2]

template<class Type >
void vpImage< Type >::resize ( unsigned int  h,
unsigned int  w 
)

resize the image : Image initialization

Allocate memory for an [height x width] image.

Warning
The image is not initialized.
Parameters
w: Image width.
h: Image height.

Element of the bitmap are not initialized

If the image has been already initialized, memory allocation is done only if the new image size is different, else we re-use the same memory space.

Exceptions
vpException::memoryAllocationError
See also
init(unsigned int, unsigned int)
Examples
mbtGenericTrackingDepth.cpp, mbtGenericTrackingDepthOnly.cpp, testGenericTracker.cpp, testGenericTrackerDepth.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testKeyPoint.cpp, tutorial-mb-generic-tracker-rgbd-blender.cpp, and tutorial-mb-generic-tracker-rgbd.cpp.

Definition at line 799 of file vpImage.h.

References vpImage< Type >::init().

Referenced by vpPylonGrabberGigE::acquire(), vpPylonGrabberUsb::acquire(), vpFlyCaptureGrabber::acquire(), vpV4l2Grabber::acquire(), vpRealSense2::acquire(), vp1394TwoGrabber::acquire(), vp::clahe(), vp::connectedComponents(), vpImageConvert::convert(), vp1394TwoGrabber::dequeue(), vpImage< Type >::doubleSizeImage(), vpImageTools::extract(), vpImageFilter::filter(), vpImageFilter::filterX(), vpImageFilter::filterY(), vpImageTools::flip(), vpRealSense2::getColorFrame(), vpImageFilter::getGaussXPyramidal(), vpImageFilter::getGaussYPyramidal(), vpImageFilter::getGradX(), vpImageFilter::getGradY(), vpRobotBebop2::getGrayscaleImage(), vpRealSense2::getGreyFrame(), vpSimulator::getInternalImage(), vpAROgre::getRenderingOutput(), vpRobotBebop2::getRGBaImage(), vpImage< Type >::halfSizeImage(), vpImageTools::imageAdd(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpImageTools::imageSubtract(), vpProjectionDisplay::init(), vpImageTools::integralImage(), vpImageConvert::merge(), vp1394CMUGrabber::open(), vpV4l2Grabber::open(), vpImage< Type >::quarterSizeImage(), vpImageTools::remap(), vpImageTools::resize(), vpImageFilter::sepFilter(), vpMbDepthDenseTracker::setPose(), vpImageConvert::split(), vpImage< Type >::sub(), vpImage< Type >::subsample(), vpImageTools::templateMatching(), vpImageTools::undistort(), vpImage< Type >::vpImage(), vpKinect::vpKinect(), vpRobotWireFrameSimulator::vpRobotWireFrameSimulator(), vpImageTools::warpImage(), and vpKinect::warpRGBFrame().

◆ resize() [2/2]

template<class Type >
void vpImage< Type >::resize ( unsigned int  h,
unsigned int  w,
const Type &  val 
)

resize the image : Image initialization

Allocate memory for an [height x width] image and initialize the image.

Parameters
w: Image width.
h: Image height.
val: Pixels value.

Element of the bitmap are not initialized

If the image has been already initialized, memory allocation is done only if the new image size is different, else we re-use the same memory space.

Exceptions
vpException::memoryAllocationError
See also
init(unsigned int, unsigned int)

Definition at line 820 of file vpImage.h.

References vpImage< Type >::init().

◆ sub() [1/2]

template<class Type >
void vpImage< Type >::sub ( const vpImage< Type > &  A,
const vpImage< Type > &  B,
vpImage< Type > &  C 
)

Operation C = A - B.

The result is placed in the third parameter C and not returned. A new image won't be allocated for every use of the function (Speed gain if used many times with the same result matrix size).

Exceptions
vpException::memoryAllocationErrorIf the images size differ.
See also
operator-()

Definition at line 1677 of file vpImage.h.

References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpException::memoryAllocationError, and vpImage< Type >::resize().

◆ sub() [2/2]

template<class Type >
void vpImage< Type >::sub ( const vpImage< Type > &  B,
vpImage< Type > &  C 
)

Operation C = *this - B.

#include <visp3/core/vpImage.h>
int main()
{
A = 128;
B = 120;
A.sub(B, C); // C = A - B
return 0;
}
void sub(const vpImage< Type > &B, vpImage< Type > &C)
Definition: vpImage.h:1646

The result is placed in the third parameter C and not returned. A new image won't be allocated for every use of the function (Speed gain if used many times with the same result matrix size).

Exceptions
vpException::memoryAllocationErrorIf the images size differ.
See also
operator-()

Definition at line 1646 of file vpImage.h.

References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpException::memoryAllocationError, and vpImage< Type >::resize().

◆ subsample()

template<class Type >
void vpImage< Type >::subsample ( unsigned int  v_scale,
unsigned int  h_scale,
vpImage< Type > &  sampled 
) const

Computes a subsampled image. No filtering is used during the sub sampling.

Parameters
v_scale[in] : Vertical subsampling factor.
h_scale[in] : Horizontal subsampling factor.
sampled[out] : Subsampled image.

The example below shows how to use this method:

vpImage<unsigned char> I; // original image
vpImageIo::read(I, "myImage.pgm");
vpImage<unsigned char> I2; // half size image
I.subsample(2, 2, I2);
vpImageIo::write(I2, "myHalfSizeImage.pgm");
void subsample(unsigned int v_scale, unsigned int h_scale, vpImage< Type > &sampled) const
Definition: vpImage.h:1217

Definition at line 1217 of file vpImage.h.

References vpImage< Type >::resize().

Friends And Related Function Documentation

◆ getValue() [1/2]

vpRGBa getValue ( const vpImagePoint ip) const
related

◆ getValue() [2/2]

vpRGBa getValue ( double  i,
double  j 
) const
related

◆ init() [1/3]

template<class Type >
void init ( Type *const  array,
unsigned int  h,
unsigned int  w,
bool  copyData 
)
related

Definition at line 690 of file vpImage.h.

◆ init() [2/3]

template<class Type >
void init ( unsigned int  h,
unsigned int  w 
)
related

Definition at line 643 of file vpImage.h.

◆ init() [3/3]

◆ operator<< [1/5]

template<class Type >
std::ostream& operator<< ( std::ostream &  s,
const vpImage< char > &  I 
)
friend

Definition at line 408 of file vpImage.h.

◆ operator<< [2/5]

template<class Type >
std::ostream& operator<< ( std::ostream &  s,
const vpImage< double > &  I 
)
friend

Definition at line 461 of file vpImage.h.

◆ operator<< [3/5]

template<class Type >
std::ostream& operator<< ( std::ostream &  s,
const vpImage< float > &  I 
)
friend

Definition at line 434 of file vpImage.h.

◆ operator<< [4/5]

template<class Type >
std::ostream& operator<< ( std::ostream &  s,
const vpImage< Type > &  I 
)
friend

Definition at line 359 of file vpImage.h.

◆ operator<< [5/5]

template<class Type >
std::ostream& operator<< ( std::ostream &  s,
const vpImage< unsigned char > &  I 
)
friend

Definition at line 382 of file vpImage.h.

◆ performLut() [1/2]

void performLut ( const unsigned char(&)  lut[256],
unsigned int  nbThreads 
)
related

Modify the intensities of a grayscale image using the look-up table passed in parameter.

Parameters
lut: Look-up table (unsigned char array of size=256) which maps each intensity to his new value.
nbThreads: Number of threads to use for the computation.

Definition at line 1720 of file vpImage.h.

References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getSize(), and vpImage< Type >::getWidth().

◆ performLut() [2/2]

void performLut ( const vpRGBa(&)  lut[256],
unsigned int  nbThreads 
)
related

Modify the intensities of a color image using the look-up table passed in parameter.

Parameters
lut: Look-up table (vpRGBa array of size=256) which maps each intensity to his new value.
nbThreads: Number of threads to use for the computation.

Definition at line 1799 of file vpImage.h.

References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getSize(), and vpImage< Type >::getWidth().

◆ swap

template<class Type >
void swap ( vpImage< Type > &  first,
vpImage< Type > &  second 
)
friend

Definition at line 1875 of file vpImage.h.

◆ vpImage() [1/6]

template<class Type >
vpImage ( )
related

Definition at line 775 of file vpImage.h.

◆ vpImage() [2/6]

template<class Type >
vpImage ( const vpImage< Type > &  I)
related

Definition at line 861 of file vpImage.h.

◆ vpImage() [3/6]

template<class Type >
vpImage ( Type *const  array,
unsigned int  h,
unsigned int  w,
bool  copyData 
)
related

Definition at line 765 of file vpImage.h.

◆ vpImage() [4/6]

template<class Type >
vpImage ( unsigned int  h,
unsigned int  w 
)
related

Definition at line 745 of file vpImage.h.

◆ vpImage() [5/6]

template<class Type >
vpImage ( unsigned int  h,
unsigned int  w,
Type  value 
)
related

Definition at line 755 of file vpImage.h.

◆ vpImage() [6/6]

template<class Type >
vpImage ( vpImage< Type > &&  I)
related

Definition at line 873 of file vpImage.h.

◆ vpImageConvert

template<class Type >
friend class vpImageConvert
friend

Definition at line 140 of file vpImage.h.

Member Data Documentation

◆ bitmap

template<class Type >
Type* vpImage< Type >::bitmap

points toward the bitmap

Examples
testColorConversion.cpp, testRealSense2_D435.cpp, testRealSense_R200.cpp, testRealSense_SR300.cpp, tutorial-apriltag-detector-live-rgbd-realsense.cpp, tutorial-grabber-rgbd-D435-structurecore.cpp, and tutorial-mb-generic-tracker-rgbd-realsense.cpp.

Definition at line 143 of file vpImage.h.

Referenced by vpOccipitalStructure::acquire(), vp1394CMUGrabber::acquire(), vpPylonGrabberGigE::acquire(), vpPylonGrabberUsb::acquire(), vpFlyCaptureGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vpImageTools::binarise(), vpHistogram::calculate(), vp::clahe(), vpImageConvert::convert(), vp1394TwoGrabber::dequeue(), vpDetectorDataMatrixCode::detect(), vpDetectorQRCode::detect(), vpImageMorphology::dilatation(), vp::equalizeHistogram(), vpImageMorphology::erosion(), vp::findContours(), vpImageTools::flip(), vpRealSense2::getColorFrame(), vpRobotBebop2::getGrayscaleImage(), vpRealSense2::getGreyFrame(), vpImageSimulator::getImage(), vpSimulator::getInternalImage(), vpAROgre::getRenderingOutput(), vpRobotBebop2::getRGBaImage(), vpImageTools::imageAdd(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpImageTools::imageSubtract(), vpMbEdgeTracker::initPyramid(), vpImage< Type >::insert(), vpImageConvert::merge(), vpImageTools::normalizedCorrelation(), vpImage< Type >::operator()(), vpImage< Type >::operator==(), vpImage< Type >::performLut(), vpColorDepthConversion::projectColorToDepth(), vpImageTools::remap(), vpImageConvert::split(), vp::stretchContrastHSV(), vpImage< Type >::sub(), vpImageTools::templateMatching(), vpImageTools::undistort(), vp::unsharpMask(), vpAROgre::updateBackgroundTexture(), and vpImage< Type >::vpImage().

◆ display