Basic Image AlgorithmS Library
2.8.0
|
Save 2D/3D-image-data together with some metadata in a single tiff-datafile. More...
#include <Base/Image/PMDImageIO.hh>
Static Public Member Functions | |
static int | GetBitRep (const std::string &FileName) |
Returns the bit representation (8 or 16) for the 2D-image in the PMD-image filename. More... | |
static int | Load (const std::string &FileName, uint8 *&Img2D, uint16 *&ImgDepth, uint16 *&ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) |
Load a PMD-data 2d/3d-tiff image from disk. More... | |
static int | Load (const std::string &FileName, uint16 *&Img2D, uint16 *&ImgDepth, uint16 *&ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) |
static int | Load (const std::string &FileName, Image< unsigned char > &Img2D, Image< float > &ImgDepth, Image< float > &ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) |
Load a PMD-data 2d/3d-image from disk, automatically detecting TIFF or XML file format and calling the appropriate subroutine. More... | |
static int | LoadFromTIFF (const std::string &FileName, Image< unsigned char > &Img2D, Image< float > &ImgDepth, Image< float > &ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) |
Load a PMD-data 2d/3d-image from TIFF-file. More... | |
static int | LoadFromTXT (int width, int height, const std::string &FileName2D, const std::string &FileNameDepth, const std::string &FileNameModCoeff, Image< unsigned char > &Img2D, Image< float > &ImgDepth, Image< float > &ImgModCoeff, PMDImageMetaData &MetaDataDepth) |
Load PMD-image from 3 space separated text files. More... | |
static int | LoadFromXML (const std::string &FileName, Image< unsigned char > &Img2D, Image< float > &ImgDepth, Image< float > &ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) |
Load a PMD-data 2d/3d-image from PMDtec's XMK format. More... | |
static int | LoadFromXML (const std::string &FileName, std::vector< Image< unsigned char > > &Imgs2D, std::vector< Image< float > > &ImgDepth, std::vector< Image< float > > &ImgModCoeff, std::vector< PMDImageMetaData > &MetaData2D, std::vector< PMDImageMetaData > &MetaDataDepth) |
static int | LoadXML (const std::string &FileName, uint16 *&Img2D, uint16 *&ImgDepth, uint16 *&ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) |
Load a PMD-image in the PMD-technologies XML-format from disk for a specification see the CamVis Pro instruction manual. More... | |
static int | LoadXML (XMLIO &myXML, xmlNodePtr &rootNode, uint16 *&Img2D, uint16 *&ImgDepth, uint16 *&ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) |
static int | Save (const std::string &FileName, uint8 *Img2D, uint16 *ImgDepth, uint16 *ImgModCoeff, const PMDImageMetaData &MetaData2D, const PMDImageMetaData &MetaDataDepth) |
Save a PMD-data 2d/3d-tiff image to disk. More... | |
static int | Save (const std::string &FileName, uint16 *Img2D, uint16 *ImgDepth, uint16 *ImgModCoeff, const PMDImageMetaData &MetaData2D, const PMDImageMetaData &MetaDataDepth) |
static int | Save (const std::string &FileName, BIAS::Image< unsigned char > &Img2D, BIAS::Image< float > &ImgDepth, BIAS::Image< float > &ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) |
Save a PMD-data 2d/3d-tiff image to disk. More... | |
Static Protected Member Functions | |
static uint16 | Convert_ (float val, float lower, float upper) |
static float | Convert_ (uint16 val, float lower, float upper) |
static uint16 | DepthConvert_ (float depth) |
static float | DepthConvert_ (uint16 depth) |
static void | Grey16to8Bit_ (uint16 *src, uint8 *&dst, unsigned int size) |
static int | Load2DImage16Bit_ (TIFF *tiffimage, uint16 *&Img2D, PMDImageMetaData &MetaData2D) |
static int | Load2DImage8Bit_ (TIFF *tiffimage, uint8 *&Img2D, PMDImageMetaData &MetaData2D) |
static int | LoadDepthImage_ (TIFF *tiffimage, uint16 *&ImgDepth, PMDImageMetaData &MetaDataDepth) |
static int | LoadMetaData_ (TIFF *tiffimage, PMDImageMetaData &MetaData) |
static int | LoadModCoeffImage_ (TIFF *tiffimage, uint16 *&ImgModCoeff, PMDImageMetaData MetaDataDepth) |
static uint16 | ModCoeffConvert_ (float modcoeff) |
static float | ModCoeffConvert_ (uint16 modcoeff) |
static void | NewTagsCallback_ (TIFF *tif) |
static void | NewTagsInitialize_ () |
static int | PostprocessData_ (uint8 *data2d, uint16 *dataDepth, uint16 *dataModCoeff, Image< unsigned char > &Img2D, Image< float > &ImgDepth, Image< float > &ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) |
static int | Save2DImage16Bit_ (TIFF *tiffimage, uint16 *Img2D, PMDImageMetaData MetaData2D, int LinesPerStrip) |
static int | Save2DImage8Bit_ (TIFF *tiffimage, uint8 *Img2D, PMDImageMetaData MetaData2D, int LinesPerStrip) |
static int | SaveDepthImage_ (TIFF *tiffimage, uint16 *ImgDepth, PMDImageMetaData MetaDataDepth, int LinesPerStrip) |
static int | SaveMetaData_ (TIFF *tiffimage, const PMDImageMetaData &MetaData) |
static int | SaveModCoeffImage_ (TIFF *tiffimage, uint16 *ImgModCoeff, PMDImageMetaData MetaDataDepth, int LinesPerStrip) |
Static Protected Attributes | |
static TIFFExtendProc | ParentExtender = NULL |
Save 2D/3D-image-data together with some metadata in a single tiff-datafile.
The 2D-3D-data is aligned, such that for each pixel in the 2D-image the corresponding depth is stored at the same position in the depth image. A -1 in the depth image indicates that no depth data is available.
Definition at line 93 of file PMDImageIO.hh.
|
staticprotected |
Definition at line 1099 of file PMDImageIO.cpp.
|
staticprotected |
Definition at line 1106 of file PMDImageIO.cpp.
|
staticprotected |
Definition at line 1114 of file PMDImageIO.cpp.
|
staticprotected |
Definition at line 1119 of file PMDImageIO.cpp.
|
static |
Returns the bit representation (8 or 16) for the 2D-image in the PMD-image filename.
0 if there is no 2D image, -1 in case of error.
Definition at line 1050 of file PMDImageIO.cpp.
|
staticprotected |
Definition at line 1078 of file PMDImageIO.cpp.
|
static |
Load a PMD-data 2d/3d-tiff image from disk.
FileName | complete name of file to be loaded |
Img2D | to receive the 2d-image data from the file, new memory is allocated, if NULL tif contained no 2D-image |
ImgDepth | to receive the depth-image data from the file, new memory is allocated, if NULL tif contained no depth-image |
MetaData | to receive the Metadata from the file |
Definition at line 570 of file PMDImageIO.cpp.
Referenced by BIAS::VideoSource_DiskPMD::GrabSingle(), and BIAS::VideoSource_DiskPMD::OpenDevice().
|
static |
Definition at line 519 of file PMDImageIO.cpp.
|
static |
Load a PMD-data 2d/3d-image from disk, automatically detecting TIFF or XML file format and calling the appropriate subroutine.
FileName | complete name of file to be loaded |
img | to receive the 2d-image data from the file |
depthimg | to receive the depth-image data from the file |
MetaData | to receive the Metadata from the file |
Definition at line 825 of file PMDImageIO.cpp.
|
staticprotected |
Definition at line 373 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 322 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 422 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, and BIAS::PMDImageMetaData::width.
|
static |
Load a PMD-data 2d/3d-image from TIFF-file.
Definition at line 956 of file PMDImageIO.cpp.
|
static |
Load PMD-image from 3 space separated text files.
Definition at line 978 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::AspectRatio, BIAS::PMDImageMetaData::CameraCenter, BIAS::PMDImageMetaData::CameraRotation, BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::FocallengthX, BIAS::PMDImageMetaData::height, BIAS::PMDImageMetaData::PrincipalX, BIAS::PMDImageMetaData::PrincipalY, BIAS::PMDImageMetaData::UndistCoeff, and BIAS::PMDImageMetaData::width.
|
static |
Load a PMD-data 2d/3d-image from PMDtec's XMK format.
The 1st image is Load if the file contains a sequence.
Definition at line 849 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, and BIAS::PMDImageMetaData::width.
Referenced by BIAS::VideoSource_DiskPMD::OpenDevice().
|
static |
Definition at line 875 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeName(), BIAS::PMDImageMetaData::height, BIAS::XMLIO::read(), and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 1195 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::AspectRatio, BIAS::PMDImageMetaData::CameraCenter, BIAS::PMDImageMetaData::CameraRotation, BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::FocallengthX, BIAS::PMDImageMetaData::height, BIAS::PMDImageMetaData::PrincipalX, BIAS::PMDImageMetaData::PrincipalY, BIAS::PMDImageMetaData::UndistCoeff, and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 470 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, and BIAS::PMDImageMetaData::width.
|
static |
Load a PMD-image in the PMD-technologies XML-format from disk for a specification see the CamVis Pro instruction manual.
Data from tag <grayscale> is Load to Img2D, <distance> is Load to ImgDepth and <amplitude> is Load to ImgModCoeff. All other tags <rawXY> are ignored. Is a sequence is given, only the first image is Load.
FileName | complete name of file to be loaded |
Img2D | to receive the 2d-image data from the file, new memory is allocated, if NULL tif contained no 2D-image |
ImgDepth | to receive the depth-image data from the file, new memory is allocated, if NULL tif contained no depth-image |
MetaData | to receive the Metadata from the file |
Definition at line 624 of file PMDImageIO.cpp.
References BIAS::XMLIO::getChild(), BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::read().
|
static |
Definition at line 653 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::AspectRatio, BIAS::PMDImageMetaData::CameraCenter, BIAS::PMDImageMetaData::CameraRotation, BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::FocallengthX, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueInt(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getNodeContentVectorInt(), BIAS::PMDImageMetaData::height, BIAS::PMDImageMetaData::PrincipalX, BIAS::PMDImageMetaData::PrincipalY, BIAS::PMDImageMetaData::UndistCoeff, and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 1124 of file PMDImageIO.cpp.
|
staticprotected |
Definition at line 1128 of file PMDImageIO.cpp.
|
staticprotected |
Definition at line 1314 of file PMDImageIO.cpp.
|
staticprotected |
Definition at line 1300 of file PMDImageIO.cpp.
|
staticprotected |
Definition at line 1133 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetColorModel(), and BIAS::PMDImageMetaData::width.
|
static |
Save a PMD-data 2d/3d-tiff image to disk.
FileName | Output filename, should have the extension .tif |
Img2D | pointer to the 2d-image data to save, if NULL only depth is written, metadata is also ignored |
ImgDepth | pointer to the depth data to save, if NULL only 2D-img is written, metadata is also ignored |
MetaData2D | the Metadata of the 2D-image to save |
MetaDataDepth | the Metadata of the depth image to use for padding |
Definition at line 235 of file PMDImageIO.cpp.
|
static |
Definition at line 278 of file PMDImageIO.cpp.
|
static |
Save a PMD-data 2d/3d-tiff image to disk.
FileName | Output filename, should have the extension .tif |
img | the 2d-image data to save |
depthimg | the depth data to save |
MetaData2D | the Metadata of the 2D-image to save |
MetaDataDepth | the Metadata of the depth image to use for padding |
Definition at line 743 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::PMDImageMetaData::height, BIAS::ImageBase::IsEmpty(), and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 118 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 78 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 158 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 1282 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::AspectRatio, BIAS::PMDImageMetaData::CameraCenter, BIAS::PMDImageMetaData::CameraRotation, BIAS::PMDImageMetaData::FocallengthX, BIAS::PMDImageMetaData::PrincipalX, BIAS::PMDImageMetaData::PrincipalY, and BIAS::PMDImageMetaData::UndistCoeff.
|
staticprotected |
Definition at line 195 of file PMDImageIO.cpp.
References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, and BIAS::PMDImageMetaData::width.
|
staticprotected |
Definition at line 294 of file PMDImageIO.hh.