ViSP  2.7.0
vpImageIo Class Reference

#include <vpImageIo.h>

Static Public Member Functions

static void read (vpImage< unsigned char > &I, const char *filename)
 
static void read (vpImage< unsigned char > &I, const std::string filename)
 
static void read (vpImage< vpRGBa > &I, const char *filename)
 
static void read (vpImage< vpRGBa > &I, const std::string filename)
 
static void write (const vpImage< unsigned char > &I, const char *filename)
 
static void write (const vpImage< unsigned char > &I, const std::string filename)
 
static void write (const vpImage< vpRGBa > &I, const char *filename)
 
static void write (const vpImage< vpRGBa > &I, const std::string filename)
 
static void readPFM (vpImage< float > &I, const char *filename)
 
static void readPGM (vpImage< unsigned char > &I, const char *filename)
 
static void readPGM (vpImage< unsigned char > &I, const std::string filename)
 
static void readPGM (vpImage< vpRGBa > &I, const char *filename)
 
static void readPGM (vpImage< vpRGBa > &I, const std::string filename)
 
static void readPPM (vpImage< unsigned char > &I, const char *filename)
 
static void readPPM (vpImage< unsigned char > &I, const std::string filename)
 
static void readPPM (vpImage< vpRGBa > &I, const char *filename)
 
static void readPPM (vpImage< vpRGBa > &I, const std::string filename)
 
static void readJPEG (vpImage< unsigned char > &I, const char *filename)
 
static void readJPEG (vpImage< unsigned char > &I, const std::string filename)
 
static void readJPEG (vpImage< vpRGBa > &I, const char *filename)
 
static void readJPEG (vpImage< vpRGBa > &I, const std::string filename)
 
static void readPNG (vpImage< unsigned char > &I, const char *filename)
 
static void readPNG (vpImage< unsigned char > &I, const std::string filename)
 
static void readPNG (vpImage< vpRGBa > &I, const char *filename)
 
static void readPNG (vpImage< vpRGBa > &I, const std::string filename)
 
static void writePFM (const vpImage< float > &I, const char *filename)
 
static void writePGM (const vpImage< unsigned char > &I, const char *filename)
 
static void writePGM (const vpImage< unsigned char > &I, const std::string filename)
 
static void writePGM (const vpImage< short > &I, const char *filename)
 
static void writePGM (const vpImage< short > &I, const std::string filename)
 
static void writePGM (const vpImage< vpRGBa > &I, const char *filename)
 
static void writePGM (const vpImage< vpRGBa > &I, const std::string filename)
 
static void writePPM (const vpImage< unsigned char > &I, const char *filename)
 
static void writePPM (const vpImage< unsigned char > &I, const std::string filename)
 
static void writePPM (const vpImage< vpRGBa > &I, const char *filename)
 
static void writePPM (const vpImage< vpRGBa > &I, const std::string filename)
 
static void writeJPEG (const vpImage< unsigned char > &I, const char *filename)
 
static void writeJPEG (const vpImage< unsigned char > &I, const std::string filename)
 
static void writeJPEG (const vpImage< vpRGBa > &I, const char *filename)
 
static void writeJPEG (const vpImage< vpRGBa > &I, const std::string filename)
 
static void writePNG (const vpImage< unsigned char > &I, const char *filename)
 
static void writePNG (const vpImage< unsigned char > &I, const std::string filename)
 
static void writePNG (const vpImage< vpRGBa > &I, const char *filename)
 
static void writePNG (const vpImage< vpRGBa > &I, const std::string filename)
 

Detailed Description

Read/write images with various image format.

The code below shows how to convert an PPM P6 image file format into a PGM P5 image file format. The extension of the filename is here used in read() and write() functions to set the image file format (".pgm" for PGM P5 and ".ppm" for PPM P6).

#include <visp/vpImage.h>
#include <visp/vpImageIo.h>
int main()
{
#ifdef UNIX
std::string filename("/local/soft/ViSP/ViSP-images/Klimt/Klimt.ppm");
#elif WIN32
std::string filename("C:/temp/ViSP-images/Klimt/Klimt.ppm");
#endif
vpImageIo::read(I, filename); // Convert the color image in a gray level image
vpImageIo::write(I, "Klimt.pgm"); // Write the image in a PGM P5 image file format
}

Definition at line 104 of file vpImageIo.h.

Member Function Documentation

void vpImageIo::read ( vpImage< unsigned char > &  I,
const char *  filename 
)
static

Read the contents of the file, allocate memory for the corresponding greyscale image.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.
Examples:
displayGTK.cpp, manDisplay.cpp, photometricVisualServoing.cpp, testConversion.cpp, and testReadImage.cpp.

Definition at line 239 of file vpImageIo.cpp.

References vpImageException::ioError, readJPEG(), readPGM(), readPNG(), readPPM(), and vpCERROR.

Referenced by vpDiskGrabber::acquire(), vpImageSimulator::init(), and read().

void vpImageIo::read ( vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Read the contents of the file, allocate memory for the corresponding greyscale image.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 282 of file vpImageIo.cpp.

References read().

void vpImageIo::read ( vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Read the contents of the file, allocate memory for the corresponding vpRGBa image.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 298 of file vpImageIo.cpp.

References vpImageException::ioError, readJPEG(), readPGM(), readPNG(), readPPM(), and vpCERROR.

void vpImageIo::read ( vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Read the contents of the file, allocate memory for the corresponding vpRGBa image.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 341 of file vpImageIo.cpp.

References read().

void vpImageIo::readJPEG ( vpImage< unsigned char > &  I,
const char *  filename 
)
static

Read the contents of the JPEG file, allocate memory for the corresponding gray level image, if necessary convert the data in gray level, and set the bitmap whith the gray level data. That means that the image I is a "black and white" rendering of the original image in filename, as in a black and white photograph. If necessary, the quantization formula used is $0,299 r + 0,587 g + 0,114 b$.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.
Examples:
testReadImage.cpp.

Definition at line 1666 of file vpImageIo.cpp.

References vpImage< Type >::bitmap, vpImageConvert::convert(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageException::ioError, vpImage< Type >::resize(), and vpERROR_TRACE.

Referenced by read(), and readJPEG().

void vpImageIo::readJPEG ( vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Read the contents of the JPEG file, allocate memory for the corresponding gray level image, if necessary convert the data in gray level, and set the bitmap whith the gray level data. That means that the image I is a "black and white" rendering of the original image in filename, as in a black and white photograph. If necessary, the quantization formula used is $0,299 r + 0,587 g + 0,114 b$.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 1754 of file vpImageIo.cpp.

References readJPEG().

void vpImageIo::readJPEG ( vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Read a JPEG file and initialize a scalar image.

Read the contents of the JPEG file, allocate memory for the corresponding image, and set the bitmap whith the content of the file.

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.

If the file corresponds to a grayscaled image, a conversion is done to deal with I which is a color image.

Parameters
I: Color image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 1779 of file vpImageIo.cpp.

References vpImage< Type >::bitmap, vpImageConvert::convert(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageException::ioError, vpImage< Type >::resize(), and vpERROR_TRACE.

void vpImageIo::readJPEG ( vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Read a JPEG file and initialize a scalar image.

Read the contents of the JPEG file, allocate memory for the corresponding image, and set the bitmap whith the content of the file.

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.

If the file corresponds to a grayscaled image, a conversion is done to deal with I which is a color image.

Parameters
I: Color image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 1874 of file vpImageIo.cpp.

References readJPEG().

void vpImageIo::readPFM ( vpImage< float > &  I,
const char *  filename 
)
static

Read a PGM P5 file and initialize a scalar image.

Read the contents of the portable gray pixmap (PGM P5) filename, allocate memory for the corresponding image, and set the bitmap whith the content of the file.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 662 of file vpImageIo.cpp.

References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageException::ioError, vpImage< Type >::resize(), and vpERROR_TRACE.

Referenced by vpDiskGrabber::acquire().

void vpImageIo::readPGM ( vpImage< unsigned char > &  I,
const char *  filename 
)
static

Read a PGM P5 file and initialize a scalar image.

Read the contents of the portable gray pixmap (PGM P5) filename, allocate memory for the corresponding image, and set the bitmap whith the content of the file.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.
Examples:
calibrate2dGrid.cpp, displayD3D.cpp, displayGDI.cpp, displayOpenCV.cpp, displaySequence.cpp, displayX.cpp, displayXMulti.cpp, fernClassifier.cpp, histogram.cpp, keyPointSurf.cpp, planarObjectDetector.cpp, poseVirtualVS.cpp, testClick.cpp, testConversion.cpp, testCreateSubImage.cpp, testIoPGM.cpp, testMouseEvent.cpp, testReadImage.cpp, testSurfKeyPoint.cpp, testTrackDot.cpp, testUndistortImage.cpp, testVideoDevice.cpp, trackDot.cpp, trackDot2.cpp, trackDot2WithAutoDetection.cpp, trackKltOpencv.cpp, trackMeCircle.cpp, trackMeEllipse.cpp, and trackMeLine.cpp.

Definition at line 824 of file vpImageIo.cpp.

References vpImage< Type >::bitmap, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageException::ioError, vpImage< Type >::resize(), and vpERROR_TRACE.

Referenced by read(), and readPGM().

void vpImageIo::readPGM ( vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Read a PGM P5 file and initialize a scalar image.

Read the contents of the portable gray pixmap (PGM P5) filename, allocate memory for the corresponding image, and set the bitmap whith the content of the file.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 1336 of file vpImageIo.cpp.

References readPGM().

void vpImageIo::readPGM ( vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Read a PGM P5 file and initialize a scalar image.

Read the contents of the portable gray pixmap (PGM P5) filename, allocate memory for the corresponding image, and set the bitmap whith the content of the file.

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.

The gray level image contained in the filename is converted in a color image in I.

Parameters
I: Color image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 987 of file vpImageIo.cpp.

References vpImageConvert::convert(), readPGM(), and vpERROR_TRACE.

void vpImageIo::readPGM ( vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Read a PGM P5 file and initialize a scalar image.

Read the contents of the portable gray pixmap (PGM P5) filename, allocate memory for the corresponding image, and set the bitmap whith the content of the file.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 1357 of file vpImageIo.cpp.

References readPGM().

void vpImageIo::readPNG ( vpImage< unsigned char > &  I,
const char *  filename 
)
static

Read the contents of the PNG file, allocate memory for the corresponding gray level image, if necessary convert the data in gray level, and set the bitmap whith the gray level data. That means that the image I is a "black and white" rendering of the original image in filename, as in a black and white photograph. If necessary, the quantization formula used is $0,299 r + 0,587 g + 0,114 b$.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.
Examples:
testReadImage.cpp.

Definition at line 2363 of file vpImageIo.cpp.

References vpImage< Type >::bitmap, vpImageConvert::convert(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageException::ioError, vpImage< Type >::resize(), and vpERROR_TRACE.

Referenced by read(), and readPNG().

void vpImageIo::readPNG ( vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Read the contents of the PNG file, allocate memory for the corresponding gray level image, if necessary convert the data in gray level, and set the bitmap whith the gray level data. That means that the image I is a "black and white" rendering of the original image in filename, as in a black and white photograph. If necessary, the quantization formula used is $0,299 r + 0,587 g + 0,114 b$.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 2557 of file vpImageIo.cpp.

References readPNG().

void vpImageIo::readPNG ( vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Read a PNG file and initialize a scalar image.

Read the contents of the PNG file, allocate memory for the corresponding image, and set the bitmap whith the content of the file.

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.

If the file corresponds to a grayscaled image, a conversion is done to deal with I which is a color image.

Parameters
I: Color image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 2582 of file vpImageIo.cpp.

References vpImage< Type >::bitmap, vpImageConvert::convert(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageException::ioError, vpImage< Type >::resize(), and vpERROR_TRACE.

void vpImageIo::readPNG ( vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Read a PNG file and initialize a scalar image.

Read the contents of the PNG file, allocate memory for the corresponding image, and set the bitmap whith the content of the file.

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.

If the file corresponds to a grayscaled image, a conversion is done to deal with I which is a color image.

Parameters
I: Color image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 2770 of file vpImageIo.cpp.

References readPNG().

void vpImageIo::readPPM ( vpImage< unsigned char > &  I,
const char *  filename 
)
static

Read the contents of the portable pixmap (PPM P6) filename, allocate memory for the corresponding gray level image, convert the data in gray level, and set the bitmap whith the gray level data. That means that the image I is a "black and white" rendering of the original image in filename, as in a black and white photograph. The quantization formula used is $0,299 r + 0,587 g + 0,114 b$.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.
Examples:
displayXMulti.cpp, imageDiskRW.cpp, testConversion.cpp, testIoPPM.cpp, testReadImage.cpp, testUndistortImage.cpp, and testVideoDevice.cpp.

Definition at line 1029 of file vpImageIo.cpp.

References vpImageConvert::convert(), and vpERROR_TRACE.

Referenced by vpMbTracker::initClick(), read(), and readPPM().

void vpImageIo::readPPM ( vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Read the contents of the portable pixmap (PPM P6) filename, allocate memory for the corresponding gray level image, convert the data in gray level, and set the bitmap whith the gray level data. That means that the image I is a "black and white" rendering of the original image in filename, as in a black and white photograph. The quantization formula used is $0,299 r + 0,587 g + 0,114 b$.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 1430 of file vpImageIo.cpp.

References readPPM().

void vpImageIo::readPPM ( vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Read the contents of the portable pixmap (PPM P6) filename, allocate memory for the corresponding vpRGBa image.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 1060 of file vpImageIo.cpp.

References vpRGBa::B, vpRGBa::G, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageException::ioError, vpRGBa::R, vpImage< Type >::resize(), and vpERROR_TRACE.

void vpImageIo::readPPM ( vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Read the contents of the portable pixmap (PPM P6) filename, allocate memory for the corresponding vpRGBa image.

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.

Parameters
I: Image to set with the filename content.
filename: Name of the file containing the image.

Definition at line 1447 of file vpImageIo.cpp.

References readPPM().

void vpImageIo::write ( const vpImage< unsigned char > &  I,
const char *  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a PNM (PGM P5 or PPM P6) or a JPEG file depending on the filename extension.

Parameters
I: Image to save as a PNM or a JPEG file.
filename: Name of the file containing the image.
Examples:
displayGTK.cpp, grab1394Two.cpp, grabOpenCV.cpp, grabV4l2.cpp, manDisplay.cpp, SickLDMRS-Process.cpp, sonarPioneerReader.cpp, test1394TwoGrabber.cpp, and testConversion.cpp.

Definition at line 355 of file vpImageIo.cpp.

References vpImageException::ioError, vpCERROR, writeJPEG(), writePGM(), writePNG(), and writePPM().

Referenced by vpVideoWriter::saveFrame(), and write().

void vpImageIo::write ( const vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a PNM (PGM P5 or PPM P6) or a JPEG file depending on the filename extension.

Parameters
I: Image to save as a PNM or a JPEG file.
filename: Name of the file containing the image.

Definition at line 395 of file vpImageIo.cpp.

References write().

void vpImageIo::write ( const vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a PNM (PGM P5 or PPM P6) or a JPEG file depending on the filename extension.

Parameters
I: Image to save as a PNM or a JPEG file.
filename: Name of the file containing the image.

Definition at line 408 of file vpImageIo.cpp.

References vpImageException::ioError, vpCERROR, writeJPEG(), writePGM(), writePNG(), and writePPM().

void vpImageIo::write ( const vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a PNM (PGM P5 or PPM P6) or a JPEG file depending on the filename extension.

Parameters
I: Image to save as a PNM or a JPEG file.
filename: Name of the file containing the image.

Definition at line 448 of file vpImageIo.cpp.

References write().

void vpImageIo::writeJPEG ( const vpImage< unsigned char > &  I,
const char *  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a JPEG file.

Parameters
I: Image to save as a JPEG file.
filename: Name of the file containing the image.

Definition at line 1497 of file vpImageIo.cpp.

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

Referenced by write(), and writeJPEG().

void vpImageIo::writeJPEG ( const vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a JPEG file.

Parameters
I: Image to save as a JPEG file.
filename: Name of the file containing the image.

Definition at line 1562 of file vpImageIo.cpp.

References writeJPEG().

void vpImageIo::writeJPEG ( const vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a JPEG file.

Parameters
I: Image to save as a JPEG file.
filename: Name of the file containing the image.

Definition at line 1576 of file vpImageIo.cpp.

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

void vpImageIo::writeJPEG ( const vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a JPEG file.

Parameters
I: Image to save as a JPEG file.
filename: Name of the file containing the image.

Definition at line 1643 of file vpImageIo.cpp.

References writeJPEG().

void vpImageIo::writePFM ( const vpImage< float > &  I,
const char *  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function is built like portable gray pixmap (eg PGM P5) file. but considers float image data.

Parameters
I: Image to save as a (PFM P8) file.
filename: Name of the file containing the image.

Definition at line 466 of file vpImageIo.cpp.

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

void vpImageIo::writePGM ( const vpImage< unsigned char > &  I,
const char *  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PGM P5) file.

Parameters
I: Image to save as a (PGM P5) file.
filename: Name of the file containing the image.
Examples:
calibrate2dGrid.cpp, grab1394CMU.cpp, grabDirectShow.cpp, grabDirectShowMulti.cpp, testConversion.cpp, testCreateSubImage.cpp, testIoPGM.cpp, testIoPPM.cpp, and testUndistortImage.cpp.

Definition at line 522 of file vpImageIo.cpp.

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

Referenced by write(), and writePGM().

void vpImageIo::writePGM ( const vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PGM P5) file.

Parameters
I: Image to save as a (PGM P5) file.
filename: Name of the file containing the image.

Definition at line 1372 of file vpImageIo.cpp.

References writePGM().

void vpImageIo::writePGM ( const vpImage< short > &  I,
const char *  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PGM P5) file.

Parameters
I: Image to save as a (PGM P5) file.
filename: Name of the file containing the image.

Definition at line 573 of file vpImageIo.cpp.

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

void vpImageIo::writePGM ( const vpImage< short > &  I,
const std::string  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PGM P5) file.

Parameters
I: Image to save as a (PGM P5) file.
filename: Name of the file containing the image.

Definition at line 1387 of file vpImageIo.cpp.

References writePGM().

void vpImageIo::writePGM ( const vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PGM P5) file. Color image is converted into a grayscale image.

Parameters
I: Image to save as a (PGM P5) file.
filename: Name of the file containing the image.

Definition at line 598 of file vpImageIo.cpp.

References vpImage< Type >::bitmap, vpImageConvert::convert(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageException::ioError, and vpERROR_TRACE.

void vpImageIo::writePGM ( const vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PGM P5) file. Color image is converted into a grayscale image.

Parameters
I: Image to save as a (PGM P5) file.
filename: Name of the file containing the image.

Definition at line 1404 of file vpImageIo.cpp.

References writePGM().

void vpImageIo::writePNG ( const vpImage< unsigned char > &  I,
const char *  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a PNG file.

Parameters
I: Image to save as a PNG file.
filename: Name of the file containing the image.

Definition at line 2077 of file vpImageIo.cpp.

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

Referenced by write(), and writePNG().

void vpImageIo::writePNG ( const vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a PNG file.

Parameters
I: Image to save as a PNG file.
filename: Name of the file containing the image.

Definition at line 2201 of file vpImageIo.cpp.

References writePNG().

void vpImageIo::writePNG ( const vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a PNG file.

Parameters
I: Image to save as a PNG file.
filename: Name of the file containing the image.

Definition at line 2215 of file vpImageIo.cpp.

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

void vpImageIo::writePNG ( const vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Write the content of the image bitmap in the file which name is given by filename. This function writes a PNG file.

Parameters
I: Image to save as a PNG file.
filename: Name of the file containing the image.

Definition at line 2341 of file vpImageIo.cpp.

References writePNG().

void vpImageIo::writePPM ( const vpImage< unsigned char > &  I,
const char *  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PPM P6) file. grayscale image is converted into a color image vpRGBa.

Parameters
I: Image to save as a (PPM P6) file.
filename: Name of the file containing the image.
Examples:
displayD3D.cpp, displayGDI.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, grab1394CMU.cpp, grabDirectShow.cpp, grabDirectShowMulti.cpp, imageDiskRW.cpp, manGeometricFeatures.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, testConversion.cpp, testIoPPM.cpp, and testUndistortImage.cpp.

Definition at line 1223 of file vpImageIo.cpp.

References vpImageConvert::convert(), and vpERROR_TRACE.

Referenced by write(), vpSimulator::write(), and writePPM().

void vpImageIo::writePPM ( const vpImage< unsigned char > &  I,
const std::string  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PPM P6) file. grayscale image is converted into a color image vpRGBa.

Parameters
I: Image to save as a (PPM P6) file.
filename: Name of the file containing the image.

Definition at line 1463 of file vpImageIo.cpp.

References writePPM().

void vpImageIo::writePPM ( const vpImage< vpRGBa > &  I,
const char *  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PPM P6) file.

Parameters
I: Image to save as a (PPM P6) file.
filename: Name of the file containing the image.

Definition at line 1250 of file vpImageIo.cpp.

References vpRGBa::B, vpRGBa::G, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageException::ioError, vpRGBa::R, and vpERROR_TRACE.

void vpImageIo::writePPM ( const vpImage< vpRGBa > &  I,
const std::string  filename 
)
static

Write the content of the bitmap in the file which name is given by filename. This function writes a portable gray pixmap (PPM P6) file.

Parameters
I: Image to save as a (PPM P6) file.
filename: Name of the file containing the image.

Definition at line 1477 of file vpImageIo.cpp.

References writePPM().