Visual Servoing Platform
version 3.1.0
|
#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, const unsigned int height, const unsigned int width, const bool copyData=false) | |
virtual | ~vpImage () |
Public Attributes | |
Type * | bitmap |
vpDisplay * | display |
Friends | |
class | vpImageConvert |
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 | getMinValue () const |
void | getMinMaxValue (Type &min, Type &max) const |
unsigned int | getNumberOfPixel () const |
unsigned int | getRows () const |
unsigned int | getSize () const |
Type | getValue (double i, double j) const |
Type | getValue (vpImagePoint &ip) 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, const unsigned int height, const unsigned int width, const bool copyData=false) |
void | insert (const vpImage< Type > &src, const vpImagePoint &topLeft) |
Type * | operator[] (const unsigned int i) |
Type * | operator[] (const int i) |
const Type * | operator[] (unsigned int i) const |
const Type * | operator[] (int i) const |
Type | operator() (const unsigned int i, const unsigned int j) const |
void | operator() (const unsigned int i, const 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], const unsigned int nbThreads=1) |
void | quarterSizeImage (vpImage< Type > &res) const |
void | resize (const unsigned int h, const unsigned int w) |
void | resize (const unsigned int h, const 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:
constructor set the size of the image
Constructor.
Allocate memory for an [h x w] image.
w | : Image width. |
h | : Image height. |
Element of the bitmap are set to zero.
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 |
constructor set the size of the image and init all the pixel
Constructor.
Allocate memory for an [height x width] image.
w | : Image width. |
h | : Image height. |
value | : Set all the element of the bitmap to value. |
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.
vpImage< Type >::vpImage | ( | Type *const | array, |
const unsigned int | h, | ||
const unsigned int | w, | ||
const bool | copyData = false |
||
) |
constructor from an image stored as a continuous array in memory
Constructor.
Construct a vpImage from a continuous array in memory.
array | : Image data stored as a continuous array in memory. |
h | : Image height. |
w | : Image width. |
copyData | : If false (by default) only the memory address is copied, otherwise the data are copied. |
void vpImage< Type >::destroy | ( | ) |
Destructor : Memory de-allocation.
Definition at line 885 of file vpImage.h.
Referenced by vpImageFilter::filter(), vpImageFilter::gaussianBlur(), vpTemplateTracker::initTracking(), and vpImage< unsigned char >::~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.
|
inline |
Get the number of columns in the image.
Definition at line 169 of file vpImage.h.
Referenced by vpImageConvert::convert(), vpMomentObject::fromImage(), and vpMbKltTracker::reinit().
|
inline |
Get the image height.
Definition at line 178 of file vpImage.h.
Referenced by vpVirtualGrabber::acquire(), vpDiskGrabber::acquire(), vp1394CMUGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vpImageTools::binarise(), vpPlanarObjectDetector::buildReference(), vpKeyPointSurf::buildReference(), vpFernClassifier::buildReference(), vpHistogram::calculate(), vpImageTools::changeLUT(), vp::clahe(), vpMbtDistanceLine::closeToImageBorder(), vpMeLine::computeRhoTheta(), vpMbDepthDenseTracker::computeVisibility(), vpMbDepthNormalTracker::computeVisibility(), vp::connectedComponents(), vpImageConvert::convert(), vpMeSite::convolution(), vpImageConvert::createDepthHistogram(), vpKeyPoint::createImageMatching(), vpImageTools::crop(), vp1394TwoGrabber::dequeue(), vpDetectorDataMatrixCode::detect(), vpDetectorQRCode::detect(), vpImageMorphology::dilatation(), vpMbDepthDenseTracker::display(), vpMbDepthNormalTracker::display(), vpMbtDistanceLine::display(), vpMeNurbs::display(), vpMeLine::display(), vpHistogram::display(), vpMbKltTracker::display(), vpWireFrameSimulator::display_scene(), vpMbtFaceDepthNormal::displayFeature(), vpFeatureDisplay::displayLine(), vpKeyPoint::displayMatching(), vp::equalizeHistogram(), vpImageMorphology::erosion(), vp::fillHoles(), vpTemplateTrackerZone::fillTriangle(), vpImageFilter::filter(), vpImageFilter::filterX(), vpImageFilter::filterY(), vpImageFilter::filterYBottomBorder(), 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(), vpDisplayX::getImage(), vpImageSimulator::getImage(), vpWireFrameSimulator::getInternalCameraParameters(), vpWireFrameSimulator::getInternalImage(), vpRobotWireFrameSimulator::getInternalView(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpPolygon3D::getNbCornerInsideImage(), vpTemplateTrackerMI::getNormalizedCost(), vpAROgre::getRenderingOutput(), 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(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpMbtDistanceLine::initMovingEdge(), vpMbEdgeTracker::initPyramid(), vpTemplateTracker::initTracking(), vpImage< unsigned char >::insert(), vpKeyPoint::insertImageMatching(), vpMbtPolygon::isVisible(), vpMeNurbs::localReSample(), vpPlanarObjectDetector::matchPoint(), vpKeyPointSurf::matchPoint(), vpFernClassifier::matchPoint(), vpImageConvert::merge(), vpWireFrameSimulator::navigation(), vpDiskGrabber::open(), vpVideoWriter::open(), vpDot::operator==(), vpImage< unsigned char >::operator==(), vpImage< unsigned char >::performLut(), vpMbEdgeKltTracker::postTracking(), vpMeEllipse::printParameters(), vpImageIo::readJPEG(), vpImageIo::readPFM(), vpImageIo::readPGM(), vpImageIo::readPNG(), vpImageIo::readPPM(), vp::reconstruct(), vpMbKltTracker::reinit(), vpImageTools::resize(), vpImageTools::resizeBicubic(), vpImageTools::resizeBilinear(), vp::retinex(), vpPolygon3D::roiInsideImage(), vpMeLine::sample(), vpMeNurbs::sample(), vpDot2::searchDotsInArea(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpImageFilter::sepFilter(), vpAR::setImage(), vpFernClassifier::setImage(), vpDot2::setMaxSizeSearchDistancePrecision(), vpMbEdgeKltTracker::setPose(), vpMbKltTracker::setPose(), vpImageConvert::split(), vp::stretchContrast(), vp::stretchContrastHSV(), vpImage< unsigned char >::sub(), vpMbGenericTracker::track(), vpMbEdgeTracker::track(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), vpTemplateTrackerMIInverseCompositional::trackNoPyr(), vpImageTools::undistort(), vpMbtDistanceLine::updateMovingEdge(), vpDisplayGDI::vpDisplayGDI(), vpDisplayGTK::vpDisplayGTK(), vpDisplayOpenCV::vpDisplayOpenCV(), vpDisplayX::vpDisplayX(), vpImage< unsigned char >::vpImage(), vpKinect::warpRGBFrame(), vpImageIo::writeJPEG(), vpImageIo::writePFM(), vpImageIo::writePGM(), vpImageIo::writePNG(), vpImageIo::writePPM(), and vpMeEllipse::~vpMeEllipse().
Type vpImage< Type >::getMaxValue | ( | ) | const |
Return the maximum value within the bitmap.
Definition at line 944 of file vpImage.h.
Referenced by vpImage< unsigned char >::getHeight().
void vpImage< Type >::getMinMaxValue | ( | Type & | min, |
Type & | max | ||
) | const |
Look for the minimum and the maximum value within the bitmap.
Definition at line 974 of file vpImage.h.
Referenced by vpImageConvert::convert(), vpImage< unsigned char >::getHeight(), and vp::stretchContrast().
Type vpImage< Type >::getMinValue | ( | ) | const |
Return the minimum value within the bitmap.
Definition at line 959 of file vpImage.h.
Referenced by vpImage< unsigned char >::getHeight().
|
inline |
Get the image number of pixels which corresponds to the image width multiplied by the image height.
Definition at line 197 of file vpImage.h.
Referenced by vpImageConvert::split().
|
inline |
Get the number of rows in the image.
Definition at line 207 of file vpImage.h.
Referenced by vpImageConvert::convert(), vpMomentObject::fromImage(), and vpMbKltTracker::reinit().
|
inline |
Get the image size.
Definition at line 215 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::imageAdd(), vpImageTools::imageSubtract(), vpImage< unsigned char >::performLut(), vpImageIo::readPPM(), vp::reconstruct(), and vp::unsharpMask().
Type vpImage< Type >::getValue | ( | double | i, |
double | j | ||
) | const |
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. If location is out of bounds, then return the value of the closest pixel.
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 1338 of file vpImage.h.
Referenced by vpTemplateTrackerSSD::getCost(), vpTemplateTrackerZNCC::getCost(), vpTemplateTrackerMI::getCost(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpTemplateTrackerMI::getNormalizedCost(), vpImage< unsigned char >::getSize(), vpTemplateTrackerSSD::getSSD(), vpImage< unsigned char >::getValue(), vpImageSimulator::init(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::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. If location is out of bounds, then return the value of the closest pixel.
ip | : Sub-pixel coordinates of a point in the image. |
vpImageException::notInTheImage | : If the image point ip is out of the image. |
|
inline |
Get the image width.
Definition at line 229 of file vpImage.h.
Referenced by vpVirtualGrabber::acquire(), vpDiskGrabber::acquire(), vp1394CMUGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vpImageTools::binarise(), vpPlanarObjectDetector::buildReference(), vpKeyPointSurf::buildReference(), vpFernClassifier::buildReference(), vpHistogram::calculate(), vpImageTools::changeLUT(), vp::clahe(), vpMbtDistanceLine::closeToImageBorder(), vpMeLine::computeRhoTheta(), vpMbDepthDenseTracker::computeVisibility(), vpMbDepthNormalTracker::computeVisibility(), vp::connectedComponents(), vpImageConvert::convert(), vpMeSite::convolution(), vpImageConvert::createDepthHistogram(), vpKeyPoint::createImageMatching(), vpImageTools::crop(), vp1394TwoGrabber::dequeue(), vpDetectorDataMatrixCode::detect(), vpDetectorQRCode::detect(), vpImageMorphology::dilatation(), vpMbDepthDenseTracker::display(), vpMbDepthNormalTracker::display(), vpMbtDistanceLine::display(), vpMeNurbs::display(), vpMeLine::display(), vpHistogram::display(), vpMbKltTracker::display(), vpWireFrameSimulator::display_scene(), vpMbtFaceDepthNormal::displayFeature(), vpDisplayX::displayImageROI(), vpFeatureDisplay::displayLine(), vpKeyPoint::displayMatching(), vp::equalizeHistogram(), vpImageMorphology::erosion(), vp::fillHoles(), vpTemplateTrackerZone::fillTriangle(), vpImageFilter::filter(), vpImageFilter::filterX(), vpImageFilter::filterXRightBorder(), 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(), vpImageSimulator::getImage(), vpWireFrameSimulator::getInternalCameraParameters(), vpWireFrameSimulator::getInternalImage(), vpRobotWireFrameSimulator::getInternalView(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpPolygon3D::getNbCornerInsideImage(), vpTemplateTrackerMI::getNormalizedCost(), vpAROgre::getRenderingOutput(), 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(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpMbtDistanceLine::initMovingEdge(), vpMbEdgeTracker::initPyramid(), vpTemplateTracker::initTracking(), vpImage< unsigned char >::insert(), vpKeyPoint::insertImageMatching(), vpMbtPolygon::isVisible(), vpMeNurbs::localReSample(), vpPlanarObjectDetector::matchPoint(), vpKeyPointSurf::matchPoint(), vpFernClassifier::matchPoint(), vpImageConvert::merge(), vpWireFrameSimulator::navigation(), vpDiskGrabber::open(), vpVideoWriter::open(), vpDot::operator==(), vpImage< unsigned char >::operator==(), vpImage< unsigned char >::performLut(), vpMbEdgeKltTracker::postTracking(), vpMeEllipse::printParameters(), vpImageIo::readJPEG(), vpImageIo::readPFM(), vpImageIo::readPGM(), vpImageIo::readPNG(), vpImageIo::readPPM(), vp::reconstruct(), vpMbKltTracker::reinit(), vpImageTools::resize(), vpImageTools::resizeBicubic(), vpImageTools::resizeBilinear(), vp::retinex(), vpPolygon3D::roiInsideImage(), vpMeLine::sample(), vpMeNurbs::sample(), vpDot2::searchDotsInArea(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpImageFilter::sepFilter(), vpAR::setImage(), vpFernClassifier::setImage(), vpDot2::setMaxSizeSearchDistancePrecision(), vpMbEdgeKltTracker::setPose(), vpMbKltTracker::setPose(), vpImageConvert::split(), vp::stretchContrast(), vp::stretchContrastHSV(), vpImage< unsigned char >::sub(), vpMbGenericTracker::track(), vpMbEdgeTracker::track(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), vpTemplateTrackerMIInverseCompositional::trackNoPyr(), vpImageTools::undistort(), vpMbtDistanceLine::updateMovingEdge(), vpDisplayGDI::vpDisplayGDI(), vpDisplayGTK::vpDisplayGTK(), vpDisplayOpenCV::vpDisplayOpenCV(), vpDisplayX::vpDisplayX(), vpImage< unsigned char >::vpImage(), vpKinect::warpRGBFrame(), vpImageIo::writeJPEG(), vpImageIo::writePFM(), vpImageIo::writePGM(), vpImageIo::writePNG(), vpImageIo::writePPM(), and vpMeEllipse::~vpMeEllipse().
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 1179 of file vpImage.h.
Referenced by vpImage< unsigned char >::getWidth().
void vpImage< Type >::init | ( | unsigned int | h, |
unsigned int | w | ||
) |
Set the size of the image.
Image initialization.
Allocate memory for an [h x w] 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 649 of file vpImage.h.
Referenced by vpImage< unsigned char >::getWidth(), vpPlot::init(), vpImage< unsigned char >::init(), vpImage< unsigned char >::resize(), and vpImage< unsigned char >::vpImage().
void vpImage< Type >::init | ( | unsigned int | h, |
unsigned int | w, | ||
Type | value | ||
) |
Set the size of the image.
Image initialisation.
Allocate memory for an [h x w] image.
w | : Image width. |
h | : Image height. |
value | : Set all the element of the bitmap to value. |
vpException::memoryAllocationError |
void vpImage< Type >::init | ( | Type *const | array, |
const unsigned int | h, | ||
const unsigned int | w, | ||
const bool | copyData = false |
||
) |
init from an image stored as a continuous array in memory
Image initialization.
Init from image data stored as a continuous array in memory.
array | : Image data stored as a continuous array in memory |
h | : Image height. |
w | : Image width. |
copyData | : If false (by default) only the memory address is copied, otherwise the data are copied. |
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 belocated.
src | : Image to insert |
topLeft | : Upper/left coordinates in the image where the image src is inserted in the destination image. |
Definition at line 1102 of file vpImage.h.
Referenced by vpImage< unsigned char >::getWidth(), and vpKeyPoint::insertImageMatching().
Compare two images.
Definition at line 1043 of file vpImage.h.
Referenced by vpImage< unsigned char >::operator()().
|
inline |
|
inline |
|
inline |
|
inline |
Operation A - B (A is unchanged).
Definition at line 1084 of file vpImage.h.
Referenced by vpImage< unsigned char >::operator()().
Copy operator.
Definition at line 988 of file vpImage.h.
Referenced by vpImage< unsigned char >::operator()().
Compare two images.
Definition at line 1020 of file vpImage.h.
Referenced by vpImage< unsigned char >::operator()().
|
inline |
|
inline |
|
inline |
|
inline |
void vpImage< Type >::performLut | ( | const Type(&) | lut[256], |
const unsigned int | nbThreads = 1 |
||
) |
Definition at line 1670 of file vpImage.h.
Referenced by vp::adjust(), vpImageTools::binarise(), vp::equalizeHistogram(), vp::gammaCorrection(), vpImage< unsigned char >::operator()(), vpImage< unsigned char >::performLut(), 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 1241 of file vpImage.h.
Referenced by vpImage< unsigned char >::operator()().
void vpImage< Type >::resize | ( | const unsigned int | h, |
const 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 856 of file vpImage.h.
Referenced by vpPylonGrabberGigE::acquire(), vpPylonGrabberUsb::acquire(), vpFlyCaptureGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vp::clahe(), vpMbDepthDenseTracker::computeVisibility(), vpMbDepthNormalTracker::computeVisibility(), vp::connectedComponents(), vpImageConvert::convert(), vpImageConvert::createDepthHistogram(), vpImageTools::crop(), vp1394TwoGrabber::dequeue(), vpImage< unsigned char >::doubleSizeImage(), vpImageFilter::filter(), vpImageFilter::filterX(), vpImageFilter::filterY(), vpImageTools::flip(), vpRealSense2::getColorFrame(), vpImageFilter::getGaussXPyramidal(), vpImageFilter::getGaussYPyramidal(), vpImageFilter::getGradX(), vpImageFilter::getGradY(), vpRealSense2::getGreyFrame(), vpDisplayGTK::getImage(), vpDisplayX::getImage(), vpSimulator::getInternalImage(), vpAROgre::getRenderingOutput(), vpImage< unsigned char >::halfSizeImage(), vpImageTools::imageAdd(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpImageTools::imageSubtract(), vpProjectionDisplay::init(), vpImageConvert::merge(), vpV4l2Grabber::open(), vp1394CMUGrabber::open(), vpImage< unsigned char >::operator()(), vpImage< unsigned char >::quarterSizeImage(), vpImageIo::readJPEG(), vpImageIo::readPFM(), vpImageIo::readPGM(), vpImageIo::readPNG(), vpImageIo::readPPM(), vpImageTools::resize(), vpImageFilter::sepFilter(), vpImageConvert::split(), vpImage< unsigned char >::sub(), vpImage< unsigned char >::subsample(), vpImageTools::undistort(), vpImage< unsigned char >::vpImage(), vpKinect::vpKinect(), vpRobotWireFrameSimulator::vpRobotWireFrameSimulator(), vpKinect::warpRGBFrame(), and vpImageIo::writePGM().
void vpImage< Type >::resize | ( | const unsigned int | h, |
const 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 |
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 1609 of file vpImage.h.
Referenced by vpImage< unsigned char >::operator()(), and vpImage< unsigned char >::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. |
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 1207 of file vpImage.h.
Referenced by vpDisplayGTK::displayImage(), and vpImage< unsigned char >::operator()().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 1837 of file vpImage.h.
Referenced by vpImage< unsigned char >::operator=().
|
friend |
Type* vpImage< Type >::bitmap |
points toward the bitmap
Definition at line 133 of file vpImage.h.
Referenced by vpPylonGrabberGigE::acquire(), vpPylonGrabberUsb::acquire(), vpFlyCaptureGrabber::acquire(), vp1394CMUGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vpImageTools::binarise(), vpKeyPointSurf::buildReference(), vpHistogram::calculate(), vp::clahe(), vpImageConvert::convert(), vpImageConvert::createDepthHistogram(), vp1394TwoGrabber::dequeue(), vpImage< unsigned char >::destroy(), vpDetectorDataMatrixCode::detect(), vpDetectorQRCode::detect(), vpImageMorphology::dilatation(), vpDisplayGTK::displayImage(), vpDisplayX::displayImage(), vpDisplayX::displayImageROI(), vp::equalizeHistogram(), vpImageMorphology::erosion(), vp::findContours(), vpImageTools::flip(), vpRealSense2::getColorFrame(), vpRealSense2::getGreyFrame(), vpDisplayX::getImage(), vpImageSimulator::getImage(), vpSimulator::getInternalImage(), vpImage< unsigned char >::getMaxValue(), vpImage< unsigned char >::getMinMaxValue(), vpImage< unsigned char >::getMinValue(), vpAROgre::getRenderingOutput(), vpImageTools::imageAdd(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpImageTools::imageSubtract(), vpImage< unsigned char >::init(), vpMbEdgeTracker::initPyramid(), vpImage< unsigned char >::insert(), vpKeyPointSurf::matchPoint(), vpImageConvert::merge(), vpImage< unsigned char >::operator=(), vpImage< unsigned char >::operator==(), vpImage< unsigned char >::performLut(), vpImageIo::readJPEG(), vpImageIo::readPFM(), vpImageIo::readPGM(), vpImageIo::readPNG(), vpFernClassifier::setImage(), vpImageConvert::split(), vp::stretchContrastHSV(), vpImage< unsigned char >::sub(), vpKltOpencv::suppressFeature(), vpImageTools::undistort(), vp::unsharpMask(), vpAROgre::updateBackgroundTexture(), vpImage< unsigned char >::vpImage(), vpImageIo::writeJPEG(), vpImageIo::writePFM(), vpImageIo::writePGM(), and vpImageIo::writePNG().
Definition at line 134 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< unsigned char >::operator=(), and vpImage< unsigned char >::vpImage().