Visual Servoing Platform
version 3.4.0
|
#include <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 |
vpDisplay * | display |
Friends | |
class | vpImageConvert |
Related Functions | |
(Note that these are not member functions.) | |
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 |
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.
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]).
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.
To provide high-performance access there is no verification to ensure that 0 i < height and 0 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:
copy constructor
Definition at line 862 of file vpImage.h.
References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
move constructor
Definition at line 874 of file vpImage.h.
References vpImage< Type >::bitmap, and vpImage< Type >::display.
vpImage | ( | unsigned int | height, |
unsigned int | width | ||
) |
constructor set the size of the image
Definition at line 746 of file vpImage.h.
References vpImage< Type >::init().
vpImage | ( | unsigned int | height, |
unsigned int | width, | ||
Type | value | ||
) |
constructor set the size of the image and init all the pixel
Definition at line 756 of file vpImage.h.
References vpImage< Type >::init().
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 766 of file vpImage.h.
References vpImage< Type >::init().
destructor
Destructor : Memory de-allocation.
Definition at line 856 of file vpImage.h.
References vpImage< Type >::destroy().
void vpImage< Type >::destroy | ( | ) |
Destructor : Memory de-allocation.
Definition at line 829 of file vpImage.h.
References vpImage< Type >::bitmap.
Referenced by vpImageFilter::filter(), vpImageFilter::gaussianBlur(), vpTemplateTracker::initTracking(), and vpImage< Type >::~vpImage().
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:
res | [out] : Image that is double size of the current image. |
The example below shows how to use this method:
See halfSizeImage(vpImage<Type> &) for an example of pyramid construction.
Definition at line 1298 of file vpImage.h.
References vpImage< Type >::resize().
|
inline |
Get the number of columns in the image.
Definition at line 179 of file vpImage.h.
Referenced by vpImageConvert::convert(), vpMomentObject::fromImage(), and vpMbKltTracker::reinit().
|
inline |
Get the image height.
Definition at line 188 of file vpImage.h.
Referenced by vpVirtualGrabber::acquire(), 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(), vpImageConvert::createDepthHistogram(), vpKeyPoint::createImageMatching(), vpImageTools::crop(), vp1394TwoGrabber::dequeue(), vpDetectorDataMatrixCode::detect(), vpDetectorQRCode::detect(), vpImageMorphology::dilatation(), vpMbDepthDenseTracker::display(), vpMbDepthNormalTracker::display(), vpMbtFaceDepthDense::display(), vpMbtFaceDepthNormal::display(), vpMbtDistanceLine::display(), vpMbtDistanceCylinder::display(), vpMeNurbs::display(), vpMbEdgeKltTracker::display(), vpMeLine::display(), vpHistogram::display(), vpMbKltTracker::display(), vpMbEdgeTracker::display(), vpWireFrameSimulator::display_scene(), vpMbtFaceDepthNormal::displayFeature(), vpFeatureDisplay::displayLine(), vpDisplay::displayLine(), vpKeyPoint::displayMatching(), vp::equalizeHistogram(), vpImageMorphology::erosion(), vp::fillHoles(), vpTemplateTrackerZone::fillTriangle(), vpImageFilter::filter(), vpImageFilter::filterX(), vpImageFilter::filterY(), vpImageFilter::filterYBottomBorder(), vpImageFilter::filterYBottomBorderB(), vpImageFilter::filterYBottomBorderG(), vpImageFilter::filterYBottomBorderR(), vp::findContours(), vpImageTools::flip(), vp::floodFill(), vpServolens::getCameraParameters(), vpViper650::getCameraParameters(), vpViper850::getCameraParameters(), vpAfma6::getCameraParameters(), vpSimulatorAfma6::getCameraParameters(), vpSimulatorViper850::getCameraParameters(), vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpKinect::getDepthMap(), vpRobotWireFrameSimulator::getExternalCameraParameters(), vpWireFrameSimulator::getExternalCameraParameters(), vpSimulatorAfma6::getExternalImage(), vpSimulatorViper850::getExternalImage(), vpWireFrameSimulator::getExternalImage(), vpVideoReader::getFrame(), vpDot2::getFreemanChain(), vpImageFilter::getGaussPyramidal(), vpImageFilter::getGaussXPyramidal(), vpImageFilter::getGaussYPyramidal(), vpImageFilter::getGradX(), vpImageFilter::getGradY(), vpRobotBebop2::getGrayscaleImage(), vpDisplayX::getImage(), 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(), vpDisplayWin32::init(), vpAROgre::init(), vpDisplayGTK::init(), vpDisplayX::init(), vpImageSimulator::init(), vpDisplayOpenCV::init(), vpMbKltTracker::init(), vpMbEdgeTracker::init(), vpTemplateTrackerZone::initFromPoints(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIESM::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(), vpDot::operator==(), vpImage< Type >::operator==(), vpImage< Type >::performLut(), vpMeEllipse::plugHoles(), vpMbEdgeKltTracker::postTracking(), vpMbKltTracker::postTracking(), vpImageIo::readJPEG(), vpImageIo::readPFM(), vpImageIo::readPGM(), vpImageIo::readPNG(), vpImageIo::readPPM(), vp::reconstruct(), vpMbKltTracker::reinit(), vpImageTools::remap(), vpImageTools::resize(), vpImageTools::resizeBicubic(), vpImageTools::resizeBilinear(), vp::retinex(), vpPolygon3D::roiInsideImage(), vpMeLine::sample(), vpMeNurbs::sample(), vpMeEllipse::sample(), vpDot2::searchDotsInArea(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpImageFilter::sepFilter(), vpAR::setImage(), vpDot2::setMaxSizeSearchDistancePrecision(), vpMbEdgeKltTracker::setPose(), vpMbKltTracker::setPose(), vpImageConvert::split(), vp::stretchContrast(), vp::stretchContrastHSV(), vpImage< Type >::sub(), vpImageTools::templateMatching(), vpMbGenericTracker::track(), vpMbEdgeTracker::track(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), vpTemplateTrackerMIESM::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(), vpKinect::warpRGBFrame(), vpImageIo::writeJPEG(), vpImageIo::writePFM(), vpImageIo::writePGM(), vpImageIo::writePNG(), and vpImageIo::writePPM().
Type vpImage< Type >::getMaxValue | ( | ) | const |
Return the maximum value within the bitmap.
Definition at line 892 of file vpImage.h.
References vpImage< Type >::bitmap, and vpException::fatalError.
Referenced by vpImage< bool >::getHeight().
Type vpImage< Type >::getMeanValue | ( | ) | const |
Return the mean value of the bitmap.
Definition at line 907 of file vpImage.h.
References vpImage< Type >::getSum().
Referenced by vpImage< bool >::getHeight(), and vpImageTools::normalizedCorrelation().
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:
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. |
Definition at line 974 of file vpImage.h.
References vpImage< Type >::bitmap, vpException::fatalError, and vpImagePoint::set_ij().
Referenced by vpImage< bool >::getHeight().
void vpImage< Type >::getMinMaxValue | ( | Type & | min, |
Type & | max | ||
) | const |
Look for the minimum and the maximum value within the bitmap.
Definition at line 938 of file vpImage.h.
References vpImage< Type >::bitmap, and vpException::fatalError.
Referenced by vpImageConvert::convert(), vpImage< bool >::getHeight(), and vp::stretchContrast().
Type vpImage< Type >::getMinValue | ( | ) | const |
Return the minimum value within the bitmap.
Definition at line 920 of file vpImage.h.
References vpImage< Type >::bitmap, and vpException::fatalError.
Referenced by vpImage< bool >::getHeight().
|
inline |
Get the image number of pixels which corresponds to the image width multiplied by the image height.
|
inline |
Get the number of rows in the image.
Definition at line 218 of file vpImage.h.
Referenced by vpImageConvert::convert(), vpMomentObject::fromImage(), and vpMbKltTracker::reinit().
|
inline |
Get the image size.
Definition at line 227 of file vpImage.h.
Referenced by vpFlyCaptureGrabber::acquire(), vp1394CMUGrabber::acquire(), vp::autoThreshold(), vpHistogram::calculate(), vp::connectedComponents(), vpImageConvert::convert(), vpImageConvert::createDepthHistogram(), vpImageMorphology::dilatation(), vp::drawContours(), vpImageMorphology::erosion(), vp::fillHoles(), vp::findContours(), vp::floodFill(), vpImageTools::imageDifference(), vpImageTools::integralImage(), vpImageTools::normalizedCorrelation(), vpImage< Type >::performLut(), vpImageIo::readPPM(), vp::reconstruct(), vpImageConvert::split(), vpImageTools::templateMatching(), vp::unsharpMask(), and vpImageTools::warpImage().
|
inline |
Compute the sum of image intensities.
Definition at line 1579 of file vpImage.h.
References vpImage< Type >::bitmap.
Referenced by vpImage< Type >::getMeanValue(), vpImage< bool >::getSize(), and vpImageTools::normalize().
|
inline |
Retrieves pixel value from an image containing values of type Type
.
Gets the value of a sub-pixel with coordinates (i,j).
i | : Pixel coordinate along the rows. |
j | : Pixel coordinate along the columns. |
vpImageException::notInTheImage | : If (i,j) is out of the image. |
Definition at line 1346 of file vpImage.h.
References vpImageException::notInTheImage.
Referenced by vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpTemplateTrackerMI::getNormalizedCost(), vpImage< bool >::getSize(), vpTemplateTrackerSSD::getSSD(), vpImage< Type >::getValue(), vpImageSimulator::init(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpMeTracker::inMask(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), and vpTemplateTrackerMIInverseCompositional::trackNoPyr().
|
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.
i | : Sub-pixel coordinate along the rows. |
j | : Sub-pixel coordinate along the columns. |
vpImageException::notInTheImage | : If (i,j) is out of the image. |
Definition at line 1371 of file vpImage.h.
References vpImage< Type >::bitmap, vpImage< Type >::getValue(), vpImageException::notInitializedError, vpImageException::notInTheImage, vpEndian::reinterpret_cast_uchar_to_uint16_LE(), vpMath::round(), and vpERROR_TRACE.
|
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.
ip | : Sub-pixel coordinates of a point in the image. |
vpImageException::notInTheImage | : If the image point ip is out of the image. |
Definition at line 1547 of file vpImage.h.
References vpImagePoint::get_i(), vpImagePoint::get_j(), and vpImage< Type >::getValue().
|
inline |
Get the image width.
Definition at line 246 of file vpImage.h.
Referenced by vpVirtualGrabber::acquire(), 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(), vpImageConvert::createDepthHistogram(), vpKeyPoint::createImageMatching(), vpImageTools::crop(), vp1394TwoGrabber::dequeue(), vpDetectorDataMatrixCode::detect(), vpDetectorQRCode::detect(), vpImageMorphology::dilatation(), vpMbDepthDenseTracker::display(), vpMbDepthNormalTracker::display(), vpMbtFaceDepthDense::display(), vpMbtFaceDepthNormal::display(), vpMbtDistanceLine::display(), vpMbtDistanceCylinder::display(), vpMeNurbs::display(), vpMbEdgeKltTracker::display(), vpMeLine::display(), vpHistogram::display(), vpMbKltTracker::display(), vpMbEdgeTracker::display(), vpWireFrameSimulator::display_scene(), vpMbtFaceDepthNormal::displayFeature(), vpDisplayX::displayImageROI(), vpFeatureDisplay::displayLine(), vpDisplay::displayLine(), vpKeyPoint::displayMatching(), vp::equalizeHistogram(), vpImageMorphology::erosion(), vp::fillHoles(), vpTemplateTrackerZone::fillTriangle(), vpImageFilter::filter(), vpImageFilter::filterX(), vpImageFilter::filterXRightBorder(), vpImageFilter::filterXRightBorderB(), vpImageFilter::filterXRightBorderG(), vpImageFilter::filterXRightBorderR(), vpImageFilter::filterY(), vp::findContours(), vpImageTools::flip(), vp::floodFill(), vpServolens::getCameraParameters(), vpViper650::getCameraParameters(), vpViper850::getCameraParameters(), vpAfma6::getCameraParameters(), vpSimulatorAfma6::getCameraParameters(), vpSimulatorViper850::getCameraParameters(), vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpRobotWireFrameSimulator::getExternalCameraParameters(), vpWireFrameSimulator::getExternalCameraParameters(), vpSimulatorAfma6::getExternalImage(), vpSimulatorViper850::getExternalImage(), vpWireFrameSimulator::getExternalImage(), vpVideoReader::getFrame(), vpDot2::getFreemanChain(), 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(), vpDisplayWin32::init(), vpAROgre::init(), vpDisplayGTK::init(), vpDisplayX::init(), vpImageSimulator::init(), vpDisplayOpenCV::init(), vpMbKltTracker::init(), vpMbEdgeTracker::init(), vpMbTracker::initClick(), vpTemplateTrackerZone::initFromPoints(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIESM::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(), vpDot::operator==(), vpImage< Type >::operator==(), vpImage< Type >::performLut(), vpMeEllipse::plugHoles(), vpMbEdgeKltTracker::postTracking(), vpMbKltTracker::postTracking(), vpImageIo::readJPEG(), vpImageIo::readPFM(), vpImageIo::readPGM(), vpImageIo::readPNG(), vpImageIo::readPPM(), vp::reconstruct(), vpMbKltTracker::reinit(), vpImageTools::remap(), vpImageTools::resize(), vpImageTools::resizeBicubic(), vpImageTools::resizeBilinear(), vp::retinex(), vpPolygon3D::roiInsideImage(), vpMeLine::sample(), vpMeNurbs::sample(), vpMeEllipse::sample(), vpDot2::searchDotsInArea(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpImageFilter::sepFilter(), vpAR::setImage(), vpDot2::setMaxSizeSearchDistancePrecision(), vpMbEdgeKltTracker::setPose(), vpMbKltTracker::setPose(), vpImageConvert::split(), vp::stretchContrast(), vp::stretchContrastHSV(), vpImage< Type >::sub(), vpImageTools::templateMatching(), vpMbGenericTracker::track(), vpMbEdgeTracker::track(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), vpTemplateTrackerMIESM::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(), vpKinect::warpRGBFrame(), vpImageIo::writeJPEG(), vpImageIo::writePFM(), vpImageIo::writePGM(), vpImageIo::writePNG(), and vpImageIo::writePPM().
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.
res | [out] : Subsampled image that is half size of the current image. |
The example below shows how to use this method:
This other example shows how to construct a pyramid of the image:
Definition at line 1192 of file vpImage.h.
References vpImage< Type >::resize().
Referenced by vpImage< bool >::getWidth().
void init | ( | unsigned int | height, |
unsigned int | width | ||
) |
Set the size of the image.
Definition at line 643 of file vpImage.h.
References vpImage< Type >::bitmap, vpException::memoryAllocationError, and vpDEBUG_TRACE.
Referenced by vpImage< bool >::getWidth(), vpPlot::init(), vpImage< Type >::init(), vpImageIo::readJPEG(), vpImageIo::readPNG(), vpImage< Type >::resize(), and vpImage< Type >::vpImage().
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 >::bitmap, and vpImage< Type >::init().
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 691 of file vpImage.h.
References vpImage< Type >::bitmap, and vpException::memoryAllocationError.
void vpImage< Type >::insert | ( | const vpImage< Type > & | src, |
const vpImagePoint & | topLeft | ||
) |
Insert an image into another one.
It is possible to insert the image into the calling vpImage. You can set the point in the destination image where the top left corner of the image will be located.
src | : Image to insert |
topLeft | : Upper/left coordinates in the image where the image src is inserted in the destination image. |
Definition at line 1115 of file vpImage.h.
References vpImage< Type >::bitmap, vpImagePoint::get_i(), vpImagePoint::get_j(), vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().
Referenced by vpImage< bool >::getWidth(), and vpKeyPoint::insertImageMatching().
Compare two images.
Definition at line 1067 of file vpImage.h.
Referenced by vpImage< bool >::operator()().
|
inline |
|
inline |
|
inline |
|
inline |
Operation A - B (A is unchanged).
Definition at line 1097 of file vpImage.h.
References vpImage< Type >::sub().
Referenced by vpImage< bool >::operator()().
Copy operator.
Definition at line 1012 of file vpImage.h.
References vpImage< Type >::display, and vpImage< Type >::swap.
Referenced by vpImage< bool >::operator()().
= operator : Set all the element of the bitmap to a given value v.
Definition at line 1031 of file vpImage.h.
References vpImage< Type >::bitmap.
Compare two images.
Definition at line 1044 of file vpImage.h.
References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().
Referenced by vpImage< bool >::operator()().
|
inline |
|
inline |
|
inline |
|
inline |
void vpImage< Type >::performLut | ( | const Type(&) | lut[256], |
unsigned int | nbThreads = 1 |
||
) |
Definition at line 1679 of file vpImage.h.
Referenced by vp::adjust(), vpImageTools::binarise(), vp::equalizeHistogram(), vp::gammaCorrection(), vpImage< bool >::operator()(), and vp::stretchContrast().
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.
res | [out] : Subsampled image that is quarter size of the current image. |
The example below shows how to use this method:
See halfSizeImage(vpImage<Type> &) for an example of pyramid construction.
Definition at line 1256 of file vpImage.h.
References vpImage< Type >::resize().
Referenced by vpImage< bool >::operator()().
void vpImage< Type >::resize | ( | unsigned int | h, |
unsigned int | w | ||
) |
resize the image : Image initialization
Allocate memory for an [height x width] image.
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.
vpException::memoryAllocationError |
Definition at line 800 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(), vpImageConvert::createDepthHistogram(), vpImageTools::crop(), 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(), vpDisplayX::getImage(), vpSimulator::getInternalImage(), vpAROgre::getRenderingOutput(), vpRobotBebop2::getRGBaImage(), vpImage< Type >::halfSizeImage(), vpImageTools::imageAdd(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpImageTools::imageSubtract(), vpProjectionDisplay::init(), vpImageTools::integralImage(), vpImageConvert::merge(), vpV4l2Grabber::open(), vp1394CMUGrabber::open(), vpImage< bool >::operator()(), vpImage< Type >::quarterSizeImage(), vpImageIo::readJPEG(), vpImageIo::readPFM(), vpImageIo::readPGM(), vpImageIo::readPNG(), vpImageIo::readPPM(), 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(), vpKinect::warpRGBFrame(), and vpImageIo::writePGM().
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.
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.
vpException::memoryAllocationError |
Definition at line 821 of file vpImage.h.
References vpImage< Type >::init().
Operation C = *this - 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).
vpException::memoryAllocationError | If the images size differ. |
Definition at line 1620 of file vpImage.h.
References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpException::memoryAllocationError, and vpImage< Type >::resize().
Referenced by vpImage< bool >::operator()(), and vpImage< Type >::operator-().
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).
vpException::memoryAllocationError | If the images size differ. |
Definition at line 1651 of file vpImage.h.
References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpException::memoryAllocationError, and vpImage< Type >::resize().
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.
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:
Definition at line 1220 of file vpImage.h.
References vpImage< Type >::resize().
Referenced by vpImage< bool >::operator()().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
related |
Modify the intensities of a grayscale image using the look-up table passed in parameter.
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 1694 of file vpImage.h.
References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getSize(), and vpImage< Type >::getWidth().
|
related |
Modify the intensities of a color image using the look-up table passed in parameter.
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 1773 of file vpImage.h.
References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getSize(), and vpImage< Type >::getWidth().
Definition at line 1849 of file vpImage.h.
Referenced by vpImage< Type >::operator=().
|
friend |
Type* vpImage< Type >::bitmap |
points toward the bitmap
Definition at line 143 of file vpImage.h.
Referenced by vpPylonGrabberGigE::acquire(), vpPylonGrabberUsb::acquire(), vpFlyCaptureGrabber::acquire(), vp1394CMUGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vpImageTools::binarise(), vpHistogram::calculate(), vp::clahe(), vpImageConvert::convert(), vpImageConvert::createDepthHistogram(), vp1394TwoGrabber::dequeue(), vpImage< Type >::destroy(), vpDetectorDataMatrixCode::detect(), vpDetectorQRCode::detect(), vpImageMorphology::dilatation(), vpDisplayX::displayImage(), vpDisplayX::displayImageROI(), vp::equalizeHistogram(), vpImageMorphology::erosion(), vp::findContours(), vpImageTools::flip(), vpRealSense2::getColorFrame(), vpRobotBebop2::getGrayscaleImage(), vpRealSense2::getGreyFrame(), vpDisplayX::getImage(), vpImageSimulator::getImage(), vpSimulator::getInternalImage(), vpImage< Type >::getMaxValue(), vpImage< Type >::getMinMaxLoc(), vpImage< Type >::getMinMaxValue(), vpImage< Type >::getMinValue(), vpAROgre::getRenderingOutput(), vpRobotBebop2::getRGBaImage(), vpImage< Type >::getSum(), vpImage< Type >::getValue(), vpImageTools::imageAdd(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpImageTools::imageSubtract(), vpImage< Type >::init(), vpMbEdgeTracker::initPyramid(), vpImage< Type >::insert(), vpImageConvert::merge(), vpImageTools::normalizedCorrelation(), vpImage< Type >::operator=(), vpImage< Type >::operator==(), vpImage< Type >::performLut(), vpImageIo::readJPEG(), vpImageIo::readPFM(), vpImageIo::readPGM(), vpImageIo::readPNG(), vpImageTools::remap(), vpImageConvert::split(), vp::stretchContrastHSV(), vpImage< Type >::sub(), vpKltOpencv::suppressFeature(), vpImageTools::templateMatching(), vpImageTools::undistort(), vp::unsharpMask(), vpAROgre::updateBackgroundTexture(), vpImage< Type >::vpImage(), vpImageIo::writeJPEG(), vpImageIo::writePFM(), vpImageIo::writePGM(), and vpImageIo::writePNG().
Definition at line 144 of file vpImage.h.
Referenced by vpTemplateTracker::display(), vpWireFrameSimulator::getExternalImage(), vpDisplay::getImage(), vpWireFrameSimulator::getInternalImage(), vpDisplayWin32::init(), vpDisplayGTK::init(), vpDisplayX::init(), vpDisplayOpenCV::init(), vpMbTracker::initClick(), vpImage< Type >::operator=(), and vpImage< Type >::vpImage().